GCC modified for the FreeChainXenon project
Find a file
Marek Polacek 33ebb0dff9 configure: Implement --enable-host-bind-now
As promised in the --enable-host-pie patch, this patch adds another
configure option, --enable-host-bind-now, which adds -z now when linking
the compiler executables in order to extend hardening.  BIND_NOW with RELRO
allows the GOT to be marked RO; this prevents GOT modification attacks.

This option does not affect linking of target libraries; you can use
LDFLAGS_FOR_TARGET=-Wl,-z,relro,-z,now to enable RELRO/BIND_NOW.

With this patch:
$ readelf -Wd cc1{,plus,obj,gm2} f951 lto1 cpp  rust1 gnat1 | grep FLAGS
 0x000000000000001e (FLAGS)              BIND_NOW
 0x000000006ffffffb (FLAGS_1)            Flags: NOW PIE
 0x000000000000001e (FLAGS)              BIND_NOW
 0x000000006ffffffb (FLAGS_1)            Flags: NOW PIE
 0x000000000000001e (FLAGS)              BIND_NOW
 0x000000006ffffffb (FLAGS_1)            Flags: NOW PIE
 0x000000000000001e (FLAGS)              BIND_NOW
 0x000000006ffffffb (FLAGS_1)            Flags: NOW PIE
 0x000000000000001e (FLAGS)              BIND_NOW
 0x000000006ffffffb (FLAGS_1)            Flags: NOW PIE
 0x000000000000001e (FLAGS)              BIND_NOW
 0x000000006ffffffb (FLAGS_1)            Flags: NOW PIE
 0x000000000000001e (FLAGS)              BIND_NOW
 0x000000006ffffffb (FLAGS_1)            Flags: NOW PIE
 0x000000000000001e (FLAGS)              BIND_NOW
 0x000000006ffffffb (FLAGS_1)            Flags: NOW PIE
 0x000000000000001e (FLAGS)              BIND_NOW
 0x000000006ffffffb (FLAGS_1)            Flags: NOW PIE

c++tools/ChangeLog:

	* configure.ac (--enable-host-bind-now): New check.
	* configure: Regenerate.

gcc/ChangeLog:

	* configure.ac (--enable-host-bind-now): New check.  Add
	-Wl,-z,now to LD_PICFLAG if --enable-host-bind-now.
	* configure: Regenerate.
	* doc/install.texi: Document --enable-host-bind-now.

lto-plugin/ChangeLog:

	* configure.ac (--enable-host-bind-now): New check.  Link with
	-z,now.
	* configure: Regenerate.
2023-06-22 13:43:32 -04:00
c++tools configure: Implement --enable-host-bind-now 2023-06-22 13:43:32 -04:00
config Daily bump. 2022-11-15 08:32:29 +00:00
contrib diagnostics: add support for "text art" diagrams 2023-06-21 21:49:00 -04:00
fixincludes Daily bump. 2023-06-16 00:17:18 +00:00
gcc configure: Implement --enable-host-bind-now 2023-06-22 13:43:32 -04:00
gnattools Daily bump. 2023-04-26 00:17:46 +00:00
gotools Daily bump. 2022-08-31 00:16:45 +00:00
include Daily bump. 2023-06-13 00:17:29 +00:00
INSTALL
intl Daily bump. 2023-06-16 00:17:18 +00:00
libada Update copyright years. 2023-01-16 11:52:17 +01:00
libatomic Daily bump. 2023-06-11 00:17:37 +00:00
libbacktrace Daily bump. 2023-03-29 00:17:01 +00:00
libcc1 Daily bump. 2023-05-19 00:17:43 +00:00
libcody Daily bump. 2023-06-16 00:17:18 +00:00
libcpp diagnostics: add support for "text art" diagrams 2023-06-21 21:49:00 -04:00
libdecnumber Daily bump. 2023-06-16 00:17:18 +00:00
libffi Daily bump. 2023-05-07 00:16:40 +00:00
libgcc Daily bump. 2023-06-20 00:17:14 +00:00
libgfortran Daily bump. 2023-06-12 00:16:56 +00:00
libgm2 Daily bump. 2023-06-03 00:16:48 +00:00
libgo runtime: use a C function to call mmap 2023-06-20 09:55:58 -07:00
libgomp libgomp.texi: Improve OpenMP ICV description 2023-06-22 14:57:54 +02:00
libiberty Daily bump. 2023-06-16 00:17:18 +00:00
libitm Daily bump. 2023-06-03 00:16:48 +00:00
libobjc Daily bump. 2023-05-23 00:17:11 +00:00
libphobos Daily bump. 2023-03-18 00:16:40 +00:00
libquadmath Daily bump. 2023-03-03 00:16:38 +00:00
libsanitizer Daily bump. 2023-05-01 00:16:44 +00:00
libssp Update copyright years. 2023-01-16 11:52:17 +01:00
libstdc++-v3 Daily bump. 2023-06-21 00:17:14 +00:00
libvtv Update copyright years. 2023-01-16 11:52:17 +01:00
lto-plugin configure: Implement --enable-host-bind-now 2023-06-22 13:43:32 -04:00
maintainer-scripts Daily bump. 2023-04-21 00:17:31 +00:00
zlib Daily bump. 2023-06-17 00:17:17 +00:00
.dir-locals.el dir-locals: Use https for bug references 2021-07-20 11:40:34 +01:00
.gitattributes
.gitignore .gitignore: do not ignore config.h 2022-07-19 17:07:04 +03:00
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2023-06-17 00:17:17 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub config.sub: change mode to 755. 2021-12-21 09:10:57 +01:00
configure configure: Implement --enable-host-pie 2023-06-15 16:51:27 -04:00
configure.ac configure: Implement --enable-host-pie 2023-06-15 16:51:27 -04:00
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
depcomp
install-sh
libtool-ldflags
libtool.m4 Generic configury support for shared libs on VxWorks 2022-10-11 07:31:07 +00:00
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
MAINTAINERS MAINTAINERS: move Matthew Fortune to Write After Approval 2023-06-16 16:09:20 +08:00
Makefile.def configure: Do not build the ununsed libffi shared library. 2022-12-31 17:51:47 +00:00
Makefile.in Disable warnings as errors for STAGEautofeedback. 2023-05-17 22:43:49 -07:00
Makefile.tpl Disable warnings as errors for STAGEautofeedback. 2023-05-17 22:43:49 -07:00
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.