[llvm-objdump] Dump PT_GNU_RELRO as part of -p.

PR: 31641
llvm-svn: 292169
This commit is contained in:
Davide Italiano 2017-01-16 22:58:26 +00:00
parent 71329901ea
commit cad192779a
3 changed files with 21 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,18 @@
## phdrs.elf-x86-64 was generated using lld (3.9).
## llvm-mc -filetype=obj -triple=x86_64-unknown-linux test.s -o test.o
## lld test.o -o phdrs.elf-x86-64
##
## test.s:
## .global _start
## _start:
##
## .global d
## .section .foo,"awT",@progbits
## d:
## .long 2
##
RUN: llvm-objdump -p %p/../../../Object/Inputs/phdrs.elf-x86-64 \
RUN: | FileCheck %s
CHECK: RELRO off 0x0000000000001000 vaddr 0x0000000000201000 paddr 0x0000000000201000 align 2**0
CHECK-NEXT: filesz 0x0000000000000004 memsz 0x0000000000001000 flags r--

View File

@ -36,6 +36,9 @@ template <class ELFT> void printProgramHeaders(const ELFFile<ELFT> *o) {
case ELF::PT_GNU_EH_FRAME:
outs() << "EH_FRAME ";
break;
case ELF::PT_GNU_RELRO:
outs() << " RELRO ";
break;
case ELF::PT_GNU_STACK:
outs() << " STACK ";
break;