HomeFreeBSD

usr.bin/elfctl: Allow for cross-endian operations.

Description

usr.bin/elfctl: Allow for cross-endian operations.

Detect if host endian is different than target endian and swap
byte order of ELF note fields instead of failing.

Submitted by: Dawid Gorecki <dgr@semihalf.com>
Reviewed by: imp
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D29550

(cherry picked from commit 4a27bf128b108d90412190c06a54ebac36a8ca2e)
(cherry picked from commit 7572ddd1671e13844a470bdfbbfbe15a4b4fbfa2)

Details

Provenance
mwAuthored on May 21 2021, 9:19 AM
emasteCommitted on Dec 12 2021, 7:00 PM
Reviewer
imp
Differential Revision
D29550: usr.bin/elfctl: Allow for cross-endian operations.
Parents
rGe048bd5c0954: elfctl: avoid touching file if no change made
Branches
Unknown
Tags
Unknown