[patch] VxWorks x86 shared library support.
Alan Modra
amodra@bigpond.net.au
Fri Apr 15 07:09:00 GMT 2005
I don't like any of your hacks to the generic ELF linker code. With a
little thought, you should be able to eliminate most of them.
On Thu, Apr 14, 2005 at 02:58:25PM +0100, Paul Brook wrote:
> * elf-bfd.h (struct elf_backend_data): Add is_vxworks.
> (RELOC_FOR_GLOBAL_SYMBOL): Ignore VxWorks magic GOT symbols.
No way is this RELOC_FOR_GLOBAL_SYMBOL hack acceptable. Instead, do
something about giving these magic symbols a value. See, for example,
elf32_hppa_set_gp.
> * elf.c (assign_section_numbers): Add special handling for VxWorks
> .plt.unloaded section.
Well, maybe this is OK.
> * elflink.c (_bfd_elf_create_dynamic_sections): Mark VxWorks PLT
> symbols as functions.
Do this in backend code, by looking up the sym and changing its type.
> (elf_link_adjust_relocs): Convert SHN_UNDEF relocs for PLT stubs
> into section relative relocs.
Yikes! You say
+ /* This is a relocation from an executable or shared library
+ against a symbol in a different shared library. We are
+ createing a definition in the output file but it does not come
+ from any of out normal (.o) files. ie. a PLT stub.
So this is presumably a linker created reloc. Why can't you create it
such that it doesn't need this horrible hack?
> (elf_link_output_extsym): Ignore undefined VxWorks GOTT symbols.
This shouldn't be needed if you give these syms a value.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Binutils
mailing list