[llvm-branch-commits] [llvm-branch] r293942 - Merging r292167:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Feb 2 13:44:30 PST 2017


Author: hans
Date: Thu Feb  2 15:44:30 2017
New Revision: 293942

URL: http://llvm.org/viewvc/llvm-project?rev=293942&view=rev
Log:
Merging r292167:
------------------------------------------------------------------------
r292167 | davide | 2017-01-16 14:01:41 -0800 (Mon, 16 Jan 2017) | 3 lines

[llvm-objdump] Dump PT_OPENBSD_{BOOTDATA,RANDOMIZE,WXNEEDED}.

PR: 31641
------------------------------------------------------------------------
Merging r292169:
------------------------------------------------------------------------
r292169 | davide | 2017-01-16 14:58:26 -0800 (Mon, 16 Jan 2017) | 3 lines

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

PR: 31641
------------------------------------------------------------------------
Merging r292170:
------------------------------------------------------------------------
r292170 | davide | 2017-01-16 15:13:46 -0800 (Mon, 16 Jan 2017) | 3 lines

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

PR: 31641
------------------------------------------------------------------------

Added:
    llvm/branches/release_40/test/Object/Inputs/phdr-note.elf-x86-64
      - copied unchanged from r292170, llvm/trunk/test/Object/Inputs/phdr-note.elf-x86-64
    llvm/branches/release_40/test/Object/Inputs/phdrs.elf-x86-64
      - copied unchanged from r292169, llvm/trunk/test/Object/Inputs/phdrs.elf-x86-64
    llvm/branches/release_40/test/tools/llvm-objdump/X86/openbsd-headers.test
      - copied unchanged from r292167, llvm/trunk/test/tools/llvm-objdump/X86/openbsd-headers.test
    llvm/branches/release_40/test/tools/llvm-objdump/X86/phdrs.test
      - copied, changed from r292169, llvm/trunk/test/tools/llvm-objdump/X86/phdrs.test
Modified:
    llvm/branches/release_40/   (props changed)
    llvm/branches/release_40/tools/llvm-objdump/ELFDump.cpp

Propchange: llvm/branches/release_40/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Feb  2 15:44:30 2017
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,291858-291859,291863,291875,291909,291918,291966,291968,291979,292117,292133,292242,292254-292255,292280,292323,292444,292467,292516,292583,292624-292625,292641,292651,292667,292711-292713,292758,293021,293025,293230,293259,293291,293293,293309,293417,293522,293542,293629,293635,293658,293673,293727,293730
+/llvm/trunk:155241,291858-291859,291863,291875,291909,291918,291966,291968,291979,292117,292133,292167,292169-292170,292242,292254-292255,292280,292323,292444,292467,292516,292583,292624-292625,292641,292651,292667,292711-292713,292758,293021,293025,293230,293259,293291,293293,293309,293417,293522,293542,293629,293635,293658,293673,293727,293730

Copied: llvm/branches/release_40/test/tools/llvm-objdump/X86/phdrs.test (from r292169, llvm/trunk/test/tools/llvm-objdump/X86/phdrs.test)
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_40/test/tools/llvm-objdump/X86/phdrs.test?p2=llvm/branches/release_40/test/tools/llvm-objdump/X86/phdrs.test&p1=llvm/trunk/test/tools/llvm-objdump/X86/phdrs.test&r1=292169&r2=293942&rev=293942&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-objdump/X86/phdrs.test (original)
+++ llvm/branches/release_40/test/tools/llvm-objdump/X86/phdrs.test Thu Feb  2 15:44:30 2017
@@ -16,3 +16,17 @@ RUN:     | FileCheck %s
 
 CHECK: RELRO off    0x0000000000001000 vaddr 0x0000000000201000 paddr 0x0000000000201000 align 2**0
 CHECK-NEXT:      filesz 0x0000000000000004 memsz 0x0000000000001000 flags r--
+
+## phdr-note.elf-x86-64 was generated using lld (3.9).
+## llvm-mc -filetype=obj -triple=x86_64-pc-linux test.s -o test.o
+## lld test.o -o phdr-note.elf-x86-64 -shared
+##
+## test.s:
+##       .section        .note.test,"a", at note
+##       .quad 42
+
+RUN: llvm-objdump -p %p/../../../Object/Inputs/phdr-note.elf-x86-64 \
+RUN:     | FileCheck %s --check-prefix=NOTE
+
+NOTE: NOTE off    0x0000000000000200 vaddr 0x0000000000000200 paddr 0x0000000000000200 align 2**0
+NOTE-NEXT:       filesz 0x0000000000000008 memsz 0x0000000000000008 flags r--

Modified: llvm/branches/release_40/tools/llvm-objdump/ELFDump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_40/tools/llvm-objdump/ELFDump.cpp?rev=293942&r1=293941&r2=293942&view=diff
==============================================================================
--- llvm/branches/release_40/tools/llvm-objdump/ELFDump.cpp (original)
+++ llvm/branches/release_40/tools/llvm-objdump/ELFDump.cpp Thu Feb  2 15:44:30 2017
@@ -36,6 +36,9 @@ template <class ELFT> void printProgramH
     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;
@@ -45,6 +48,18 @@ template <class ELFT> void printProgramH
     case ELF::PT_LOAD:
       outs() << "    LOAD ";
       break;
+    case ELF::PT_NOTE:
+      outs() << "    NOTE ";
+      break;
+    case ELF::PT_OPENBSD_BOOTDATA:
+      outs() << "    OPENBSD_BOOTDATA ";
+      break;
+    case ELF::PT_OPENBSD_RANDOMIZE:
+      outs() << "    OPENBSD_RANDOMIZE ";
+      break;
+    case ELF::PT_OPENBSD_WXNEEDED:
+      outs() << "    OPENBSD_WXNEEDED ";
+      break;
     case ELF::PT_PHDR:
       outs() << "    PHDR ";
       break;




More information about the llvm-branch-commits mailing list