[PATCH] D71647: [llvm-objcopy][MachO] Handle relocation entries where r_extern is 0
Seiya Nuta via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 20 02:11:28 PST 2019
seiya marked 2 inline comments as done.
seiya added inline comments.
================
Comment at: llvm/test/tools/llvm-objcopy/MachO/copy-relocations.s:10
+# RUN: llvm-objcopy --remove-section=__DATA,__foo %t %t3
+# RUN: llvm-objdump --macho --reloc %t3 | FileCheck %s
+
----------------
MaskRay wrote:
> Is `--macho` needed?
It prints relocation fields in detail. It looks easier to read to me.
```
$ llvm-objdump --macho --reloc copy-relocs.o
copy-relocs.o:
Relocation information (__DATA,__bar) 2 entries
address pcrel length extern type scattered symbolnum/value
00000000 False quad False SUB False 3 (__DATA,__bar)
00000000 False quad False UNSIGND False 1 (__TEXT,__text)
```
```
$ llvm-objdump --reloc copy-relocs.o
copy-relocs.o: file format Mach-O 64-bit x86-64
RELOCATION RECORDS FOR [__bar]:
0000000000000000 X86_64_RELOC_SUBTRACTOR __text-__bar
0000000000000000 X86_64_RELOC_UNSIGNED __text
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71647/new/
https://reviews.llvm.org/D71647
More information about the llvm-commits
mailing list