forked from OSchip/llvm-project
[ELF] - Teach LLD to recognize PT_OPENBSD_BOOTDATA
Minor patch to fix PR31288
OpenBSD commit:
d39116912b
Differential revision: https://reviews.llvm.org/D27458
llvm-svn: 288832
This commit is contained in:
parent
114d335bf9
commit
a2a32c2cc8
|
@ -1859,6 +1859,7 @@ unsigned ScriptParser::readPhdrType() {
|
|||
.Case("PT_GNU_RELRO", PT_GNU_RELRO)
|
||||
.Case("PT_OPENBSD_RANDOMIZE", PT_OPENBSD_RANDOMIZE)
|
||||
.Case("PT_OPENBSD_WXNEEDED", PT_OPENBSD_WXNEEDED)
|
||||
.Case("PT_OPENBSD_BOOTDATA", PT_OPENBSD_BOOTDATA)
|
||||
.Default(-1);
|
||||
|
||||
if (Ret == (unsigned)-1) {
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
# RUN: llvm-mc -filetype=obj -triple=i686-unknown-linux %s -o %t.o
|
||||
# RUN: echo "PHDRS { boot PT_OPENBSD_BOOTDATA; }" > %t.script
|
||||
# RUN: ld.lld --script %t.script %t.o -o %t
|
||||
# RUN: llvm-readobj --program-headers -s %t | FileCheck %s
|
||||
|
||||
# CHECK: ProgramHeader {
|
||||
# CHECK: Type: PT_OPENBSD_BOOTDATA (0x65A41BE6)
|
Loading…
Reference in New Issue