mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 01:26:04 +00:00

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
24 lines
675 B
ArmAsm
24 lines
675 B
ArmAsm
// REQUIRES: x86
|
|
// RUN: llvm-mc -filetype=obj -triple=i686-unknown-linux %s -o %t.o
|
|
// RUN: llvm-mc -filetype=obj -triple=i686-unknown-linux %p/Inputs/undef-with-plt-addr.s -o %t2.o
|
|
// RUN: ld.lld %t2.o -o %t2.so -shared -soname=t2.so
|
|
// RUN: ld.lld %t.o %t2.so -o %t3
|
|
// RUN: llvm-readobj --symbols -S %t3 | FileCheck %s
|
|
|
|
.globl _start
|
|
_start:
|
|
mov $set_data, %eax
|
|
|
|
// Test that set_data has an address in the .plt
|
|
|
|
// CHECK: Name: .plt
|
|
// CHECK-NEXT: Type: SHT_PROGBITS
|
|
// CHECK-NEXT: Flags [
|
|
// CHECK-NEXT: SHF_ALLOC
|
|
// CHECK-NEXT: SHF_EXECINSTR
|
|
// CHECK-NEXT: ]
|
|
// CHECK-NEXT: Address: 0x4011B0
|
|
|
|
// CHECK: Name: set_data
|
|
// CHECK-NEXT: Value: 0x4011C0
|