This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Support X86_64_RELOC_BRANCH
ClosedPublic

Authored by int3 on Apr 15 2020, 9:45 PM.

Details

Summary

Relatively straightforward diff, to set the stage for calling functions
in dylibs.

Depends on D78168.

Diff Detail

Event Timeline

int3 created this revision.Apr 15 2020, 9:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 15 2020, 9:45 PM
smeenai accepted this revision.Apr 23 2020, 6:36 PM

LGTM

lld/test/MachO/relocations.s
6–17

I really like the offset checking :)

This revision is now accepted and ready to land.Apr 23 2020, 6:36 PM
MaskRay accepted this revision.Apr 27 2020, 2:18 PM
MaskRay added inline comments.
lld/test/MachO/relocations.s
7

# CHECK:

10

# CHECK:

MaskRay added inline comments.Apr 27 2020, 2:20 PM
lld/test/MachO/relocations.s
12

Consider changing Disassembly of section __TEXT,__text: to something like CHECK-LABEL: <_main>:

It is obvious that the code is in __TEXT,__text: so the information adds very little value. On the contrary, <_main>: conveys a bit more useful information.

int3 marked 4 inline comments as done.Apr 28 2020, 11:08 PM
int3 added inline comments.
lld/test/MachO/relocations.s
7

The -DAG was so that future entries could be added w/o changing this line, but sure

int3 updated this revision to Diff 260843.Apr 28 2020, 11:08 PM
int3 marked an inline comment as done.

address comments

This revision was automatically updated to reflect the committed changes.