<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - llvm-objdump -p does not recognize certain phdr types"
href="https://llvm.org/bugs/show_bug.cgi?id=31641">31641</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>llvm-objdump -p does not recognize certain phdr types
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>OpenBSD
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>brad@comstyle.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Looking towards utilizing llvm-objdump as a replacement for GNU objdump on
OpenBSD and while looking at the differences in output for some of the common
uses I noticed llvm-objdump does not recognize some phdr types.
GNU objdump..
$ objdump -p qemu-system-x86_64
qemu-system-x86_64: file format elf64-x86-64
Program Header:
PHDR off 0x0000000000000040 vaddr 0x0000000000000040 paddr
0x0000000000000040 align 2**3
filesz 0x0000000000000268 memsz 0x0000000000000268 flags r-x
INTERP off 0x000000000034f51e vaddr 0x000000000044f51e paddr
0x000000000044f51e align 2**0
filesz 0x0000000000000013 memsz 0x0000000000000013 flags r--
LOAD off 0x0000000000000000 vaddr 0x0000000000000000 paddr
0x0000000000000000 align 2**20
filesz 0x000000000034f51e memsz 0x000000000034f51e flags r-x
LOAD off 0x000000000034f51e vaddr 0x000000000044f51e paddr
0x000000000044f51e align 2**20
filesz 0x00000000003e4ffe memsz 0x00000000003e4ffe flags r--
LOAD off 0x0000000000734de8 vaddr 0x0000000000934de8 paddr
0x0000000000934de8 align 2**20
filesz 0x0000000000227bd8 memsz 0x0000000000665360 flags rw-
DYNAMIC off 0x00000000008ee380 vaddr 0x0000000000aee380 paddr
0x0000000000aee380 align 2**3
filesz 0x00000000000004b0 memsz 0x00000000000004b0 flags rw-
NOTE off 0x000000000034f534 vaddr 0x000000000044f534 paddr
0x000000000044f534 align 2**2
filesz 0x0000000000000018 memsz 0x0000000000000018 flags r--
EH_FRAME off 0x0000000000673fc0 vaddr 0x0000000000773fc0 paddr
0x0000000000773fc0 align 2**2
filesz 0x000000000001bb3c memsz 0x000000000001bb3c flags r--
OPENBSD_WXNEEDED off 0x0000000000000000 vaddr 0x0000000000000000 paddr
0x0000000000000000 align 2**3
filesz 0x0000000000000000 memsz 0x0000000000000000 flags --x
OPENBSD_RANDOMIZE off 0x0000000000734de8 vaddr 0x0000000000934de8 paddr
0x0000000000934de8 align 2**3
filesz 0x0000000000000008 memsz 0x0000000000000008 flags rw-
RELRO off 0x0000000000734de8 vaddr 0x0000000000934de8 paddr
0x0000000000934de8 align 2**6
filesz 0x00000000001c0208 memsz 0x00000000001c0208 flags r--
llvm-objdump..
$ llvm-objdump -p qemu-system-x86_64
qemu-system-x86_64: file format ELF64-x86-64
Program Header:
PHDR off 0x0000000000000040 vaddr 0x0000000000000040 paddr
0x0000000000000040 align 2**3
filesz 0x0000000000000268 memsz 0x0000000000000268 flags r-x
INTERP off 0x000000000034f51e vaddr 0x000000000044f51e paddr
0x000000000044f51e align 2**0
filesz 0x0000000000000013 memsz 0x0000000000000013 flags r--
LOAD off 0x0000000000000000 vaddr 0x0000000000000000 paddr
0x0000000000000000 align 2**20
filesz 0x000000000034f51e memsz 0x000000000034f51e flags r-x
LOAD off 0x000000000034f51e vaddr 0x000000000044f51e paddr
0x000000000044f51e align 2**20
filesz 0x00000000003e4ffe memsz 0x00000000003e4ffe flags r--
LOAD off 0x0000000000734de8 vaddr 0x0000000000934de8 paddr
0x0000000000934de8 align 2**20
filesz 0x0000000000227bd8 memsz 0x0000000000665360 flags rw-
DYNAMIC off 0x00000000008ee380 vaddr 0x0000000000aee380 paddr
0x0000000000aee380 align 2**3
filesz 0x00000000000004b0 memsz 0x00000000000004b0 flags rw-
UNKNOWN off 0x000000000034f534 vaddr 0x000000000044f534 paddr
0x000000000044f534 align 2**2
filesz 0x0000000000000018 memsz 0x0000000000000018 flags r--
EH_FRAME off 0x0000000000673fc0 vaddr 0x0000000000773fc0 paddr
0x0000000000773fc0 align 2**2
filesz 0x000000000001bb3c memsz 0x000000000001bb3c flags r--
UNKNOWN off 0x0000000000000000 vaddr 0x0000000000000000 paddr
0x0000000000000000 align 2**3
filesz 0x0000000000000000 memsz 0x0000000000000000 flags --x
UNKNOWN off 0x0000000000734de8 vaddr 0x0000000000934de8 paddr
0x0000000000934de8 align 2**3
filesz 0x0000000000000008 memsz 0x0000000000000008 flags rw-
UNKNOWN off 0x0000000000734de8 vaddr 0x0000000000934de8 paddr
0x0000000000934de8 align 2**6
filesz 0x00000000001c0208 memsz 0x00000000001c0208 flags r--
And for a sparc64 kernel.
$ objdump -p bsd
bsd: file format elf64-big
Program Header:
LOAD off 0x0000000000008000 vaddr 0x0000000001000000 paddr
0x0000000001000000 align 2**15
filesz 0x00000000007e7018 memsz 0x00000000007e7018 flags rwx
LOAD off 0x00000000007ef020 vaddr 0x0000000001800000 paddr
0x0000000001800000 align 2**5
filesz 0x000000000002f610 memsz 0x00000000000d464c flags rw-
OPENBSD_RANDOMIZE off 0x00000000007ecc10 vaddr 0x00000000017e4c10 paddr
0x00000000017e4c10 align 2**3
filesz 0x0000000000002408 memsz 0x0000000000002408 flags rw-
OPENBSD_BOOTDATA off 0x000000000081e5f0 vaddr 0x000000000182f5d0 paddr
0x000000000182f5d0 align 2**0
filesz 0x0000000000000040 memsz 0x0000000000000040 flags rw-
$ llvm-objdump -p bsd
bsd: file format ELF64-sparc
Program Header:
LOAD off 0x0000000000008000 vaddr 0x0000000001000000 paddr
0x0000000001000000 align 2**15
filesz 0x00000000007e7018 memsz 0x00000000007e7018 flags rwx
LOAD off 0x00000000007ef020 vaddr 0x0000000001800000 paddr
0x0000000001800000 align 2**5
filesz 0x000000000002f610 memsz 0x00000000000d464c flags rw-
UNKNOWN off 0x00000000007ecc10 vaddr 0x00000000017e4c10 paddr
0x00000000017e4c10 align 2**3
filesz 0x0000000000002408 memsz 0x0000000000002408 flags rw-
UNKNOWN off 0x000000000081e5f0 vaddr 0x000000000182f5d0 paddr
0x000000000182f5d0 align 2**0
filesz 0x0000000000000040 memsz 0x0000000000000040 flags rw-</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>