binutils-gdb/ld/testsuite/ld-cris/tls-gc-71.d
Alan Modra c4621b339e Fix garbage collection of common symbols
Running lang_common before garbage collection means slightly less work
in garbage collection code, since common symbols should no longer
appear there.  It does have the side effect of keeping linker script
symbols (at least those defined outside of sections) global too,
hence some testsuite churn.

bfd/
	PR 17165
	* elf-bfd.h (ELF_COMMON_DEF): Note that this might be true for
	linker script assignments too.
	* elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
	(bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
ld/
	PR 17165
	* ldlang.c (lang_process): Run lang_common before lang_gc_sections.
ld/testsuite/
	* ld-gc/pr14265.d,
	* ld-cris/tls-gc-68.d,
	* ld-cris/tls-gc-69.d,
	* ld-cris/tls-gc-70.d,
	* ld-cris/tls-gc-71.d,
	* ld-cris/tls-gc-75.d,
	* ld-cris/tls-gc-76.d,
	* ld-cris/tls-gc-79.d,
	* ld-mmix/bpo-10.d,
	* ld-mmix/bpo-11.d: Update.
2015-01-19 21:26:30 +10:30

33 lines
870 B
Makefile

#source: tls-gc-71.s
#source: init.s
#source: tls128g.s
#source: tls-hx.s
#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
#ld: --shared -m crislinux --gc-sections
#objdump: -s -t -R -p -T
# DSO with a single R_CRIS_16_DTPREL against a hidden symbol, gc:ed.
# Check that we still have the other, global, TLS variable.
.*: file format elf32-cris
#...
TLS off .*
filesz 0x0+80 memsz 0x0+80 flags r--
#...
DYNAMIC SYMBOL TABLE:
0+18e l d \.text 0+ \.text
0+2194 l d \.tdata 0+ \.tdata
0+18e g DF \.text 0+2 _init
0+2280 g D \.got 0+ __bss_start
0+ g D .tdata 0+80 tls128
0+2280 g D \.got 0+ _edata
0+2280 g D \.got 0+ _end
DYNAMIC RELOCATION RECORDS \(none\)
#...
Contents of section \.text:
018e 0f050000 .*
#...
Contents of section \.got:
2274 14220000 00000000 00000000 .*