binutils-gdb/ld/testsuite
H.J. Lu bba037e0ae Always keep sections marked with SEC_KEEP
SEC_KEEP check in elf_gc_sweep was missing in commit:

commit bde6f3eb6d
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Jan 8 01:43:23 2010 +0000

    Set SEC_KEEP on section XXX for undefined __start_XXX/__stop_XXX

    bfd/

    2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>

      PR ld/11133
      * elflink.c (_bfd_elf_gc_mark_hook): Check section XXX for
      undefined __start_XXX/__stop_XXX in all input files and set
      SEC_KEEP.

This patch adds SEC_KEEP check to elf_gc_sweep.

bfd/

	PR ld/19161
	* elflink.c (elf_gc_sweep): Always keep sections marked with
	SEC_KEEP.

ld/testsuite/

	PR ld/19161
	* ld-gc/gc.exp: Run pr19161 test.
	* ld-gc/pr19161-1.c: New file.
	* ld-gc/pr19161-2.c: Likewise.
	* ld-gc/pr19161.d: Likewise.
2015-10-22 12:23:03 -07:00
..
config objcopy --extract-symbol testcase 2015-10-15 23:38:29 +10:30
ld-aarch64 [LD][AARCH64]Add TLSIE relaxation support under large memory model. 2015-10-02 17:56:09 +01:00
ld-alpha Properly place the NULL STT_FILE symbol revistited 2015-02-18 00:31:52 +10:30
ld-arm [ARM] Fix extern protected data handling 2015-07-27 11:45:27 +01:00
ld-auto-import ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-avr Define DIFF_EXPR_OK for avr target to allow PC relative difference relocation. 2015-07-08 21:41:52 +03:00
ld-bootstrap Remove --with-zlib from ld 2015-03-31 03:59:04 -07:00
ld-cdtest ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-checks ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-cris Strip undefined symbols from .symtab 2015-02-19 13:36:34 +10:30
ld-crx ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-cygwin ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-d10v ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-discard ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-elf Add test to ensure that ternary linker script operators copy symbol flags. 2015-10-19 14:32:54 +01:00
ld-elfcomm ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-elfvers Pass $PLT_CFLAGS to build_binary 2015-07-27 05:13:55 -07:00
ld-elfvsb Pass $PLT_CFLAGS to ld_compile 2015-07-27 05:15:01 -07:00
ld-elfweak ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-fastcall ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-frv ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-gc Always keep sections marked with SEC_KEEP 2015-10-22 12:23:03 -07:00
ld-h8300 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-i386 Add "-z call-nop=PADDING" option to ld 2015-10-22 04:56:39 -07:00
ld-ia64 Strip undefined symbols from .symtab 2015-02-19 13:36:34 +10:30
ld-ifunc Add R_X86_64_[REX_]GOTPCRELX support to gas and ld 2015-10-22 04:49:38 -07:00
ld-libs ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-linkonce ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-m68hc11 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-m68k ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-mep ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-metag ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-mips-elf Update MIPS PIE tests for DF_1_PIE change 2015-09-22 11:12:01 -07:00
ld-misc ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-mmix Update .strtab section sizes in mmix tests 2015-06-25 10:07:53 -07:00
ld-mn10300 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-nds32 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-nios2 Add Nios II arch flags and compatibility tests 2015-07-01 15:55:28 -07:00
ld-pe Fix building PE test executables in environments where $CFLAGS is needed. 2015-05-29 11:51:41 +01:00
ld-pie ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-plugin Add "ld -r" tests for PR ld/15323 2015-09-11 10:02:57 -07:00
ld-powerpc Add reloc sort test 2015-08-27 23:21:21 +09:30
ld-s390 S/390: Fix gotreloc_31-1 testcase. 2015-04-27 10:24:24 +02:00
ld-scripts Allow mmix-knuth-mmixware adjustments to objcopy --extract-symbols test. 2015-10-22 16:16:09 +02:00
ld-selective ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-sh Don't hardcode offset of .shstrtab section 2015-04-20 09:55:47 -07:00
ld-shared Pass $PLT_CFLAGS to ld_compile 2015-07-27 05:17:26 -07:00
ld-size Move run-time support check for size relocation 2015-07-29 10:52:38 -07:00
ld-sparc Pad only text sections at end by default 2015-02-28 22:26:56 +10:30
ld-spu ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-srec Append $PLT_CFLAGS to CC/CXX for S-records tests 2015-07-27 05:18:20 -07:00
ld-tic6x Don't hardcode offset of .shstrtab section 2015-04-20 09:55:47 -07:00
ld-tilegx Pad only text sections at end by default 2015-02-28 22:26:56 +10:30
ld-tilepro Pad only text sections at end by default 2015-02-28 22:26:56 +10:30
ld-undefined ld: Add '--require-defined' command line option. 2015-08-04 10:00:05 +01:00
ld-unique ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-v850 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-vax-elf ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-versados ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-visium ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-vxworks ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-x86-64 Add "-z call-nop=PADDING" option to ld 2015-10-22 04:56:39 -07:00
ld-xc16x ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-xstormy16 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ld-xtensa Update xtensa linker tests 2015-06-27 16:25:34 -07:00
lib Skip IFUNC relocations in debug sections 2015-08-11 12:59:11 -07:00
ChangeLog Always keep sections marked with SEC_KEEP 2015-10-22 12:23:03 -07:00
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013 New Year - binutils ChangeLog rotation 2014-01-08 05:32:12 -08:00
ChangeLog-2014 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ChangeLog-9303