forked from OSchip/llvm-project
44 lines
1.1 KiB
Plaintext
44 lines
1.1 KiB
Plaintext
RUN: lld -flavor gnu -target x86_64 -e main -o %t -L%p/Inputs \
|
|
RUN: %p/Inputs/undef.o -lundef
|
|
RUN: llvm-readobj -relocations -symbols -dyn-symbols %t | FileCheck %s
|
|
|
|
RUN: lld -flavor gnu -target x86_64 -e main -o %t -L%p/Inputs \
|
|
RUN: %p/Inputs/undef-pc32.o -lundef
|
|
RUN: llvm-readobj -relocations -symbols -dyn-symbols %t | FileCheck %s
|
|
|
|
# DSO source code:
|
|
# int x[2] = { 1, 2 };
|
|
#
|
|
# Main binary source code:
|
|
#
|
|
# extern int x[2];
|
|
#
|
|
# int main(void)
|
|
# {
|
|
# x[0] = 2;
|
|
# }
|
|
#
|
|
|
|
CHECK: Relocations [
|
|
CHECK-NEXT: Section ({{[0-9]+}}) .rela.dyn {
|
|
CHECK-NEXT: 0x{{[1-9A-F][0-9A-F]*}} R_X86_64_COPY x 0x0
|
|
CHECK-NEXT: }
|
|
CHECK-NEXT: ]
|
|
|
|
CHECK: Name: x ({{[0-9]+}}
|
|
CHECK-NEXT: Value: 0x{{[1-9A-F][0-9A-F]*}}
|
|
CHECK-NEXT: Size: 8
|
|
CHECK-NEXT: Binding: Global (0x1)
|
|
CHECK-NEXT: Type: Object (0x1)
|
|
CHECK-NEXT: Other: 0
|
|
CHECK-NEXT: Section: .bss
|
|
|
|
CHECK: Name: x@ ({{[0-9]+}}
|
|
CHECK-NEXT: Value: 0x{{[1-9A-F][0-9A-F]*}}
|
|
CHECK-NEXT: Size: 8
|
|
CHECK-NEXT: Binding: Global (0x1)
|
|
CHECK-NEXT: Type: Object (0x1)
|
|
CHECK-NEXT: Other: 0
|
|
CHECK-NEXT: Section: .bss
|
|
|