[patch]: ld set pseudo-relocation version 2 as default for x86 pe targets

Dave Korn dave.korn.cygwin@googlemail.com
Fri Nov 6 14:56:00 GMT 2009


Kai Tietz wrote:
> 2009/11/6 Dave Korn <dave.korn.cygwin@googlemail.com>:
>>  Rather than YA "#ifdef i386" in the .em file, how about adding the
>> definition of DEFAULT_PSEUDO_RELOC_VERSION=2 to the relevant emulparams script
>> files and use ${DEFAULT_PSEUDO_RELOC_VERSION:-1} in the .em file?
> 
> Well, I think that this emulscripts are tending to collect parameters
> nobody maintains here (as my last cleanup patch for them had shown for
> me). So I think it is more clear to keep such default values in
> source, as people begin to search here for them, but well, this is
> just my opinion.

  Fair enough.  I think it would be a good plan long-term to try and get rid
of all the #ifdeffery there and replace it by variables defined in the
emulparams scripts, and I don't think it's really all that obscure a location
to have definitions; the curly braces make it clear that it's a shell
variable, not a #define, and so it ought to be obvious that there's no other
place it could have come from, but I won't ask you to worry about that now.

>>  Also, any reason not to keep pep.em in sync here?  That'd be one advantage
>> of avoiding the #ifdef: you could apply the same change to both emulscripts
>> and just not define the default anywhere you didn't want to change it.
> 
> This isn't necessary (and even makes no sense for x64 at all), as x64
> depends on version 2. Version 1 is not usable for x64 pe at all. So
> there is just version 2 as default in fact. The mechanism version one
> is based on, can't handle different relocation sizes, which is a must
> for x64.

  Oh, of course, silly me.  The patch is OK (with fixed changelog of course).

    cheers,
      DaveK



More information about the Binutils mailing list