This reverts commit r282021, bringing back r282015. The problem was that the comparison function was not a strict weak ordering anymore, which this patch fixes. Original message: Only restrict order if both sections are in the script. This matches gold and bfd behavior and is required to handle some scripts. The script has to assume where PT_LOADs start in order to align that spot. If we don't allow section it doesn't know about to move to the middle, we can need more PT_LOADs and those will not be aligned. llvm-svn: 282035
17 lines
482 B
ArmAsm
17 lines
482 B
ArmAsm
# REQUIRES: x86
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
|
|
|
|
# RUN: echo "SECTIONS { foo : {*(foo)} }" > %t.script
|
|
# RUN: ld.lld -o %t1 --script %t.script %t -shared
|
|
# RUN: llvm-readobj -elf-output-style=GNU -s %t1 | FileCheck %s
|
|
|
|
# CHECK: .dynsym {{.*}} A
|
|
# CHECK-NEXT: .hash {{.*}} A
|
|
# CHECK-NEXT: .dynstr {{.*}} A
|
|
# CHECK-NEXT: .text {{.*}} AX
|
|
# CHECK-NEXT: .dynamic {{.*}} WA
|
|
# CHECK-NEXT: foo {{.*}} WA
|
|
|
|
.section foo, "aw"
|
|
.byte 0
|