1 ## This test shows that llvm-objcopy does not baulk at overlapping sections
2 ## where such sections are within segments.
3 ## These don't really make sense, but the tool should still handle invalid
5 # RUN: yaml2obj %s -o %t.o
7 ## Check that the contents are as expected before the copy.
8 # RUN: llvm-readobj -x .first -x .second %t.o | FileCheck %s --check-prefix=CONTENTS
10 ## Now check that the section contents are still correct after the copy and show that
11 ## llvm-objcopy hasn't "unoverlapped" these sections because they are in segments.
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: 0x1001
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