binutils-gdb/ld/emultempl
Alan Modra 5fd104addf Emit a warning when -z relro is unsupported
ld silently accepts -z relro and -z norelro for targets that lack the
necessary GNU_RELRO support.  This patch makes those targets emit a
warning instead, and adds testsuite infrastructure to detect when
relro is unsupported.

binutils/
	* testsuite/config/default.exp (ld_elf_shared_opt): Don't set.
	* testsuite/lib/binutils-common.exp (check_relro_support): New proc.
	(run_dump_test): Use check_relro_support to decide whether to pass
	extra ld option "-z norelro".
ld/
	* emultempl/elf.em (gld${EMULATION_NAME}_handle_option): Omit
	-z relro and -z norelro when target support for GNU_RELRO is lacking.
	(gld${EMULATION_NAME}_before_parse): Ignore RELRO default too.
	* emultempl/aarch64elf.em (gld${EMULATION_NAME}_before_parse): Ignore
	RELRO default when target support for GNU_RELRO is lacking.
	* emultempl/armelf.em (gld${EMULATION_NAME}_before_parse): Likewise.
	* emultempl/linux.em (gld${EMULATION_NAME}_before_parse): Likewise.
	* emultempl/scoreelf.em (gld${EMULATION_NAME}_before_parse): Likewise.
	* testsuite/config/default.exp (ld_elf_shared_opt): Don't set.
	* testsuite/ld-elf/pr16322.d: xfail when no relro support.
	* testsuite/ld-elf/pr22393-1a.d: Likewise.
	* testsuite/ld-elf/pr22393-1b.d: Likewise.
	* testsuite/ld-elf/shared.exp (pr20995-2.so, pr20995-2): Likewise.
	* testsuite/lib/ld-lib.exp (run_ld_link_tests): Use check_relro_support
	to decide whether to pass extra ld option "-z norelro".
2020-06-19 09:50:20 +09:30
..
aarch64elf.em Emit a warning when -z relro is unsupported 2020-06-19 09:50:20 +09:30
aix.em Show AIX gc'd symbol address adjustments in map file 2020-05-18 22:41:32 +09:30
alphaelf.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
arclinux.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
armcoff.em Show AIX gc'd symbol address adjustments in map file 2020-05-18 22:41:32 +09:30
armelf.em Emit a warning when -z relro is unsupported 2020-06-19 09:50:20 +09:30
astring.sed
avrelf.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
beos.em Use bfd_get_filename throughout ld 2020-05-19 12:57:15 +09:30
bfin.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
cr16elf.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
crxelf.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
cskyelf.em Indent labels 2020-02-26 10:37:25 +10:30
elf-generic.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
elf-x86.em x86: Check static link of dynamic objects 2020-03-13 07:39:06 -07:00
elf.em Emit a warning when -z relro is unsupported 2020-06-19 09:50:20 +09:30
epiphanyelf_4x4.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
genelf.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
generic.em Show AIX gc'd symbol address adjustments in map file 2020-05-18 22:41:32 +09:30
hppaelf.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ia64elf.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
irix.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
linux.em Emit a warning when -z relro is unsupported 2020-06-19 09:50:20 +09:30
m68hc1xelf.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
m68kelf.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
metagelf.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
mipself.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
mmix-elfnmmo.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
mmixelf.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
mmo.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
msp430.em Replace "if (x) free (x)" with "free (x)", ld 2020-05-21 10:45:33 +09:30
nds32elf.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
needrelax.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
netbsd.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
nios2elf.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ostring.sed
pdp11.em Fixes for the magic number used in PDP11 AOUT binaries. 2020-04-14 14:41:27 +01:00
pe.em Replace "if (x) free (x)" with "free (x)", ld 2020-05-21 10:45:33 +09:30
pep.em Replace "if (x) free (x)" with "free (x)", ld 2020-05-21 10:45:33 +09:30
ppc32elf.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ppc64elf.em Replace "if (x) free (x)" with "free (x)", ld 2020-05-21 10:45:33 +09:30
pruelf.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
README Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
riscvelf.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
rxelf.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
rxlinux.em ld: Add rx-linux emulation. gas: Change ELF flags initial value in rx-linux 2020-04-30 13:35:37 +01:00
s390.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
scoreelf.em Emit a warning when -z relro is unsupported 2020-06-19 09:50:20 +09:30
solaris2-x86.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
solaris2.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
spu_icache.o_c
spu_icache.S
spu_ovl.o_c Regenerate spu_ovl.o_c 2016-10-15 12:53:57 +10:30
spu_ovl.S Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
spuelf.em Use bfd_get_filename throughout ld 2020-05-19 12:57:15 +09:30
tic6xdsbt.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
ticoff.em Show AIX gc'd symbol address adjustments in map file 2020-05-18 22:41:32 +09:30
v850elf.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
vanilla.em Show AIX gc'd symbol address adjustments in map file 2020-05-18 22:41:32 +09:30
vms.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
vxworks.em Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
xtensaelf.em xtensa: allow runtime ABI selection 2020-06-15 13:01:30 -07:00
z80.em Various fixes for the Z80 support. 2020-02-19 17:46:10 +00:00

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

The files in this directory are sourced by genscripts.sh, after
setting some variables to substitute in, to produce
C source files that contain jump tables for each emulation.

Copyright (C) 2012-2020 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.