bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/22394] hppa-linux-ld fails to emit dynamic relocations on functi


From: danglin at gcc dot gnu.org
Subject: [Bug ld/22394] hppa-linux-ld fails to emit dynamic relocations on function pointer initialization
Date: Sat, 04 Nov 2017 17:25:23 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=22394

--- Comment #3 from John David Anglin <danglin at gcc dot gnu.org> ---
On HP-UX, the 64-bit HP linker treats the DIR64 and FPTR64 relocations the same
when "symbol" is a function pointer.  Both point to a function descriptor.

The ABI description is here:
https://uclibc.org/docs/psABI-parisc.pdf

If DIR32 and PLABEL32 were to behave similarly on 32-bit ELF, this would
break the current fast indirect call implementation.  We would have one
additional layer for fast indirect calls.  This is reasonably efficient
when generating PA 2.0 code because there is the bve instruction.  However,
things are not efficient when generating PA 1.X code.  So, fast indirect
calls would no longer be useful.

The original HP SOM linker required the P' selector for procedure labels
for functions in shared libraries.  So, it wasn't possible to do a fast
indirect call to a function in a shared library.  When the function isn't
in a shared library, the call is direct and no function descriptor is used.

Thus, I think it best that the DIR32 relocation provide the actual function
address and not point to a descriptor.  This will enable calls into shared
libraries to functions that don't need the PIC register.  Having the ability
to directly load the address of a function is probably useful for other things.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]