This is an archive of the discontinued LLVM Phabricator instance.

[LLD] Use Rela on PowerPC too
ClosedPublic

Authored by comex on Dec 4 2017, 9:50 PM.

Details

Summary

The spec for ELF on PowerPC:
http://refspecs.linux-foundation.org/elf/elfspec_ppc.pdf
says:
"The PowerPC family uses only the Elf32_Rela relocation entries with explicit addends."

(EM_PPC64 should be covered by Config->Is64 already.)

Diff Detail

Repository
rLLD LLVM Linker

Event Timeline

comex created this revision.Dec 4 2017, 9:50 PM
ruiu edited edge metadata.Dec 4 2017, 10:02 PM

Thank you for the patch!

How did you find it? Can you write a test?

comex updated this revision to Diff 130799.Jan 21 2018, 12:06 AM

Sorry for the delay; here's an updated diff with a test. (The test didn't seem to clearly belong in any existing .s file I saw, so I just made a new one.)

espindola accepted this revision.Jan 29 2018, 7:53 AM
espindola added a subscriber: espindola.

LGTM. Do you have commit access?

This revision is now accepted and ready to land.Jan 29 2018, 7:53 AM
This revision was automatically updated to reflect the committed changes.