llvm-project/lld/test/old-elf/linkerscript/phdrs-program-wrong-phdrs.test

27 lines
509 B
Plaintext

/*
Test when program segment contains PHDRS attribute not mapped to load segment.
RUN: yaml2obj -format=elf %p/Inputs/simple.o.yaml -o=%t.o
RUN: not lld -flavor old-gnu -target x86_64 -T %s %t.o -static -o %t1 &> %t1-error
RUN: FileCheck -check-prefix PROGRAM-PHDR-WRONG-PHDRS %s < %t1-error
*/
ENTRY(_start)
PHDRS
{
header PT_PHDR PHDRS;
text PT_LOAD;
}
SECTIONS
{
.text : { *(.text) } :text
.data : { *(.data) }
}
/*
PROGRAM-PHDR-WRONG-PHDRS: Program header has invalid PHDRS attribute
*/