Bug 215999 - binmisctl(8) man page provides wrong powerpc64 magic
Summary: binmisctl(8) man page provides wrong powerpc64 magic
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Justin Hibbits
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-01-12 15:54 UTC by luca.pizzamiglio
Modified: 2019-01-21 21:48 UTC (History)
2 users (show)

See Also:
luca.pizzamiglio: maintainer-feedback?


Attachments
The fixing patch (733 bytes, patch)
2017-01-12 15:54 UTC, luca.pizzamiglio
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!