This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Wrong dynamic-linker used on Solaris 7/x86


>Dunno.  I had thought at first of creating a new BFD vector, such as
>elf32-i386-sol2.c, but now I realize this wouldn't necessary, as long
>as there is some way to tell, in elf_i386_size_dynamic_sections(),
>whether ELFOSABI_SOLARIS is set somewhere, assuming this would be the
>way to detect we're linking for Solaris.  If that's the case, where
>would this `somewhere' be?

I have a feeling that you will find that ELFOSABI_SOLARIS isn't actually used,
and Solaris just declares itself as "System V" (ie ELFOSABI_NONE).  If it were, 
I guess elf_elfheader(output_bfd)->e_ident would be the place to go looking for 
it.

You might do better to create a new linker emulation, have it override the 
contents of the .interp section, and make that the default for Solaris.  That 
way the hackery is localised inside ld, rather than involving BFD itself.

(Personally I don't think I'd bother: there are several other targets where GNU 
ld will get the interpreter location wrong if it's left to its own devices, 
and GCC has to include an appropriate -dynamic-linker option in the specs 
file.)

p.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]