llvm.org GIT mirror llvm / stable test / tools / llvm-readobj / elf-dynamic-no-pt-dynamic.test
stable

Tree @stable (Download .tar.gz)

elf-dynamic-no-pt-dynamic.test @stableraw · history · blame

# Show that no dumping occurs if there is no PT_DYNAMIC header.
# 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 --allow-empty

# LLVM:      File: {{.*}}.no-phdr
# LLVM-NEXT: Format: ELF64-x86-64
# LLVM-NEXT: Arch: x86_64
# LLVM-NEXT: AddressSize: 64bit
# LLVM-NEXT: LoadName:{{ *}}
# LLVM-NOT:  {{.}}

# GNU-NOT: {{.}}

--- !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