1
1
mirror of https://github.com/rui314/mold.git synced 2024-11-15 14:36:25 +03:00
mold/test/dynamic.s
2020-11-13 13:13:54 +09:00

44 lines
2.3 KiB
ArmAsm

// RUN: mold -o %t.exe /usr/lib/x86_64-linux-gnu/crt1.o \
// RUN: /usr/lib/x86_64-linux-gnu/crti.o \
// RUN: /usr/lib/gcc/x86_64-linux-gnu/9/crtbegin.o \
// RUN: /home/ruiu/mold/test/Output/hello-dynamic.s.tmp.o \
// RUN: /usr/lib/gcc/x86_64-linux-gnu/9/crtend.o \
// RUN: /usr/lib/x86_64-linux-gnu/crtn.o \
// RUN: /usr/lib/gcc/x86_64-linux-gnu/9/libgcc.a \
// RUN: /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 \
// RUN: /lib/x86_64-linux-gnu/libc.so.6 \
// RUN: /usr/lib/x86_64-linux-gnu/libc_nonshared.a \
// RUN: /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
// RUN: readelf --dynamic %t.exe | FileCheck %s
// CHECK: Dynamic section at offset 0x2080 contains 19 entries:
// CHECK: Tag Type Name/Value
// CHECK: 0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
// CHECK: 0x0000000000000001 (NEEDED) Shared library: [ld-linux-x86-64.so.2]
// CHECK: 0x0000000000000007 (RELA) 0x2003a0
// CHECK: 0x0000000000000008 (RELASZ) 0 (bytes)
// CHECK: 0x0000000000000009 (RELAENT) 24 (bytes)
// CHECK: 0x0000000000000017 (JMPREL) 0x200370
// CHECK: 0x0000000000000002 (PLTRELSZ) 48 (bytes)
// CHECK: 0x0000000000000003 (PLTGOT) 0x202058
// CHECK: 0x0000000000000014 (PLTREL) RELA
// CHECK: 0x0000000000000006 (SYMTAB) 0x2003a0
// CHECK: 0x000000000000000b (SYMENT) 24 (bytes)
// CHECK: 0x0000000000000005 (STRTAB) 0x2003e8
// CHECK: 0x000000000000000a (STRSZ) 58 (bytes)
// CHECK: 0x0000000000000004 (HASH) 0x200424
// CHECK: 0x0000000000000019 (INIT_ARRAY) 0x202028
// CHECK: 0x000000000000001b (INIT_ARRAYSZ) 8 (bytes)
// CHECK: 0x000000000000001a (FINI_ARRAY) 0x202020
// CHECK: 0x000000000000001c (FINI_ARRAYSZ) 8 (bytes)
// CHECK: 0x0000000000000000 (NULL) 0x0
// RUN: readelf --symbols --use-dynamic %t.exe | FileCheck --check-prefix=DYNAMIC %s
// DYNAMIC: Symbol table for image:
// DYNAMIC: Num Buc: Value Size Type Bind Vis Ndx Name
// DYNAMIC: 2 1: 0000000000000000 0 FUNC GLOBAL DEFAULT UND __libc_start_main
// DYNAMIC: 1 2: 0000000000000000 0 FUNC GLOBAL DEFAULT UND printf
.globl main
main: