flat assembler
Message board for the users of flat assembler.
Index
> Main > Why do PE sections have a name? |
Author |
|
Chewy509 23 Feb 2007, 03:43
For the final linking stage before execution.
|
|||
23 Feb 2007, 03:43 |
|
ChrisLeslie 23 Feb 2007, 04:03
OK, but why do we have to give them a specific name? I can call them anything and it makes no difference to the outcome as far as I can tell.
Chris |
|||
23 Feb 2007, 04:03 |
|
Garthower 23 Feb 2007, 07:22
Names for sections is easier good form of programming, no more. Any name of any section will not affect in any way working capacity of the program.
|
|||
23 Feb 2007, 07:22 |
|
Raedwulf 23 Feb 2007, 09:34
We didn't design the PE format .
|
|||
23 Feb 2007, 09:34 |
|
f0dder 05 Aug 2007, 23:15
Sorry for reviving an old thread... but legend has it that some tools (or perhaps some windows versions?) required the resource section to be called .rsrc - I've seen compressors that renames all other sections but has options to keep .rsrc.
I've never stumbled upon the issue myself, so I don't know if it's just an urban legend or if there's some truth to it - but I've always stuck with .rsrc to be safe |
|||
05 Aug 2007, 23:15 |
|
LocoDelAssembly 05 Aug 2007, 23:23
f0dder, even on Win95 OSR2 doing
Code: align 4 ; Not optional at all data resource . . . end data So, perhaps it is just to be suitable for some PE tools? |
|||
05 Aug 2007, 23:23 |
|
SFeLi 05 Aug 2007, 23:34
LocoDelAssembly, “.rsrc” is required section name for version information.
|
|||
05 Aug 2007, 23:34 |
|
LocoDelAssembly 06 Aug 2007, 00:08
SFeLi, you are right:
Code: RESOURCE_SECTION equ 1 include 'win32ax.inc' ret match =1, RESOURCE_SECTION{ section '.rsrc' resource readable} match =0, RESOURCE_SECTION{ align 4 data resource} directory RT_VERSION, version resource version, 1, LANG_ENGLISH+SUBLANG_DEFAULT, vinfo versioninfo vinfo,VOS__WINDOWS32,VFT_APP,VFT2_UNKNOWN,\ LANG_ENGLISH+SUBLANG_DEFAULT,0,\ 'FileDescription','Description of program',\ 'LegalCopyright','Copyright et cetera',\ 'FileVersion','1.0',\ 'ProductVersion','1.0' match =0, RESOURCE_SECTION{ end data} With "RESOURCE_SECTION equ 1" Windows can display the version info while with "RESOURCE_SECTION equ 0" can't. The myth is true! Thanks SFeLi |
|||
06 Aug 2007, 00:08 |
|
asmfan 06 Aug 2007, 06:32
and try to change .rsrc to other name - work fine xp sp2+ )
The main thing - resourses seem to be in one whole section. |
|||
06 Aug 2007, 06:32 |
|
SFeLi 06 Aug 2007, 13:43
Quote: resourses seem to be in one whole section. At the start of any section. Ok, now the only thing that requires '.rsrc' is typelib handling code in OLEAUT32.DLL. |
|||
06 Aug 2007, 13:43 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.