This is PR33596. Previously LLD would crash because BYTE command synthesized output section, but it was not assigned to Sec member of OutputSectionCommand. Behaviour of -script and -r combination is not well defined, but it seems after this change LLD naturally inherits behavior of GNU linkers - creates output section requested in script and does not crash anymore. Differential revision: https://reviews.llvm.org/D34676 llvm-svn: 306527
8 lines
269 B
ArmAsm
8 lines
269 B
ArmAsm
# REQUIRES: x86
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux -o %t1.o %s
|
|
# RUN: echo "SECTIONS { .foo : { BYTE(0x0) } }" > %t.script
|
|
# RUN: ld.lld -r %t1.o -script %t.script -o %t2.o
|
|
# RUN: llvm-readobj -sections %t2.o | FileCheck %s
|
|
|
|
# CHECK: Name: .foo
|