This CL places .dynsym and .dynstr at the beginning of SHF_ALLOC sections. We do this to mitigate the possibility that huge .dynsym and .dynstr sections placed between ro-data and text sections cause relocation overflow. Differential Revision: https://reviews.llvm.org/D45788 llvm-svn: 332374
24 lines
620 B
Plaintext
24 lines
620 B
Plaintext
# REQUIRES: x86
|
|
|
|
# RUN: echo '.section .text,"ax"; .quad 0' > %t.s
|
|
# RUN: echo '.section .foo,"ax"; .quad 0' >> %t.s
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %t.s -o %t.o
|
|
# RUN: ld.lld --hash-style=sysv -o %t1 --script %s \
|
|
# RUN: %t.o -shared
|
|
# RUN: llvm-readobj -elf-output-style=GNU -l %t1 | FileCheck %s
|
|
|
|
# CHECK: Segment Sections...
|
|
# CHECK-NEXT: 00 .text .hash .dynamic
|
|
# CHECK-NEXT: 01 .bar .dynsym .dynstr .foo
|
|
|
|
PHDRS {
|
|
ph_write PT_LOAD FLAGS(2);
|
|
ph_exec PT_LOAD FLAGS(1);
|
|
}
|
|
|
|
SECTIONS {
|
|
.bar : { *(.bar) } : ph_exec
|
|
.foo : { *(.foo) }
|
|
.text : { *(.text) } : ph_write
|
|
}
|