Page MenuHomePhabricator

Don't set dso_local flag in LTO resolutions for absolute symbols defined in ELF objects
ClosedPublic

Authored by dmikulin on Feb 6 2018, 11:00 AM.

Details

Summary

Setting dso_local flag for absolute symbols defined in real ELF objects forces codegen to make incorrect assumptions about code sequences it can use to access those symbols. It leads to linker errors:
ld.lld: error: relocation R_X86_64_PC32 cannot refer to absolute symbol: blah

defined in a.o
referenced by ld-temp.o

lto.tmp:(_start)

Diff Detail

Repository
rL LLVM

Event Timeline

dmikulin created this revision.Feb 6 2018, 11:00 AM
dmikulin updated this revision to Diff 133090.Feb 6 2018, 3:04 PM

Addressed review comments

dmikulin updated this revision to Diff 133096.Feb 6 2018, 3:46 PM

Minor tweaks.

This revision was not accepted when it landed; it landed in state Needs Review.Feb 6 2018, 4:51 PM
This revision was automatically updated to reflect the committed changes.