This is an archive of the discontinued LLVM Phabricator instance.

[MC] Set addrsig symbol as weak/weakExternal
AbandonedPublic

Authored by zequanwu on Apr 21 2021, 1:13 PM.

Details

Reviewers
MaskRay
pcc
rnk
Summary

No all symbols in .addrsig table have definitions. So, setting them as weak to avoid undefined symbol error during linking.

Diff Detail

Event Timeline

zequanwu created this revision.Apr 21 2021, 1:13 PM
zequanwu requested review of this revision.Apr 21 2021, 1:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 21 2021, 1:13 PM
pcc added a comment.Apr 21 2021, 1:24 PM

Wouldn't this make all address significant symbols weak external?

The intent is that we don't emit additional symbols if the address significance table is enabled (see e.g. the call to GV.use_empty() before calling emitAddrsigSym in llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp). If you're still seeing undefined symbols with that, I think we need to make that condition more powerful instead.

zequanwu abandoned this revision.Apr 28 2021, 9:42 PM