[rfc][patch] Refactoring how we handle symbols for the end of sections

Rafael Espíndola rafael.espindola at gmail.com
Tue Mar 17 14:29:01 PDT 2015


> I knew that this patch was correct, because AFAICS MC always will simplify the expression (it could have made sense to generate something like that if it could generate some kind of relocation). My broader question while investigating this was about the meaning of the doesDwarfUseRelocationsAcrossSections() predicate. It only returns true on Darwin, but I was wondering if it had a more precise semantic about where to generate relocations and where not to. Because there are quite a few places in the debug info generation where we could totally avoid creating MC symbols or expressions when on Darwin. For example the dwarf string table doesn’t need a MCSymbol per string in that case.

The meaning of it is that ld64/dsymutil knows part of the DWARF format
and expect offset to be used instead of relocations. Exactly which
parts of DWARF and therefore which relocations is fuzzy.

>
>> I just reused the Addr variables and added a test which checking it.
>>
>> Feel free to commit.
>
> I’ll be out of work for a few weeks for (happy) family reasons, thus I’ll gladly delegate that to Duncan or you.

I will commit it.

Thanks,
Rafael




More information about the llvm-commits mailing list