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.
7 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
8 # RUN: ld.lld --gc-sections --emit-relocs --icf=all %t.o -o %t
9 # RUN: llvm-readobj -r %t | FileCheck %s
11 # CHECK: Relocations [
12 # CHECK-NEXT: Section (3) .rela.text {
13 # CHECK-NEXT: R_X86_64_64 .text 0x11
14 # CHECK-NEXT: R_X86_64_64 .text 0x11
15 # CHECK-NEXT: R_X86_64_64 .rodata 0x0
23 .section .text.foo,"ax"
27 .section .text.bar,"ax"
31 .section .text.baz,"ax"