flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
polygon7 09 Aug 2005, 15:11
Hi,
if you want to merge import section, code and data then you must have readable writeable and executable attributes set. Becouse import section needs to be "rw" (windows loader binds imports when loadnig, if i remember correctly), data also "rw", and code "re". rw+rw+re = rwe ![]() _________________ best regards p7 |
|||
![]() |
|
RedGhost 09 Aug 2005, 16:04
polygon7 wrote: Hi, ah so its merging the import section, that would explain the drop in filesize, maybe i didnt read the documentation correctly, yeah i figured those would be the required flags but was unsure |
|||
![]() |
|
Tomasz Grysztar 09 Aug 2005, 16:10
The PE directories like import, export or resource can be placed anywhere in any section - and so "data" is just for this purposes, it allows you to define the given type of PE directory anywhere inside the section where you put it, without starting any new one.
|
|||
![]() |
|
RedGhost 10 Aug 2005, 00:19
Tomasz Grysztar wrote: The PE directories like import, export or resource can be placed anywhere in any section - and so "data" is just for this purposes, it allows you to define the given type of PE directory anywhere inside the section where you put it, without starting any new one. ah, hmm i do enjoy how easy it is to do compiler level things with fasm, if i remember correct c wouldnt even let the reloc(fixups) section become merged therefore the filesize would not go below 1.5kb, with fasm i can make a 1024byte functioning dynamic link library and thats cool well would there be any disadvanges to merging sections maybe some problems that can arise from it? also not to be a pest but as i learn more and more asm i for some reason want to become less dependant on macroinstructions or includes, and i tried to follow the export macro to see what was going on but i have a hard time following them. i have a project i was doing where i have gotten rid of every macro except for export.inc so if someone is willing to drop me a hardcoded example i would appreciate it greatly! |
|||
![]() |
|
Tomasz Grysztar 10 Aug 2005, 00:43
Here's a hardcoded export section from the Win32DLL example from fasm 1.04 package (before the includes time
![]() Code: section '.edata' export data readable dd 0,0,0,rva dlldemo_name,1 dd 1,1,rva addresses_table,rva names_table,rva hints_table addresses_table: dd rva WriteText names_table: dd rva _WriteText hints_table: dw 0 dlldemo_name db 'DLLDEMO.DLL',0 _WriteText db 'WriteText',0 (if you are interested in old releases, you can browse them here). Also read the official PE/COFF documentation for detailed information on export section format etc. |
|||
![]() |
|
RedGhost 10 Aug 2005, 04:08
Tomasz Grysztar wrote: Here's a hardcoded export section from the Win32DLL example from fasm 1.04 package (before the includes time much love, thank you sir! ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.