Missing symbols from dynamic hash table on ia64
Sat Jun 1 06:49:00 GMT 2019
On Wed, May 29, 2019 at 09:15:06AM +0200, Jiri Svoboda wrote:
> When I build a shared library for ia64 (I can reproduce this with target ia
> 64-pc-linux-gnu-gcc), the linker generates relocations against local symbols
> - for static functions that we take pointer to, I assume this is because the
> function descriptors from the Itanium ABI need the absolute address of the
> function. These local symbols are present in the dynamic symbol table, but *
> not present* in the dynamic hash table.
> Can anybody advise on whether this is some kind of expected behavior, or
> should it be considered a bug? This makes it difficult for the dynamic
> linker to resolve the references efficiently. It seems prettty surpsising
> that this would go on unnoticed if it were a bug...
.gnu_hash deliberately excludes local symbols. There is no need to
look up local symbols by name, thus no need of a hash entry. Any
dynamic relocation against a local symbol will always use the value of
that symbol in the current dynamic object.
Note also that dynamic relocations against local symbols can in most
cases be reduced by the linker to a RELATIVE reloc, or some other
dynamic reloc with a zero symbol index.
Australia Development Lab, IBM
More information about the Binutils