Go to file
Richard Sandiford e94797250b arm: Fix canary address calculation for non-PIC
For non-PIC, the stack protector patterns did:

	  rtx mem = XEXP (force_const_mem (SImode, operands[1]), 0);
	  emit_move_insn (operands[2], mem);

Here, operands[1] is the address of the canary (&__stack_chk_guard)
and operands[2] is the register that we want to move that address into.
However, the code above instead sets operands[2] to the address of a
constant pool entry that contains &__stack_chk_guard, rather than to
&__stack_chk_guard itself.  The sequence therefore does one less
pointer indirection than it should.

The net effect was to use &__stack_chk_guard for stack-smash detection,
instead of using __stack_chk_guard itself.

gcc/
	* config/arm/arm.md (*stack_protect_combined_set_insn): For non-PIC,
	load the address of the canary rather than the address of the
	constant pool entry that points to it.
	(*stack_protect_combined_test_insn): Likewise.

gcc/testsuite/
	* gcc.target/arm/stack-protector-3.c: New test.
	* gcc.target/arm/stack-protector-4.c: Likewise.
2020-09-24 10:06:11 +01:00
config
contrib Daily bump. 2020-09-22 00:16:31 +00:00
fixincludes Daily bump. 2020-09-18 00:16:24 +00:00
gcc arm: Fix canary address calculation for non-PIC 2020-09-24 10:06:11 +01:00
gnattools
gotools
include Daily bump. 2020-09-16 00:16:37 +00:00
INSTALL
intl
libada
libatomic
libbacktrace Daily bump. 2020-09-24 00:16:31 +00:00
libcc1
libcpp Daily bump. 2020-09-18 00:16:24 +00:00
libdecnumber
libffi Re: [RS6000] Power10 libffi fixes 2020-09-24 15:02:19 +09:30
libgcc Daily bump. 2020-09-23 00:16:27 +00:00
libgfortran
libgo libgo: update to Go1.15.2 release 2020-09-23 17:32:49 -07:00
libgomp Daily bump. 2020-09-23 00:16:27 +00:00
libhsail-rt
libiberty
libitm
libobjc
liboffloadmic
libphobos
libquadmath
libsanitizer Daily bump. 2020-09-22 00:16:31 +00:00
libssp
libstdc++-v3 Daily bump. 2020-09-23 00:16:27 +00:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2020-09-19 00:16:29 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS MAINTAINERS: Add myself for write after approval. 2020-09-18 15:31:46 +01:00
Makefile.def
Makefile.in
Makefile.tpl
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.