Hi,



I stumbled upon this strange issue while adding ia64 support to HelenOS 
dynamic linker....




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.




Steps to reproduce:

gcc-9.1.0 configured with target ia64-pc-linux-gnu-gcc

binutils-2.32 configured with target ia64-pc-linux-gnu-gcc




test.c:

void (*fptr)(void);

static void a(void)
{
    fptr = a;
}

void b(void)
{
    fptr = b;
}






/usr/local/x/bin/ia64-pc-linux-gnu-gcc -fPIC -o test.o -c test.c

/usr/local/x/bin/ia64-pc-linux-gnu-gcc -fPIC -o test.so test.o -nostdlib -
shared




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...





Thanks,

Jiri
_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel

Reply via email to