| # Check that the linker is not ignoring input sections. |
| # RUN: yaml2obj -format=elf %s > %t.obj |
| # RUN: lld -flavor gnu -target x86_64 %t.obj -o %t.exe --noinhibit-exec |
| # RUN: llvm-readobj -s %t.exe | FileCheck %s |
| |
| # CHECK: Section { |
| # CHECK: Name: .note |
| # CHECK-NEXT: Type: SHT_NOTE |
| |
| --- |
| FileHeader: |
| Class: ELFCLASS64 |
| Data: ELFDATA2LSB |
| OSABI: ELFOSABI_GNU |
| Type: ET_REL |
| Machine: EM_X86_64 |
| Sections: |
| - Name: .text |
| Type: SHT_PROGBITS |
| Flags: [ SHF_ALLOC, SHF_EXECINSTR ] |
| AddressAlign: 0x0000000000000004 |
| Content: '' |
| - Name: .data |
| Type: SHT_PROGBITS |
| Flags: [ SHF_WRITE, SHF_ALLOC ] |
| AddressAlign: 0x0000000000000004 |
| Content: '' |
| - Name: .bss |
| Type: SHT_NOBITS |
| Flags: [ SHF_WRITE, SHF_ALLOC ] |
| AddressAlign: 0x0000000000000004 |
| - Name: .note |
| Type: SHT_NOTE |
| AddressAlign: 0x0000000000000001 |
| Content: '00' |
| Symbols: |
| Local: |
| - Name: .text |
| Type: STT_SECTION |
| Section: .text |
| - Name: .data |
| Type: STT_SECTION |
| Section: .data |
| - Name: .bss |
| Type: STT_SECTION |
| Section: .bss |
| - Name: .note |
| Type: STT_SECTION |
| Section: .note |
| ... |