This is an archive of the discontinued LLVM Phabricator instance.

[PPC32] Support TLS GD/LE/IE/LE relocation types and their relaxations
ClosedPublic

Authored by MaskRay on Jun 5 2019, 11:38 PM.

Event Timeline

MaskRay created this revision.Jun 5 2019, 11:38 PM
Herald added a project: Restricted Project. · View Herald Transcript
MaskRay updated this revision to Diff 203292.Jun 5 2019, 11:50 PM

Forgot to add ppc32-tls-gd.s

ruiu accepted this revision.Jun 5 2019, 11:51 PM

LGTM

ELF/Arch/PPC.cpp
345

nit: you can remove {}.

361

ditto

This revision is now accepted and ready to land.Jun 5 2019, 11:51 PM
plotfi added a subscriber: plotfi.EditedJun 6 2019, 10:54 AM

I am going to upload a fix to these tests. sed "s/# REQUIES: ppc/# REQUIRES: ppc/g"

Our internal bots fail with these.

Tests fixed. Everything should be passing now.

ruiu added a comment.Jun 7 2019, 2:49 AM

LGTM

lld/trunk/ELF/Arch/PPC.cpp
56 ↗(On Diff #203393)

nit: it may be easier to read if you change this to

if (Config->IsLE)
  return read32(Loc);
else
  return read32(Loc - 2);
60 ↗(On Diff #203393)

Ditto