This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]