[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/26405] New: [objdump, readelf] - PT_OPENBSD_* segments are
From: |
georgerim at gmail dot com |
Subject: |
[Bug binutils/26405] New: [objdump, readelf] - PT_OPENBSD_* segments are not recognised. |
Date: |
Wed, 19 Aug 2020 12:26:31 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=26405
Bug ID: 26405
Summary: [objdump, readelf] - PT_OPENBSD_* segments are not
recognised.
Product: binutils
Version: 2.36 (HEAD)
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: georgerim at gmail dot com
Target Milestone: ---
Created attachment 12779
--> https://sourceware.org/bugzilla/attachment.cgi?id=12779&action=edit
sample test object with PT_OPENBSD_* segments
Currently, both objdump/readelf tools do not recognise PT_OPENBSD_* segments,
defined as:
PT_OPENBSD_RANDOMIZE = 0x65a3dbe6, // Fill with random data.
PT_OPENBSD_WXNEEDED = 0x65a3dbe7, // Program does W^X violations.
PT_OPENBSD_BOOTDATA = 0x65a41be6, // Section for boot arguments.
E.g., "objdump -p 1.o" prints:
Program Header:
0x65a3dbe6 off 0x0000000000000000 vaddr 0x0000000000000000 paddr
0x0000000000000000 align 2**0
filesz 0x0000000000000000 memsz 0x0000000000000000 flags ---
0x65a3dbe7 off 0x0000000000000000 vaddr 0x0000000000000000 paddr
0x0000000000000000 align 2**0
filesz 0x0000000000000000 memsz 0x0000000000000000 flags ---
0x65a41be6 off 0x0000000000000000 vaddr 0x0000000000000000 paddr
0x0000000000000000 align 2**0
filesz 0x0000000000000000 memsz 0x0000000000000000 flags ---
The expected output is:
OPENBSD_RANDOMIZE off 0x0000000000000000 vaddr 0x0000000000000000 paddr
0x0000000000000000 align 2**0
filesz 0x0000000000000000 memsz 0x0000000000000000 flags ---
OPENBSD_WXNEEDED off 0x0000000000000000 vaddr 0x0000000000000000 paddr
0x0000000000000000 align 2**0
filesz 0x0000000000000000 memsz 0x0000000000000000 flags ---
OPENBSD_BOOTDATA off 0x0000000000000000 vaddr 0x0000000000000000 paddr
0x0000000000000000 align 2**0
filesz 0x0000000000000000 memsz 0x0000000000000000 flags ---
"readelf 1.o --program-headers" prints:
Program Headers:
Type Offset VirtAddr PhysAddr
FileSiz MemSiz Flags Align
LOOS+0x5a3dbe6 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x1
LOOS+0x5a3dbe7 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x1
LOOS+0x5a41be6 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x1
The expected output is:
Program Headers:
Type Offset VirtAddr PhysAddr
FileSiz MemSiz Flags Align
OPENBSD_RANDOMIZE 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x1
OPENBSD_WXNEEDED 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x1
OPENBSD_BOOTDATA 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x1
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/26405] New: [objdump, readelf] - PT_OPENBSD_* segments are not recognised.,
georgerim at gmail dot com <=