This is an archive of the discontinued LLVM Phabricator instance.

[PPC64] Support the General-Dynamic tls relocations
ClosedPublic

Authored by sfertile on May 24 2018, 6:59 AM.

Details

Diff Detail

Repository
rLLD LLVM Linker

Event Timeline

sfertile created this revision.May 24 2018, 6:59 AM
sfertile updated this revision to Diff 148449.EditedMay 24 2018, 10:53 AM

Renamed the test and fixed several places where I used global-dynamic instead of`general-dynamic`.
Added run steps to the test to run on BE as well as LE.

sfertile added inline comments.May 24 2018, 11:47 AM
ELF/InputSection.cpp
634

Should R_TLSGD be renamed to R_TLSGD_END (likewise for R_TLSLD) to match the other RelExprs that subtract the got size off of the TargetVA? I could do this in a separate nfc patch.

ruiu added a comment.May 24 2018, 1:49 PM

Generally looking good, it needs a bit more time to understand the test though.

ELF/Arch/PPC64.cpp
222

extra space

ELF/InputSection.cpp
634

Yeah, I think so.

Generally looking good, it needs a bit more time to understand the test though.

The test function is the typical General-Dynamic access sequence clang will produce. The other 2 functions are sort of tacked on simply as a way to test that we evaluate the other 2 relocations that I add but aren't used in the 'test' function.

sfertile updated this revision to Diff 148836.May 28 2018, 12:34 PM

Fixed extra space.

sfertile marked an inline comment as done.May 28 2018, 12:35 PM
ruiu accepted this revision.May 28 2018, 1:37 PM

LGTM

This revision is now accepted and ready to land.May 28 2018, 1:37 PM
This revision was automatically updated to reflect the committed changes.