mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
[yaml2obj] Support PT_GNU_STACK and PT_GNU_RELRO
PT_GNU_STACK is used in an llvm-objcopy test. I plan to use PT_GNU_RELRO in a patch to improve nested segment processing in llvm-objcopy (PR42963). Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D67146 llvm-svn: 370857
This commit is contained in:
parent
786f32fbda
commit
48da72d50b
@ -52,6 +52,8 @@ void ScalarEnumerationTraits<ELFYAML::ELF_PT>::enumeration(
|
||||
ECase(PT_PHDR);
|
||||
ECase(PT_TLS);
|
||||
ECase(PT_GNU_EH_FRAME);
|
||||
ECase(PT_GNU_STACK);
|
||||
ECase(PT_GNU_RELRO);
|
||||
#undef ECase
|
||||
IO.enumFallback<Hex32>(Value);
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ ProgramHeaders:
|
||||
Align: 0x1000
|
||||
Sections:
|
||||
- Section: .data
|
||||
- Type: 0x6474e551 # GNU_STACK
|
||||
- Type: PT_GNU_STACK
|
||||
Flags: [ PF_R, PF_W ]
|
||||
VAddr: 0x0000
|
||||
PAddr: 0x0000
|
||||
|
@ -37,6 +37,9 @@ ProgramHeaders:
|
||||
PAddr: 0xFFFF2000
|
||||
Sections:
|
||||
- Section: .data
|
||||
- Type: PT_GNU_EH_FRAME
|
||||
- Type: PT_GNU_STACK
|
||||
- Type: PT_GNU_RELRO
|
||||
|
||||
#CHECK: ProgramHeaders [
|
||||
#CHECK-NEXT: ProgramHeader {
|
||||
@ -64,6 +67,15 @@ ProgramHeaders:
|
||||
#CHECK-NEXT: ]
|
||||
#CHECK-NEXT: Alignment: 4096
|
||||
#CHECK-NEXT: }
|
||||
#CHECK-NEXT: ProgramHeader {
|
||||
#CHECK-NEXT: Type: PT_GNU_EH_FRAME (0x6474E550)
|
||||
#CHECK: }
|
||||
#CHECK-NEXT: ProgramHeader {
|
||||
#CHECK-NEXT: Type: PT_GNU_STACK (0x6474E551)
|
||||
#CHECK: }
|
||||
#CHECK-NEXT: ProgramHeader {
|
||||
#CHECK-NEXT: Type: PT_GNU_RELRO (0x6474E552)
|
||||
#CHECK: }
|
||||
#CHECK-NEXT:]
|
||||
|
||||
## Check we do not allow referencing sections that do not exist.
|
||||
|
Loading…
Reference in New Issue
Block a user