[PATCH] change the condition preventing symbol replacement in snapshot_symbol()
Jan Beulich
JBeulich@novell.com
Fri Jul 24 15:37:00 GMT 2009
More information about the Binutils mailing list
Fri Jul 24 15:37:00 GMT 2009
- Previous message (by thread): [PATCH] change the condition preventing symbol replacement in snapshot_symbol()
- Next message (by thread): [PATCH] change the condition preventing symbol replacement in snapshot_symbol()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>>> "H.J. Lu" <hjl.tools@gmail.com> 24.07.09 16:56 >>> >On Fri, Jul 24, 2009 at 7:35 AM, Jan Beulich<JBeulich@novell.com> wrote: >> As the new ltoff22x-6 test shows, using the defined-ness of a symbol to >> decide whether to replace it is not correct - whether the symbol gets >> defined before or after the use shouldn't matter. What does matter is >> whether the symbol is global (and hence can, e.g. with ELF, be >> overridden) - it's that case where replacement should be avoided in >> order to not screw up the resulting relocations. >> >> ltoff22x-7 exposes another issue (mailed about yesterday) in that for >> equates of undefined global symbols resolve_symbol_value() will still >> cause the referenced symbol to be used rather than the original one, >> regardless of whether the original symbol is externally visible. The >> test therefore is an xfail for the time being, until I hear back on >> that issue. >> >> gas/ >> 2009-07-24 Jan Beulich <jbeulich@novell.com> >> >> * symbols.c (snapshot_symbol): Check whether the to be replaced >> symbol is global, rather than whether the replacement symbol is >> defined. >> > >I think it may be wrong. We can have > >.globl foo >bar = foo > >where foo is defined/global and bar is local. Will you replace foo with >bar? No, only the other way around: bar (non-global) can be replaced by foo. Jan
- Previous message (by thread): [PATCH] change the condition preventing symbol replacement in snapshot_symbol()
- Next message (by thread): [PATCH] change the condition preventing symbol replacement in snapshot_symbol()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list