elflink.c/elf_add_symbol_hook symbol skipping

Nick Clifton nickc@redhat.com
Tue Apr 21 16:42:00 GMT 2009


Hi Doug,

> I've been trying to implement this with elf_add_symbol_hook by returning 
> a null name for a symbol that should be skipped, e.g. in accordance with 
> the elflink.c/elf_link_add_object_symbols() comment:
> 
>           /* The hook function sets the name to NULL if this symbol
>              should be skipped for some reason.  */
>           if (name == NULL)
>             continue;
> 
> Setting the name to null wrecks tremendous havoc later in the link. I'm 
> looking for some ideas on how to make this work.

Strange - it appears that this feature is used by at least the mips 
backend, (see bfd/elfxx-mips.c:_bfd_mips_elf_add_symbol_hook).  Maybe 
you can compare your code with that code ?

Cheers
   Nick




More information about the Binutils mailing list