[PATCH] D67146: [yaml2obj] Support PT_GNU_STACK and PT_GNU_RELRO
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 4 02:19:49 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL370857: [yaml2obj] Support PT_GNU_STACK and PT_GNU_RELRO (authored by MaskRay, committed by ).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67146/new/
https://reviews.llvm.org/D67146
Files:
llvm/trunk/lib/ObjectYAML/ELFYAML.cpp
llvm/trunk/test/tools/llvm-objcopy/ELF/marker-segment.test
llvm/trunk/test/tools/yaml2obj/program-header.yaml
Index: llvm/trunk/test/tools/yaml2obj/program-header.yaml
===================================================================
--- llvm/trunk/test/tools/yaml2obj/program-header.yaml
+++ llvm/trunk/test/tools/yaml2obj/program-header.yaml
@@ -37,6 +37,9 @@
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 @@
#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.
Index: llvm/trunk/test/tools/llvm-objcopy/ELF/marker-segment.test
===================================================================
--- llvm/trunk/test/tools/llvm-objcopy/ELF/marker-segment.test
+++ llvm/trunk/test/tools/llvm-objcopy/ELF/marker-segment.test
@@ -43,7 +43,7 @@
Align: 0x1000
Sections:
- Section: .data
- - Type: 0x6474e551 # GNU_STACK
+ - Type: PT_GNU_STACK
Flags: [ PF_R, PF_W ]
VAddr: 0x0000
PAddr: 0x0000
Index: llvm/trunk/lib/ObjectYAML/ELFYAML.cpp
===================================================================
--- llvm/trunk/lib/ObjectYAML/ELFYAML.cpp
+++ llvm/trunk/lib/ObjectYAML/ELFYAML.cpp
@@ -52,6 +52,8 @@
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);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67146.218619.patch
Type: text/x-patch
Size: 1757 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190904/3d6a0e73/attachment.bin>
More information about the llvm-commits
mailing list