2014-01-15 02:19:42 +08:00
|
|
|
# Check _gp_disp and GOT_OFFSET_TABLE value
|
2014-08-03 04:18:31 +08:00
|
|
|
#
|
|
|
|
# RUN: yaml2obj -format=elf %s > %t.o
|
|
|
|
# RUN: lld -flavor gnu -target mipsel -shared --noinhibit-exec -o %t.so %t.o
|
|
|
|
# RUN: llvm-objdump -h -t %t.so | FileCheck -check-prefix=SHARED %s
|
2014-01-15 02:19:42 +08:00
|
|
|
|
|
|
|
# SHARED: Sections:
|
|
|
|
# SHARED: Idx Name Size Address Type
|
2014-01-27 11:09:26 +08:00
|
|
|
# SHARED: 6 .got 00000008 0000000000001000 DATA
|
2014-01-15 02:19:42 +08:00
|
|
|
# SHARED: SYMBOL TABLE:
|
2015-04-16 02:31:53 +08:00
|
|
|
# SHARED: 00001000 .got 00000000 _GLOBAL_OFFSET_TABLE_
|
2014-01-15 02:19:52 +08:00
|
|
|
# SHARED: 00008ff0 g *ABS* 00000000 _gp
|
2014-01-15 02:19:42 +08:00
|
|
|
# SHARED: 00008ff0 g *ABS* 00000000 _gp_disp
|
|
|
|
|
2014-08-03 04:18:31 +08:00
|
|
|
# RUN: lld -flavor gnu -target mipsel -e main --noinhibit-exec -o %t.exe %t.o
|
|
|
|
# RUN: llvm-objdump -h -t %t.exe | FileCheck -check-prefix=EXE %s
|
2014-01-15 02:19:42 +08:00
|
|
|
|
|
|
|
# EXE: Sections:
|
|
|
|
# EXE: Idx Name Size Address Type
|
|
|
|
# EXE: 7 .got 00000008 0000000000401000 DATA
|
|
|
|
# EXE: SYMBOL TABLE:
|
2015-04-16 02:31:53 +08:00
|
|
|
# EXE: 00401000 .got 00000000 _GLOBAL_OFFSET_TABLE_
|
2014-01-15 02:19:52 +08:00
|
|
|
# EXE: 00408ff0 g *ABS* 00000000 _gp
|
2014-01-15 02:19:42 +08:00
|
|
|
# EXE: 00408ff0 g *ABS* 00000000 _gp_disp
|
|
|
|
|
2014-08-03 04:18:31 +08:00
|
|
|
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: main
|
|
|
|
Section: .text
|