Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/elfctl/elfctl.1
Show All 20 Lines | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd January 12, 2021 | .Dd January 22, 2021 | ||||
.Dt ELFCTL 1 | .Dt ELFCTL 1 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm elfctl | .Nm elfctl | ||||
.Nd change an ELF binary's feature control note | .Nd change an ELF binary's feature control note | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.Nm | .Nm | ||||
.Op Fl h | Fl -help | .Op Fl h | Fl -help | ||||
Show All 21 Lines | |||||
.Ar featurelist | .Ar featurelist | ||||
starts with one of the three operations: | starts with one of the three operations: | ||||
.Dq Li + | .Dq Li + | ||||
to turn on the features, | to turn on the features, | ||||
.Dq Li - | .Dq Li - | ||||
to turn off the features, | to turn off the features, | ||||
.Dq Li = | .Dq Li = | ||||
to only turn on the given features. | to only turn on the given features. | ||||
A comma separated list of feature names follows the operation. | A comma separated list of feature names or numeric values follows the | ||||
operation. | |||||
.El | .El | ||||
.Pp | .Pp | ||||
If | If | ||||
.Fl e | .Fl e | ||||
is not specified | is not specified | ||||
.Nm | .Nm | ||||
displays the status of each feature in the ELF note in each | displays the status of each feature in the ELF note in each | ||||
.Ar . | .Ar . | ||||
.Sh EXIT STATUS | .Sh EXIT STATUS | ||||
Exit status is 0 on success, and 1 if the command | Exit status is 0 on success, and 1 if the command | ||||
fails if a file does not exist, is too short, | fails if a file does not exist, is too short, | ||||
or fails to find or edit features note. | or fails to find or edit features note. | ||||
.Sh EXAMPLES | .Sh EXAMPLES | ||||
The following is an example of a typical usage | The following is an example of a typical usage | ||||
of the | of the | ||||
.Nm | .Nm | ||||
command: | command: | ||||
.Bd -literal -offset indent | .Bd -literal -offset indent | ||||
elfctl file | elfctl file | ||||
elfctl -e +aslr file | elfctl -e +aslr file | ||||
.Ed | |||||
.Pp | |||||
Features may be specified as numerical values: | |||||
.Bd -literal -offset -indent | |||||
elfctl -e =0x0001,0x0004 file | |||||
.Ed | |||||
.Pp | |||||
Features may also be specified as a single combined value: | |||||
.Bd -literal -offset -indent | |||||
elfctl -e =0x5 file | |||||
.Ed | .Ed | ||||
.Sh HISTORY | .Sh HISTORY | ||||
.Nm | .Nm | ||||
first appeared in | first appeared in | ||||
.Fx 12.2 . | .Fx 12.2 . | ||||
.Sh AUTHORS | .Sh AUTHORS | ||||
.Nm | .Nm | ||||
was written by | was written by | ||||
.An Bora Ozarslan Mt borako.ozarslan@gmail.com | .An Bora Ozarslan Mt borako.ozarslan@gmail.com | ||||
under sponsorship from the | under sponsorship from the | ||||
.Fx Foundation. | .Fx Foundation. |