## This test shows that llvm-objcopy does not baulk at overlapping sections ## where such sections are within segments. ## These don't really make sense, but the tool should still handle invalid ## inputs somehow. # RUN: yaml2obj %s -o %t.o ## First, check that the section header table appears immediately after the program ## header table. # RUN: llvm-readobj --file-headers %t.o | FileCheck %s --check-prefix=SHDRS-OFFSET # SHDRS-OFFSET: SectionHeaderOffset: 0x78{{$}} ## Binary edit the section header sh_offset field of the second section to ## overlap the first one. # RUN: %python -c "with open('%/t.o', 'r+b') as input: import struct; bytes = struct.pack('