[llvm] r239552 - Generalize emitAbsoluteSymbolDiff.

Frédéric Riss friss at apple.com
Thu Jun 11 12:26:01 PDT 2015


> On Jun 11, 2015, at 12:19 PM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
> 
>> When Duncan was working on this I was wondering if it couldn’t be generalized. I thought the ELF linkers relied on the relocations this would generate eg. for strings in the dwarf_str section. I guess all the strings will be in the same fragment. Without relocations, how can a standard ELF linker rewrite the references to the dwarf_str section when combining multiple input files?
> 
> The elf linker needs a relocation if one section refers to another. If
> two symbols are in different sections, then they are in different
> fragments.
> 
> So the case of dwarf_str, only if the two symbols are in dwarf_str
> would this function avoid creating the expression.

Sorry for the noise. I thought the logic that did a difference between the string symbol and the start of section symbol was common to all platforms. I see that ELF will emits directly the string symbol which makes it totally irrelevant to this patch :-)

Fred



More information about the llvm-commits mailing list