Bug 215999

Summary: binmisctl(8) man page provides wrong powerpc64 magic
Product: Documentation Reporter: luca.pizzamiglio
Component: Manual PagesAssignee: Justin Hibbits <jhibbits>
Status: Closed FIXED    
Severity: Affects Many People CC: doc, jhibbits
Priority: --- Keywords: patch
Version: LatestFlags: luca.pizzamiglio: maintainer-feedback?
Hardware: Any   
OS: Any   
Attachments:
Description Flags
The fixing patch none

Description luca.pizzamiglio 2017-01-12 15:54:34 UTC
Created attachment 178795 [details]
The fixing patch

The binmiscctl(8) man page provides several examples of magics that can be used with several architectures.

The powerpc64 example has a little error in the magic string: the EI_CLASS field (offset 0x04) should be 0x02 (64 bit) instead of 0x01 (32 bit)

Cross-compiled powerpc64 FreeBSD binaries confirm the error:

# hexdump -C -n 20 id
00000000  7f 45 4c 46 02 02 01 09  00 00 00 00 00 00 00 00  |.ELF............|
00000010  00 02 00 15                                       |....|

The attached patch can be applied to fix the man page
Comment 1 Justin Hibbits freebsd_committer freebsd_triage 2017-09-04 20:54:38 UTC
Trivial.  Thanks for the patch!