forked from OSchip/llvm-project
42 lines
1.1 KiB
Plaintext
42 lines
1.1 KiB
Plaintext
# Check _DYNAMIC symbol's value
|
|
#
|
|
# RUN: yaml2obj -format=elf %s > %t.o
|
|
# RUN: lld -flavor gnu -target mipsel -shared -e T0 -o %t.so %t.o
|
|
# RUN: llvm-objdump -h -t %t.so | FileCheck -check-prefix=SHARED %s
|
|
|
|
# SHARED: Sections:
|
|
# SHARED: Idx Name Size Address Type
|
|
# SHARED: 5 .dynamic 00000068 00000000[[ADDR:[0-9a-f]+]]
|
|
|
|
# SHARED: SYMBOL TABLE:
|
|
# SHARED: [[ADDR]] g .dynamic 00000000 _DYNAMIC
|
|
|
|
# RUN: lld -flavor gnu -target mipsel -e main -e T0 -o %t.exe %t.o
|
|
# RUN: llvm-objdump -h -t %t.exe | FileCheck -check-prefix=EXE %s
|
|
|
|
# EXE: Sections:
|
|
# EXE: Idx Name Size Address Type
|
|
# EXE: 6 .dynamic 00000068 00000000[[ADDR:[0-9a-f]+]]
|
|
|
|
# EXE: SYMBOL TABLE:
|
|
# EXE: [[ADDR]] g .dynamic 00000000 _DYNAMIC
|
|
|
|
FileHeader:
|
|
Class: ELFCLASS32
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_MIPS
|
|
Flags: [EF_MIPS_CPIC, EF_MIPS_ABI_O32, EF_MIPS_ARCH_32]
|
|
|
|
Sections:
|
|
- Name: .text
|
|
Type: SHT_PROGBITS
|
|
Flags: [SHF_ALLOC, SHF_EXECINSTR]
|
|
AddressAlign: 0x10
|
|
Size: 0x04
|
|
|
|
Symbols:
|
|
Global:
|
|
- Name: T0
|
|
Section: .text
|