From 79bfb05b074873a2c02f0733456ecf269656bef6 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Mon, 2 Mar 2020 02:36:41 +0000 Subject: [PATCH] Move ELF feature note tool to usr.bin/elfctl elfctl is a tool for modifying the NT_FREEBSD_FEATURE_CTL ELF note, which contains a set of flags for enabling or disabling vulnerability mitigations and other features. Reviewed by: csjp, kib MFC after: 2 weeks Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23910 --- usr.bin/Makefile | 1 + {tools/tools/controlelf => usr.bin/elfctl}/Makefile | 5 +---- .../controlelf/controlelf.1 => usr.bin/elfctl/elfctl.1 | 10 +++++----- .../controlelf/controlelf.c => usr.bin/elfctl/elfctl.c | 0 4 files changed, 7 insertions(+), 9 deletions(-) rename {tools/tools/controlelf => usr.bin/elfctl}/Makefile (76%) rename tools/tools/controlelf/controlelf.1 => usr.bin/elfctl/elfctl.1 (96%) rename tools/tools/controlelf/controlelf.c => usr.bin/elfctl/elfctl.c (100%) diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 7528ce8455a1..cb166e99457e 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -31,6 +31,7 @@ SUBDIR= alias \ diff \ dirname \ du \ + elfctl \ elfdump \ enigma \ env \ diff --git a/tools/tools/controlelf/Makefile b/usr.bin/elfctl/Makefile similarity index 76% rename from tools/tools/controlelf/Makefile rename to usr.bin/elfctl/Makefile index 3bb7021fae8c..8b02ac727448 100644 --- a/tools/tools/controlelf/Makefile +++ b/usr.bin/elfctl/Makefile @@ -2,13 +2,10 @@ ELFTCDIR= ${SRCTOP}/contrib/elftoolchain -PROG= controlelf -SRCS= controlelf.c +PROG= elfctl LIBADD= elftc elf CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common -WARNS?= 6 - .include diff --git a/tools/tools/controlelf/controlelf.1 b/usr.bin/elfctl/elfctl.1 similarity index 96% rename from tools/tools/controlelf/controlelf.1 rename to usr.bin/elfctl/elfctl.1 index 74db3028d3df..02aa53b5f4fb 100644 --- a/tools/tools/controlelf/controlelf.1 +++ b/usr.bin/elfctl/elfctl.1 @@ -26,11 +26,11 @@ .\" .\" $FreeBSD$ .\" -.Dd September 27, 2019 -.Dt CONTROLELF 1 +.Dd March 1, 2020 +.Dt ELFCTL 1 .Os .Sh NAME -.Nm controlelf +.Nm elfctl .Nd change an ELF binary's feature control note .Sh SYNOPSIS .Nm @@ -79,8 +79,8 @@ of the .Nm command: .Bd -literal -offset indent -controlelf file -controlelf -e +aslr file +elfctl file +elfctl -e +aslr file .Ed .Sh HISTORY .Nm diff --git a/tools/tools/controlelf/controlelf.c b/usr.bin/elfctl/elfctl.c similarity index 100% rename from tools/tools/controlelf/controlelf.c rename to usr.bin/elfctl/elfctl.c