mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
f9d10cdb6f
It is now possible after D61937 was landed and was discussed in it's review comments. It is not consistent with GNU, which does not output .dynamic section content in this case for no visible reason. Differential revision: https://reviews.llvm.org/D62179 llvm-svn: 361943
39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
## Show that dumping occurs even if there is no PT_DYNAMIC header.
|
|
## This is inconsistent with the GNU behavior, but seems to be more reasonable.
|
|
# RUN: yaml2obj %s -o %t.no-phdr
|
|
# RUN: llvm-readobj --dynamic-table %t.no-phdr | FileCheck %s --check-prefix=LLVM
|
|
# RUN: llvm-readelf --dynamic-table %t.no-phdr | FileCheck %s --check-prefix=GNU
|
|
|
|
# LLVM: File: {{.*}}.no-phdr
|
|
# LLVM-NEXT: Format: ELF64-x86-64
|
|
# LLVM-NEXT: Arch: x86_64
|
|
# LLVM-NEXT: AddressSize: 64bit
|
|
# LLVM-NEXT: LoadName:{{ *}}
|
|
# LLVM-NEXT: DynamicSection [ (1 entries)
|
|
# LLVM-NEXT: Tag Type Name/Value
|
|
# LLVM-NEXT: 0x0000000000000000 NULL 0x0
|
|
# LLVM-NEXT: ]
|
|
|
|
# GNU: Dynamic section at offset 0x1b8 contains 1 entries:
|
|
# GNU-NEXT: Tag Type Name/Value
|
|
# GNU-NEXT: 0x0000000000000000 (NULL) 0x0
|
|
|
|
--- !ELF
|
|
FileHeader:
|
|
Class: ELFCLASS64
|
|
Data: ELFDATA2LSB
|
|
Type: ET_EXEC
|
|
Machine: EM_X86_64
|
|
Sections:
|
|
- Name: .dynamic
|
|
Type: SHT_DYNAMIC
|
|
Address: 0x1000
|
|
Entries:
|
|
- Tag: DT_NULL
|
|
Value: 0
|
|
ProgramHeaders:
|
|
- Type: PT_LOAD
|
|
VAddr: 0x1000
|
|
Sections:
|
|
- Section: .dynamic
|