This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
relocations dropped for differences involving weak orELF-global symbols
- From: "Jan Beulich" <JBeulich at novell dot com>
- To: <binutils at sources dot redhat dot com>
- Date: Tue, 29 Mar 2005 16:08:41 +0200
- Subject: relocations dropped for differences involving weak orELF-global symbols
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