hanchenye-llvm-project/lld/test/elf/X86_64/note-sections-ro_plus_rw.test

43 lines
1.4 KiB
Plaintext

# This tests the functionality that lld is able to recreate the note sections
# if they appear in the input, it looks like we need to differentiate RO note
# sections from RW note sections, and each creating a segment of its own
RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/note_ro_rw.o \
RUN: --noinhibit-exec -o %t -static
RUN: llvm-readobj -sections %t | FileCheck -check-prefix=NOTESECTIONS %s
RUN: llvm-readobj -program-headers %t | FileCheck -check-prefix=NOTESEGMENT %s
NOTESECTIONS: Section {
NOTESECTIONS: Name: .note.ro (1)
NOTESECTIONS: Type: SHT_NOTE (0x7)
NOTESECTIONS: Flags [ (0x2)
NOTESECTIONS: SHF_ALLOC (0x2)
NOTESECTIONS: ]
NOTESECTIONS: AddressAlignment: 4
NOTESECTIONS: }
NOTESECTIONS: Section {
NOTESECTIONS: Name: .note.rw (31)
NOTESECTIONS: Type: SHT_NOTE (0x7)
NOTESECTIONS: Flags [ (0x3)
NOTESECTIONS: SHF_ALLOC (0x2)
NOTESECTIONS: SHF_WRITE (0x1)
NOTESECTIONS: ]
NOTESECTIONS: Size: 28
NOTESECTIONS: AddressAlignment: 4
NOTESECTIONS: }
NOTESEGMENT: ProgramHeader {
NOTESEGMENT: Type: PT_NOTE (0x4)
NOTESEGMENT: Flags [ (0x4)
NOTESEGMENT: PF_R (0x4)
NOTESEGMENT: ]
NOTESEGMENT: Alignment: 4
NOTESEGMENT: }
NOTESEGMENT: ProgramHeader {
NOTESEGMENT: Type: PT_NOTE (0x4)
NOTESEGMENT: Flags [ (0x6)
NOTESEGMENT: PF_R (0x4)
NOTESEGMENT: PF_W (0x2)
NOTESEGMENT: ]
NOTESEGMENT: Alignment: 4
NOTESEGMENT: }