[lld] Test corrections after 3f1a9b7eca added segment names to objdump output

This commit is contained in:
Daniel Sanders 2020-09-04 10:26:09 -07:00
parent dde16ef031
commit 8760048384
8 changed files with 15 additions and 15 deletions

View File

@ -11,12 +11,12 @@
## Check that the GOT references the cstrings. --full-contents displays the
## address offset and the contents at that address very similarly, so am using
## --match-full-lines to make sure we match on the right thing.
# CHECK: Contents of section __cstring:
# CHECK: Contents of section __TEXT,__cstring:
# CHECK-NEXT: 10000040c {{.*}}
## 1st 8 bytes refer to the start of __cstring + 0xe, 2nd 8 bytes refer to the
## start of __cstring
# CHECK: Contents of section __got:
# CHECK: Contents of section __DATA_CONST,__got:
# CHECK-NEXT: [[#%X,ADDR:]] 1a040000 01000000 0c040000 01000000 {{.*}}
# CHECK-NEXT: [[#ADDR + 16]] 00000000 00000000 {{.*}}

View File

@ -20,7 +20,7 @@
# CHECK-NEXT: [[#%x, CSTRING_ADDR + 22 - LSTR_OFF]]
# RUN: llvm-objdump --section=__const --full-contents %t | FileCheck %s --check-prefix=NONPCREL
# NONPCREL: Contents of section __const:
# NONPCREL: Contents of section __DATA,__const:
# NONPCREL-NEXT: 100001000 f0030000 01000000 f0030000 01000000
.section __TEXT,__text

View File

@ -10,13 +10,13 @@
# RUN: -o %t %t.o
# RUN: llvm-objdump -s %t | FileCheck %s
# CHECK: Contents of section __text:
# CHECK: Contents of section __data:
# CHECK: Contents of section __TEXT,__text:
# CHECK: Contents of section __DATA,__data:
# CHECK: my string!.
# CHECK: Contents of section SEC1:
# CHECK: Contents of section SEG,SEC1:
# CHECK: -sectcreate 1.1.
# CHECK: -sectcreate 1.2.
# CHECK: Contents of section SEC2:
# CHECK: Contents of section SEG,SEC2:
# CHECK: -sectcreate 2.
.text

View File

@ -15,7 +15,7 @@
# CHECK-DAG: {{0*}}[[#ADDR+0x8]] g O __DATA,__data _baz
# CHECK-DAG: {{0*}}[[#ADDR+0x9]] g O __DATA,__data _qux
# CHECK: Contents of section __data:
# CHECK: Contents of section __DATA,__data:
# CHECK-NEXT: {{0*}}[[#ADDR]] ca000000 fe000000 baefbead de000000
.section __TEXT,__text

View File

@ -7,13 +7,13 @@
# RUN: llvm-objdump -d --no-show-raw-insn --bind --lazy-bind --weak-bind --full-contents %t/test | \
# RUN: FileCheck %s
# CHECK: Contents of section __la_symbol_ptr:
# CHECK: Contents of section __DATA,__la_symbol_ptr:
## Check that this section contains a nonzero pointer. It should point to
## _weak_external_fn, but we don't have a good way of testing the exact value as
## the bytes here are in little-endian order.
# CHECK-NEXT: {{[0-9a-f]+}} {{[0-9a-f ]*[1-9a-f]+[0-9a-f ]*}}
# CHECK: Contents of section __got:
# CHECK: Contents of section __DATA_CONST,__got:
## Check that this section contains a nonzero pointer. It should point to
## _weak_external_for_gotpcrel.
# CHECK-NEXT: {{[0-9a-f]+}} {{[0-9a-f ]*[1-9a-f]+[0-9a-f ]*}}

View File

@ -2,9 +2,9 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o
# RUN: lld -flavor darwinnew -o %t %t.o
# RUN: llvm-objdump --full-contents %t | FileCheck %s
# CHECK: Contents of section foo:
# CHECK: Contents of section __DATA,foo:
# CHECK: 100001000 08100000 01000000
# CHECK: Contents of section bar:
# CHECK: Contents of section __DATA,bar:
# CHECK: 100001008 011000f0 11211111 02000000
.globl _main, _foo, _bar

View File

@ -194,7 +194,7 @@ page-size: 0x00000000
# Also make sure the reloc for the FDE->function is the correct offset
# It should be the offset from the fixup location back to the address
# of the function we are referencing
# CODE: Contents of section __eh_frame:
# CODE: Contents of section __TEXT,__eh_frame:
# This is the CIE:
# CODE-NEXT: {{[0-9abcdef]*}} 1c000000 00000000 017a504c 52000178
# CODE-NEXT: {{[0-9abcdef]*}} 1e0700bd ffffffff ffffff00 100c1f00

View File

@ -303,7 +303,7 @@ page-size: 0x00000000
# correct offset
# It should be the offset from the fixup location back to the address
# of the function we are referencing
# CODE: Contents of section __eh_frame:
# CODE: Contents of section __TEXT,__eh_frame:
# This is the CIE:
# CODE-NEXT: {{[0-9abcdef]*}} 18000000 00000000 037a504c 52000178
# CODE-NEXT: {{[0-9abcdef]*}} 1e079bd1 ffffff10 100c1f00 28000000
@ -315,4 +315,4 @@ page-size: 0x00000000
# And a new CIE starts at this 00000018 right below here
# CODE-NEXT: {{[0-9abcdef]*}} 019d0200 00000000 18000000 00000000
# CODE-NEXT: {{[0-9abcdef]*}} 037a504c 52000178 1e079b8d ffffff10
# This is the important offset for its CIE->pfunc ^~~~~~~~~
# This is the important offset for its CIE->pfunc ^~~~~~~~~