1# REQUIRES: x86, zlib 2 3# RUN: echo "SECTIONS { \ 4# RUN: .text : { . += 0x10; *(.text) } \ 5# RUN: .debug_str : { . += 0x10; *(.debug_str) } \ 6# RUN: .debug_info : { . += 0x10; *(.debug_info) } \ 7# RUN: }" > %t.script 8 9# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o 10# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %S/../Inputs/compress-debug.s -o %t2.o 11# RUN: ld.lld %t2.o %t.o -o %t1 --compress-debug-sections=zlib -T %t.script 12# RUN: llvm-dwarfdump %t1 -debug-str | FileCheck %s 13# These two checks correspond to the patched values of a_sym and a_debug_sym. 14# T = 0x54 - address of .text input section for this file (the start address of 15# .text is 0 by default, the size of the preceding .text in the other input 16# file is 0x44, and the linker script adds an additional 0x10). 17# S = 0x53 - offset of .debug_info section for this file (the size of 18# the preceding .debug_info from the other input file is 0x43, and the 19# linker script adds an additional 0x10). 20# Also note that the .debug_str offsets are also offset by 0x10, as directed by 21# the linker script. 22# CHECK: 0x00000010: "T" 23# CHECK: 0x00000014: "S" 24 25.text 26a_sym: 27nop 28 29.section .debug_str,"MS",@progbits,1 30.long a_sym 31.long a_debug_sym 32 33.section .debug_info,"",@progbits 34a_debug_sym: 35.long 0x88776655 36