brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.8 KiB · 2ee1e76 Raw
76 lines · plain
1# REQUIRES: x86, zlib2# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o3# RUN: ld.lld -r -o %t %t.o %t.o4# RUN: llvm-readelf -r -x .data -x .bar -x .debug_line %t | FileCheck --check-prefix=RELA %s5 6# RELA:         Offset          Info         Type               Symbol's Value  Symbol's Name + Addend7# RELA-NEXT:  0000000000000000  {{.*}} R_X86_64_32            0000000000000000 .text + 18# RELA-NEXT:  0000000000000004  {{.*}} R_X86_64_32            0000000000000000 .text + 59# RELA-EMPTY:10# RELA:         Offset          Info         Type               Symbol's Value  Symbol's Name + Addend11# RELA-NEXT:  0000000000000000  {{.*}} R_X86_64_64            0000000000000000 .foo + 112# RELA-NEXT:  0000000000000008  {{.*}} R_X86_64_32            0000000000000000 .text + 013# RELA-NEXT:  000000000000000c  {{.*}} R_X86_64_64            0000000000000000 .foo + 214# RELA-NEXT:  0000000000000014  {{.*}} R_X86_64_32            0000000000000000 .text + 415# RELA-EMPTY:16# RELA:         Offset          Info         Type               Symbol's Value  Symbol's Name + Addend17# RELA-NEXT:  0000000000000000  {{.*}} R_X86_64_64            0000000000000000 .foo + 118# RELA-NEXT:  0000000000000008  {{.*}} R_X86_64_32            0000000000000000 .text + 019# RELA-NEXT:  000000000000000c  {{.*}} R_X86_64_64            0000000000000000 .foo + 220# RELA-NEXT:  0000000000000014  {{.*}} R_X86_64_32            0000000000000000 .text + 421 22# RELA:       Hex dump of section '.data':23# RELA-NEXT:  0x00000000 00000000 00000000                   ........24# RELA:       Hex dump of section '.bar':25# RELA-NEXT:  0x00000000 00000000 00000000 00000000 00000000 ................26# RELA-NEXT:  0x00000010 00000000 00000000                   ........27# RELA:       Hex dump of section '.debug_line':28# RELA-NEXT:  0x00000000 00000000 00000000 00000000 00000000 ................29# RELA-NEXT:  0x00000010 00000000 00000000                   ........30 31# RUN: llvm-mc -filetype=obj -triple=i686 %s -o %t1.o32# RUN: ld.lld -r -o %t1 %t1.o %t1.o33# RUN: llvm-readelf -r -x .data -x .bar -x .debug_line %t1 | FileCheck %s --check-prefix=REL34## https://github.com/llvm/llvm-project/issues/66738 Update implicit addends for -r and --compress-debug-sections35# RUN: ld.lld -r --compress-debug-sections=zlib -o %t1.zlib %t1.o %t1.o36# RUN: llvm-objcopy --decompress-debug-sections %t1.zlib %t1.zlib.de37# RUN: llvm-readelf -r -x .data -x .bar -x .debug_line %t1.zlib.de | FileCheck %s --check-prefix=REL38 39# REL:         Offset   Info   Type                Sym. Value  Symbol's Name40# REL-NEXT:  00000000  {{.*}} R_386_32               00000000   .text41# REL-NEXT:  00000004  {{.*}} R_386_32               00000000   .text42# REL-EMPTY:43# REL:        Offset    Info   Type                Sym. Value  Symbol's Name44# REL-NEXT:  00000000  {{.*}} R_386_32               00000000   .foo45# REL-NEXT:  00000004  {{.*}} R_386_32               00000000   .text46# REL-NEXT:  00000008  {{.*}} R_386_32               00000000   .foo47# REL-NEXT:  0000000c  {{.*}} R_386_32               00000000   .text48# REL-EMPTY:49# REL:         Offset   Info   Type                Sym. Value  Symbol's Name50# REL-NEXT:  00000000  {{.*}} R_386_32               00000000   .foo51# REL-NEXT:  00000004  {{.*}} R_386_32               00000000   .text52# REL-NEXT:  00000008  {{.*}} R_386_32               00000000   .foo53# REL-NEXT:  0000000c  {{.*}} R_386_32               00000000   .text54 55# REL:       Hex dump of section '.data':56# REL-NEXT:  0x00000000 01000000 05000000                   ........57# REL:       Hex dump of section '.bar':58# REL-NEXT:  0x00000000 01000000 00000000 02000000 04000000 ................59# REL:       Hex dump of section '.debug_line':60# REL-NEXT:  0x00000000 01000000 00000000 02000000 04000000 ................61 62.long 4263.data64.long .text + 165 66.section .foo67.byte 068 69.section .bar70.dc.a .foo + 171.dc.l .text72 73.section .debug_line74.dc.a .foo + 175.dc.l .text76