]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
elfctl: allow features to be specified by value
authorEd Maste <emaste@FreeBSD.org>
Fri, 22 Jan 2021 17:22:35 +0000 (12:22 -0500)
committerEd Maste <emaste@FreeBSD.org>
Tue, 26 Jan 2021 14:46:00 +0000 (09:46 -0500)
commitd7e23b5cdd8465bd50f88b1e38cb695a361a26f5
tree6a8839abccff1be79a3fa6987afa5a6215e0b92a
parent49d3dcb041f058880486e3489ca79c9476ac7abf
elfctl: allow features to be specified by value

This will allow elfctl on older releases to set bits that are not yet
known there, so that the binary will have the correct settings applied
if run on a later FreeBSD version.

PR: 252629 (related)
Suggested by: kib
Reviewed by: gbe (manpage, earlier), kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D28284

(cherry picked from commit 86f33b5fcf6087bf4439881011b920ff99e6e300)

elfctl: fix typo from last-minute refactoring

Reported by: jkim

(cherry picked from commit f302fd1aa6730facd53a3f761e0a57302731b03e)

elfctl: Fix type errors.

Target value for val has uint32_t type, not uint, adjust used constant.
Change val type to unsigned so that left and right sides of comparision
operator do not expose different signed types of same range [*].

Switch to unsigned long long and strtoll(3) so that 0x80000000 is
accepted by conversion function [**].

Reported by: kargl [*]
Noted by: emaste [**]
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D28301

(cherry picked from commit 9940ac808de7b7d4ed0408c3e739f667dca06d3b)
usr.bin/elfctl/elfctl.1
usr.bin/elfctl/elfctl.c