This is an archive of the discontinued LLVM Phabricator instance.

[ORC] Set useNamesOnTempLabels as true when emiting object code
AbandonedPublic

Authored by StephenFan on Dec 31 2021, 1:15 AM.

Details

Summary

As far as I known, In JITLink's linkgraph, every defined symbol must need a name.

In RISCV, some temp symbols will be emitted in object code's symbol table. Because RISCV needs to use these temp symbols to do something like generating dwarf, eh_frame sections... Unfortunately, these temp symbols is unnamed.

To solve this contradiction, I want to set the useNamesOnTempLabels as true in addPassesToEmitMC

Diff Detail

Event Timeline

StephenFan created this revision.Dec 31 2021, 1:15 AM
StephenFan requested review of this revision.Dec 31 2021, 1:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 31 2021, 1:15 AM
StephenFan edited the summary of this revision. (Show Details)Dec 31 2021, 1:23 AM

Hi Stephen,

JITLink can handle anonymous symbols: Just use LinkGraph::addAnonymousSymbol. It would be better to use this than to change object emission for the sake of JITLink -- we want to be able to load objects not generated by LLVM.

  • Lang.

Hi Stephen,

JITLink can handle anonymous symbols: Just use LinkGraph::addAnonymousSymbol. It would be better to use this than to change object emission for the sake of JITLink -- we want to be able to load objects not generated by LLVM.

  • Lang.

Thanks for your suggestion! @lhames

I have submitted a new patch D116475.

StephenFan abandoned this revision.Jan 1 2022, 7:19 AM