freebsd-dev/share/mk
Ed Maste bf81eb3ca9 Add a WITH_BIND_NOW build knob
The linker's -z now flag sets the DF_BIND_NOW flag, which signals to the
runtime loader that all relocation processing should be performed at
process startup rather than on demand.  In combination with lld's
default of enabling relro this causes the GOT to be made read-only when
the process starts, preventing straightforward GOT overwrite attacks.

Shawn Webb discovered a failure on HardenedBSD with BIND_NOW and ifunc
use, which resulted in my rtld fix in r340137.  Add a BIND_NOW knob as
it is trivial to do so and is a useful ELF hardening feature.  This
change is equivalent to HardenedBSD's but not identical as there are
other diffs/conflicts nearby.

Note that our ELF Tool Chain readelf does not currently decode the
DF_BIND_NOW flag - see PR232983.

Reviewed by:	brooks
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D17846
2018-11-06 15:52:49 +00:00
..
atf.test.mk Feex a cuple of small typos 2018-07-27 10:44:38 +00:00
auto.obj.mk Ensure .OBJDIR has known value 2017-11-04 21:02:26 +00:00
bsd.arch.inc.mk
bsd.clang-analyze.mk Add some missed OBJS_SRCS_FILTER from r323637. 2017-11-10 08:00:09 +00:00
bsd.compiler.mk Don't run cc --version during cleandir/obj stages 2018-10-31 10:45:28 +00:00
bsd.confs.mk Add beforeinstallconfig to bsd.confs.mk to enable running commands prior to 2018-08-28 22:22:06 +00:00
bsd.cpu.mk Enable 'C'-compressed ISA extension. 2018-09-03 14:43:16 +00:00
bsd.crunchgen.mk rescue: Restore 'make depend' call to fix WITH_META_MODE after r334008. 2018-05-24 18:49:19 +00:00
bsd.dep.mk Created static libc PIC/no-SSP library to be used by rtld. 2018-05-09 10:28:24 +00:00
bsd.dirs.mk DIRS: Rework how duplicated dirs are installed. 2018-09-17 22:15:12 +00:00
bsd.doc.mk Revert crap accidentally committed 2017-01-28 16:31:23 +00:00
bsd.dtb.mk Use known SRCTOP if possible to determine SYSDIR. 2018-04-12 20:48:17 +00:00
bsd.endian.mk Add -b/-l options to localedef(1) to specify output endianness and use 2018-10-20 20:51:05 +00:00
bsd.files.mk Update dirdeps.mk et al to latest 2018-08-02 21:33:45 +00:00
bsd.incs.mk Reapply r295227: Stop hiding link install commands. 2017-11-06 19:33:50 +00:00
bsd.info.mk Revert r301079. 2016-06-03 19:25:36 +00:00
bsd.init.mk Reduce exec and fstat overhead for non-build targets. 2018-06-20 17:20:39 +00:00
bsd.kmod.mk Use known SRCTOP if possible to determine SYSDIR. 2018-04-12 20:48:17 +00:00
bsd.lib.mk Add a WITH_BIND_NOW build knob 2018-11-06 15:52:49 +00:00
bsd.libnames.mk libbe(3): Add to bsd.libnames.mk 2018-08-11 04:07:00 +00:00
bsd.linker.mk Only compute the X_COMPILER_*/X_LINKER_* variables when needed 2018-10-23 06:31:25 +00:00
bsd.links.mk Reapply r295227: Stop hiding link install commands. 2017-11-06 19:33:50 +00:00
bsd.man.mk Correct link metadata created when installing with -DNO_ROOT. 2018-06-29 16:07:56 +00:00
bsd.mkopt.mk
bsd.nls.mk Move all of the directory path into the DIR part of the component and make the 2018-05-31 13:26:12 +00:00
bsd.obj.mk AUTO_OBJ: Don't create nested OBJDIRS with print-dir or make -n. 2017-12-06 21:00:41 +00:00
bsd.opts.mk Add a WITH_BIND_NOW build knob 2018-11-06 15:52:49 +00:00
bsd.own.mk Correct default path of kernel modules. 2018-08-09 16:42:13 +00:00
bsd.port.mk
bsd.port.options.mk
bsd.port.post.mk
bsd.port.pre.mk
bsd.port.subdir.mk
bsd.prog.mk Add a WITH_BIND_NOW build knob 2018-11-06 15:52:49 +00:00
bsd.progs.mk PROGS: Don't redundantly process DIRS. 2018-09-17 22:15:06 +00:00
bsd.README Add the initial DIRS infrastructure for creating directories with the 2018-07-23 16:11:03 +00:00
bsd.snmpmod.mk Update bsnmp to version 1.13. This does not bring user-visible changes. 2018-07-03 08:44:40 +00:00
bsd.subdir.mk installdirs can be a recursive/standalone target. 2018-09-17 22:15:09 +00:00
bsd.suffixes-posix.mk Extract suffix rules into bsd.suffixes[-posix].mk. 2016-10-12 00:42:46 +00:00
bsd.suffixes.mk CCACHE_BUILD: Don't try using ccache for compile-linking .c files. 2018-06-27 16:58:07 +00:00
bsd.symver.mk
bsd.sys.mk DIRS: installdirs should also be .PHONY 2018-09-17 22:14:53 +00:00
bsd.test.mk Feex a cuple of small typos 2018-07-27 10:44:38 +00:00
dirdeps-options.mk Update dirdeps.mk et al to latest 2018-08-02 21:33:45 +00:00
dirdeps.mk Update dirdeps.mk et al to latest 2018-08-02 21:33:45 +00:00
gendirdeps.mk Update dirdeps.mk et al to latest 2018-08-02 21:33:45 +00:00
host-target.mk
install-new.mk
local.autodep.mk Update dirdeps.mk et al to latest 2018-08-02 21:33:45 +00:00
local.dirdeps.mk Update dirdeps.mk et al to latest 2018-08-02 21:33:45 +00:00
local.gendirdeps.mk Update dirdeps.mk et al to latest 2018-08-02 21:33:45 +00:00
local.init.mk
local.meta.sys.mk Update dirdeps.mk et al to latest 2018-08-02 21:33:45 +00:00
local.sys.env.mk AUTO_OBJ: Hide 'creating dirs' output with 'make -s'. 2017-11-08 16:03:58 +00:00
local.sys.mk Follow-up r320061: Need to respect make.conf/env LIBDIR overrides. 2017-06-19 18:08:02 +00:00
Makefile Update dirdeps.mk et al to latest 2018-08-02 21:33:45 +00:00
meta2deps.py Update dirdeps.mk et al to latest 2018-08-02 21:33:45 +00:00
meta2deps.sh Update meta* from bmake-20161212 2016-12-23 02:57:00 +00:00
meta.autodep.mk Update dirdeps.mk et al to latest 2018-08-02 21:33:45 +00:00
meta.stage.mk Update dirdeps.mk et al to latest 2018-08-02 21:33:45 +00:00
meta.subdir.mk
meta.sys.mk Update dirdeps.mk et al to latest 2018-08-02 21:33:45 +00:00
netbsd-tests.test.mk
plain.test.mk Feex a cuple of small typos 2018-07-27 10:44:38 +00:00
src.init.mk
src.libnames.mk Add libssl to libldns for DANE. 2018-10-12 05:27:58 +00:00
src.opts.mk Drop ed(1) "crypto" 2018-11-04 17:56:16 +00:00
src.sys.env.mk Ignore MAKEOBJDIRPREFIX from src-env.conf in sub-makes. 2018-03-03 23:23:01 +00:00
src.sys.mk Enable AUTO_OBJ by default if the OBJDIR is writable, only for in-tree builds. 2017-11-02 18:09:07 +00:00
src.sys.obj.mk tinderbox: Only build clang/lld once if needed. 2018-06-27 16:58:10 +00:00
stage-install.sh
suite.test.mk MFhead@r325422 2017-11-05 04:08:00 +00:00
sys.dependfile.mk Merge bmake-20160307 2016-03-11 01:35:39 +00:00
sys.mk Reduce exec and fstat overhead for non-build targets. 2018-06-20 17:20:39 +00:00
tap.test.mk Feex a cuple of small typos 2018-07-27 10:44:38 +00:00
version_gen.awk share and pc-sysinstall: adoption of SPDX licensing ID tags. 2017-11-27 15:28:26 +00:00