relocations dropped for differences involving weak or ELF-global symbols
Jan Beulich
JBeulich@novell.com
Tue Mar 29 16:10:00 GMT 2005
The thread starting at http://sourceware.org/ml/binutils/2003-01/msg00333.html points to an issue that I now also just ran into: In a statement like
.long sym - .
the relocation may be dropped only if sym is known to be static or ELF-global and protected/hidden/internal. This rule isn't getting observed, and according to the discussion back then this is mainly because gcc appearantly generates expressions incorrectly. Now, as in many other cases, I can understand (to a certain degree) that one wouldn't want to break handling gcc output, but on the other hand assembly programmers should have a way to get what public specifications allow. Hence I wonder whether this shouldn't be fixed (perhaps first in gcc, so that it doesn't reference non-static labels in expressions used for debug info generation, and then in gas), or whether there shouldn't alternatively be a mode gas could be put into to honor the ELF semantics in such expressions.
Thanks, Jan
More information about the Binutils
mailing list