123456789101112131415161718192021222324252627282930313233 |
- # Tests two special cases for the ELF format:
- # - If the section count in the ELF headers is 0, then, the true value
- # is read out of section 0.
- # - If the section string index in the ELF headers is SHN_XINDEX, the
- # true value is read out of section 0.
- #
- # These special cases are documented here:
- # https://docs.oracle.com/cd/E19683-01/817-3677/chapter6-94076/index.html
- # RUN: %yaml2obj %s -o %t.obj
- # RUN: %bloaty --raw-map %t.obj | %FileCheck %s
- --- !ELF
- FileHeader:
- Class: ELFCLASS64
- Data: ELFDATA2LSB
- Type: ET_REL
- Machine: EM_X86_64
- EShNum: 0
- EShStrNdx: 0xffff ## SHN_XINDEX
- Sections:
- - Type: SHT_NULL
- Link: .shstrtab
- Size: 0x3
- ...
- # CHECK: FILE MAP:
- # CHECK: 000-040 64 [ELF Header]
- # CHECK: 040-041 1 .strtab
- # CHECK: 041-058 23 .shstrtab
- # CHECK: 058-118 192 [ELF Section Headers]
- # CHECK: VM MAP:
|