This is an archive of the discontinued LLVM Phabricator instance.

[ELF2/AArch64] Add support for R_AARCH64_CALL26 and R_AARCH64_JUMP26.
ClosedPublic

Authored by ikudrin on Nov 12 2015, 3:41 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

ikudrin updated this revision to Diff 40023.Nov 12 2015, 3:41 AM
ikudrin retitled this revision from to [ELF2/AArch64] Add support for R_AARCH64_CALL26 and R_AARCH64_JUMP26..
ikudrin updated this object.
ikudrin added reviewers: davide, ruiu, rafael.
ikudrin added a project: lld.
ikudrin added a subscriber: llvm-commits.
davide added inline comments.Nov 12 2015, 9:27 AM
ELF/Target.cpp
673 ↗(On Diff #40023)

You can use or32le, no?

test/elf2/aarch64-relocs.s
62 ↗(On Diff #40023)

Do you need the first nop?

ruiu added inline comments.Nov 12 2015, 9:55 AM
ELF/Target.cpp
669–672 ↗(On Diff #40023)

I'd do this

if (!isInt<28>(X)) {
  if (Type == R_AARCH64_JUMP26)
    error("Relocation R_AARCH64_JUMP26 out of range");
  error("Relocation R_AARCH64_CALL26 out of range");
}
ikudrin added inline comments.Nov 12 2015, 5:48 PM
test/elf2/aarch64-relocs.s
62 ↗(On Diff #40023)

It's just to make things a bit more interesting with a non-zero addend.

davide accepted this revision.Nov 12 2015, 5:51 PM
davide edited edge metadata.

Fine, looks good once you addressed other comments.

This revision is now accepted and ready to land.Nov 12 2015, 5:51 PM
This revision was automatically updated to reflect the committed changes.