1// REQUIRES: x86 2// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/copy-relocation-zero-nonabs-addr.s -o %t1.o 3// RUN: ld.lld -Ttext=0 -o %t2.so --script=%p/Inputs/copy-relocation-zero-nonabs-addr.script %t1.o -shared 4// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t3.o 5// RUN: ld.lld %t2.so %t3.o -o %t4 6// RUN: llvm-readobj --symbols %t2.so | FileCheck --check-prefix=CHECKSO %s 7// RUN: llvm-readobj --symbols %t4 | FileCheck %s 8 9.text 10.globl _start 11_start: 12 movl $5, foo 13 14// Make sure foo has st_value == 0. 15// CHECKSO: Name: foo 16// CHECKSO-NEXT: Value: 0x0 17// CHECKSO-NEXT: Size: 4 18// CHECKSO-NEXT: Binding: Global 19// CHECKSO-NEXT: Type: Object 20// CHECKSO-NEXT: Other: 0 21// CHECKSO-NEXT: Section: .text 22 23// When foo has st_value == 0, it carries the section alignment. 24// In this case, section alignment is 2^10, 0x202400 meets the requirement. 25// CHECK: Name: foo 26// CHECK-NEXT: Value: 0x202400 27// CHECK-NEXT: Size: 4 28// CHECK-NEXT: Binding: Global 29// CHECK-NEXT: Type: Object 30