blob: 3bf27dcb1f5a6b46b6c42d4aaea74a63dd007bae [file] [log] [blame]
/*
Test extra program header generates error.
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 EXTRA-PROGRAM-PHDR %s < %t1-error
*/
ENTRY(_start)
PHDRS
{
header PT_PHDR PHDRS;
header2 PT_PHDR PHDRS;
text PT_LOAD;
}
SECTIONS
{
.text : { *(.text) } :NONE
.data : { *(.data) }
}
/*
EXTRA-PROGRAM-PHDR: Extra program header is found
*/