[PATCH] MC: For variable symbols, maintain MCSymbol::Section as a cache.
Peter Collingbourne
peter at pcc.me.uk
Tue Mar 24 16:46:18 PDT 2015
In http://reviews.llvm.org/D8586#146453, @grosbach wrote:
> There's not enough information in the description for me to go on. Which edge cases? How/why were they wrong before?
test/MC/ELF/alias.s shows one specific test case that was problematic before. The problem was that .Llocal1 was given external linkage despite being a local symbol. The new code correctly does not create a symbol for .Llocal1.
> For example, the fact that this patch changes the results in the MachO test concerns me. Why are the old values incorrect and the new ones correct? The first two changes look like it's a difference in order of what's in the object file, which is probably fine, but alias_to_local refers to __data now where before it did not. Why?
The previous output showed that alias_to_local was given a section of 0, which was incorrect because a section value of 0 indicates that the symbol is defined externally. The new code correctly resolves the section to __data which is where alias_to_local's referent .Ltmp0 is defined.
http://reviews.llvm.org/D8586
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list