Ported the D64906 technique to EM_386. If `sh_addralign(.tdata) < sh_addralign(.tbss)`, we can potentially make `p_vaddr(PT_TLS)%p_align(PT_TLS) != 0`. ld.so that are known to have problems if p_vaddr%p_align!=0: * FreeBSD 13.0-CURRENT rtld-elf * glibc https://sourceware.org/bugzilla/show_bug.cgi?id=24606 New test i386-tls-vaddr-align.s checks our workaround makes p_vaddr%p_align = 0. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D65865 llvm-svn: 369347
18 lines
451 B
ArmAsm
18 lines
451 B
ArmAsm
# REQUIRES: x86
|
|
# RUN: llvm-mc -filetype=obj -triple=i686-pc-linux %s -o %t.o
|
|
# RUN: ld.lld --hash-style=sysv %t.o -o %t.so -shared
|
|
# RUN: llvm-readelf -S %t.so | FileCheck %s
|
|
# RUN: llvm-objdump -d %t.so | FileCheck --check-prefix=DISASM %s
|
|
|
|
# CHECK: .got.plt PROGBITS 00003190
|
|
|
|
## 0x3190 - 0x1158 = 8248
|
|
# DISASM: 1158: {{.*}} movl $8248, %eax
|
|
|
|
.section .foo,"ax",@progbits
|
|
foo:
|
|
movl $bar@got-., %eax # R_386_GOTPC
|
|
|
|
.local bar
|
|
bar:
|