This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
How to avoid unnecessary R_IA64_FPTR64LSB in executable?
- From: "H. J. Lu" <hjl at lucon dot org>
- To: binutils at sources dot redhat dot com
- Date: Wed, 27 Apr 2005 16:43:04 -0700
- Subject: How to avoid unnecessary R_IA64_FPTR64LSB in executable?
The ia64 linker creates unnecessary R_IA64_FPTR64LSB relocations:
http://sources.redhat.com/bugzilla/show_bug.cgi?id=883
Basically, the ia64 linker creates R_IA64_FPTR64LSB relocations in
executable when there is any reference in DSO even though it is only
needed for dynamic R_IA64_FPTR64LSB relocations. I have 2 questions:
1. When we export a function in executable, whose function pointer is
used in executable and which is referenced by a DSO, can we create a
R_IA64_FPTR64LSB in executable only when there is a dynamic
R_IA64_FPTR64LSB reference? The only problem I can see is the different
version of the DSO may have dynamic R_IA64_FPTR64LSB reference. But
I think it is the same problem that the different version of the DSO
may reference functions in executable which weren't referenced and
weren't exported before.
2. Assuming, we create a R_IA64_FPTR64LSB in executable only when
there is a dynamic R_IA64_FPTR64LSB relocation, how does linker
know there is a dynamic R_IA64_FPTR64LSB relocation? I am thinking to
allow the backend to read dynamic relocations after all input files
have been opened. The ia64 backend will have enough information to
decide what to do.
H.J.