brintos

brintos / llvm-project-archived public Read only

0
0
Text · 779 B · 87e4ef5 Raw
42 lines · plain
1# REQUIRES: x862 3## On RELA targets, r_addend may be updated for --emit-relocs.4## With ICF, merged sections do not have output sections assigned.5## Test we don't crash.6 7# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o8# RUN: ld.lld --gc-sections --emit-relocs --icf=all %t.o -o %t9# RUN: llvm-readobj -r %t | FileCheck %s10 11# CHECK:      Relocations [12# CHECK-NEXT:   Section (3) .rela.text {13# CHECK-NEXT:     R_X86_64_64 .text 0x1114# CHECK-NEXT:     R_X86_64_64 .text 0x1115# CHECK-NEXT:     R_X86_64_64 .rodata 0x016# CHECK-NEXT:   }17# CHECK-NEXT: ]18 19.rodata20quux:21.quad 0xfe22 23.section .text.foo,"ax"24foo:25.quad quux26 27.section .text.bar,"ax"28bar:29.quad quux30 31.section .text.baz,"ax"32baz:33.quad quux34 35.text36.quad foo37.quad bar38 39.global _start40_start:41  nop42