1 ## This test shows that llvm-objcopy does not baulk at overlapping sections.
2 ## These don't really make sense, but the tool should still handle invalid
4 # RUN: yaml2obj %s -o %t.o
6 ## Check that the contents are as expected before the copy.
7 # RUN: llvm-readobj -x .first -x .second %t.o | FileCheck %s --check-prefix=CONTENTS
9 ## Now check that the section contents are still correct after the copy.
10 ## Also characterize the behavior of llvm-objcopy in that it "unoverlaps" the
12 # RUN: llvm-objcopy %t.o %t2.o
13 # RUN: llvm-readobj --section-headers %t2.o | FileCheck %s
14 # RUN: llvm-readobj -x .first -x .second %t2.o | FileCheck %s --check-prefix=CONTENTS
17 # CHECK: Offset: 0x1000
18 # CHECK: Name: .second
19 # CHECK: Offset: 0x1004
21 # CONTENTS: Hex dump of section '.first':
22 # CONTENTS-NEXT: 0x00000000 01234567
24 # CONTENTS-NEXT: Hex dump of section '.second':
25 # CONTENTS-NEXT: 0x00000000 23456789