Files
clang-p2996/lld/test/ELF/startstop-shared.s
Rafael Espindola ac95264d62 Don't depend on dynamic relocatinos in ro sections.
Currently we don't check when creating relative relocations if the
section is read only or not. I am about to fix that, so first update the
patches that depend on the current behavior.

llvm-svn: 268542
2016-05-04 20:25:19 +00:00

27 lines
738 B
ArmAsm

// REQUIRES: x86
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
// RUN: ld.lld %t.o -o %t.so -shared
// RUN: llvm-readobj -r -t %t.so | FileCheck %s
.data
.quad __start_foo
.section foo,"aw"
// By default the symbol is hidden.
// CHECK: R_X86_64_RELATIVE - 0x[[ADDR1:.*]]
.hidden __start_bar
.quad __start_bar
.section bar,"a"
// References do not affect the visibility.
// CHECK: R_X86_64_RELATIVE - 0x[[ADDR2:.*]]
// CHECK: Name: __start_bar
// CHECK-NEXT: Value: 0x[[ADDR2]]
// CHECK-NEXT: Size:
// CHECK-NEXT: Binding: Local
// CHECK: Name: __start_foo
// CHECK-NEXT: Value: 0x[[ADDR1]]
// CHECK-NEXT: Size:
// CHECK-NEXT: Binding: Local