Predefined Version expansion

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Wed Apr 4 09:50:21 PDT 2007


Pragma wrote:
> for another.  The only catch is that this technique would only be 
> available to dynamic modules - the pre-linked .exe code can't be 
> modified this way.

Wouldn't ld's "--emit-relocs" (aka "-q") remove that limitation? From 
the ld man page:
=====
-q
--emit-relocs
     Leave relocation sections and contents in fully  linked  exececuta‐
     bles.   Post  link  analysis  and  optimization tools may need this
     information in order to perform correct modifications  of  executa‐
     bles.  This results in larger executables.

     This option is currently only supported on ELF platforms.
=====

I have no idea if optlink has a similar option.
Is it even possible to store such information in PE files? (i.e. do they 
support arbitrary sections or a special section for this stuff?) I seem 
to remember you can append arbitrary data to PE files without breaking 
them, but obviously that's not ideal...



More information about the Digitalmars-d mailing list