diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-12 00:17:33 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-04-12 00:17:33 +0000 |
commit | e292347503cd7598429c08f9984ab3e0a44ab8a3 (patch) | |
tree | 95a231a9f2d14de9a5043f87149698c3786a631c /test/tools/llvm-readobj | |
parent | 33c55bdfed027313b05217d7049aa0e810da5caa (diff) | |
download | external_llvm-e292347503cd7598429c08f9984ab3e0a44ab8a3.zip external_llvm-e292347503cd7598429c08f9984ab3e0a44ab8a3.tar.gz external_llvm-e292347503cd7598429c08f9984ab3e0a44ab8a3.tar.bz2 |
Add 179294 back, but don't use bit fields so that it works on big endian hosts.
Original message:
Print more information about relocations.
With this patch llvm-readobj now prints if a relocation is pcrel, its length,
if it is extern and if it is scattered.
It also refactors the code a bit to use bit fields instead of shifts and
masks all over the place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179345 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/tools/llvm-readobj')
-rw-r--r-- | test/tools/llvm-readobj/relocations.test | 14 | ||||
-rw-r--r-- | test/tools/llvm-readobj/sections-ext.test | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/test/tools/llvm-readobj/relocations.test b/test/tools/llvm-readobj/relocations.test index b4b876a..96aac23 100644 --- a/test/tools/llvm-readobj/relocations.test +++ b/test/tools/llvm-readobj/relocations.test @@ -26,17 +26,17 @@ ELF-NEXT: ] MACHO-I386: Relocations [ MACHO-I386-NEXT: Section __text { -MACHO-I386-NEXT: 0x18 GENERIC_RELOC_VANILLA _SomeOtherFunction 0x0 -MACHO-I386-NEXT: 0x13 GENERIC_RELOC_VANILLA _puts 0x0 -MACHO-I386-NEXT: 0xB GENERIC_RELOC_LOCAL_SECTDIFF _main 0x{{[0-9A-F]+}} -MACHO-I386-NEXT: 0x0 GENERIC_RELOC_PAIR _main 0x{{[0-9A-F]+}} +MACHO-I386-NEXT: 0x18 1 2 1 GENERIC_RELOC_VANILLA 0 _SomeOtherFunction +MACHO-I386-NEXT: 0x13 1 2 1 GENERIC_RELOC_VANILLA 0 _puts +MACHO-I386-NEXT: 0xB 0 2 n/a GENERIC_RELOC_LOCAL_SECTDIFF 1 _main +MACHO-I386-NEXT: 0x0 0 2 n/a GENERIC_RELOC_PAIR 1 _main MACHO-I386-NEXT: } MACHO-I386-NEXT: ] MACHO-X86-64: Relocations [ MACHO-X86-64-NEXT: Section __text { -MACHO-X86-64-NEXT: 0xE X86_64_RELOC_BRANCH _SomeOtherFunction 0x0 -MACHO-X86-64-NEXT: 0x9 X86_64_RELOC_BRANCH _puts 0x0 -MACHO-X86-64-NEXT: 0x4 X86_64_RELOC_SIGNED L_.str 0x0 +MACHO-X86-64-NEXT: 0xE 1 2 1 X86_64_RELOC_BRANCH 0 _SomeOtherFunction +MACHO-X86-64-NEXT: 0x9 1 2 1 X86_64_RELOC_BRANCH 0 _puts +MACHO-X86-64-NEXT: 0x4 1 2 1 X86_64_RELOC_SIGNED 0 L_.str MACHO-X86-64-NEXT: } MACHO-X86-64-NEXT:] diff --git a/test/tools/llvm-readobj/sections-ext.test b/test/tools/llvm-readobj/sections-ext.test index a16bca2..a12d9e4 100644 --- a/test/tools/llvm-readobj/sections-ext.test +++ b/test/tools/llvm-readobj/sections-ext.test @@ -153,10 +153,10 @@ MACHO-I386-NEXT: ] MACHO-I386-NEXT: Reserved1: 0x0 MACHO-I386-NEXT: Reserved2: 0x0 MACHO-I386-NEXT: Relocations [ -MACHO-I386-NEXT: 0x18 GENERIC_RELOC_VANILLA _SomeOtherFunction 0x0 -MACHO-I386-NEXT: 0x13 GENERIC_RELOC_VANILLA _puts 0x0 -MACHO-I386-NEXT: 0xB GENERIC_RELOC_LOCAL_SECTDIFF _main 0x{{[0-9A-F]+}} -MACHO-I386-NEXT: 0x0 GENERIC_RELOC_PAIR _main 0x{{[0-9A-F]+}} +MACHO-I386-NEXT: 0x18 1 2 1 GENERIC_RELOC_VANILLA 0 _SomeOtherFunction +MACHO-I386-NEXT: 0x13 1 2 1 GENERIC_RELOC_VANILLA 0 _puts +MACHO-I386-NEXT: 0xB 0 2 n/a GENERIC_RELOC_LOCAL_SECTDIFF 1 _main +MACHO-I386-NEXT: 0x0 0 2 n/a GENERIC_RELOC_PAIR 1 _main MACHO-I386-NEXT: ] MACHO-I386-NEXT: Symbols [ MACHO-I386-NEXT: Symbol { @@ -196,9 +196,9 @@ MACHO-X86-64-NEXT: ] MACHO-X86-64-NEXT: Reserved1: 0x0 MACHO-X86-64-NEXT: Reserved2: 0x0 MACHO-X86-64-NEXT: Relocations [ -MACHO-X86-64-NEXT: 0xE X86_64_RELOC_BRANCH _SomeOtherFunction 0x0 -MACHO-X86-64-NEXT: 0x9 X86_64_RELOC_BRANCH _puts 0x0 -MACHO-X86-64-NEXT: 0x4 X86_64_RELOC_SIGNED L_.str 0x0 +MACHO-X86-64-NEXT: 0xE 1 2 1 X86_64_RELOC_BRANCH 0 _SomeOtherFunction +MACHO-X86-64-NEXT: 0x9 1 2 1 X86_64_RELOC_BRANCH 0 _puts +MACHO-X86-64-NEXT: 0x4 1 2 1 X86_64_RELOC_SIGNED 0 L_.str MACHO-X86-64-NEXT: ] MACHO-X86-64-NEXT: Symbols [ MACHO-X86-64-NEXT: Symbol { |