This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] MIPS/BFD: Make section GC work with `ict_irix5' targets


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=12f09816cecc4e4ee7574a86846b3a17adbf7904

commit 12f09816cecc4e4ee7574a86846b3a17adbf7904
Author: Maciej W. Rozycki <macro@mips.com>
Date:   Mon Jul 2 23:57:22 2018 +0100

    MIPS/BFD: Make section GC work with `ict_irix5' targets
    
    Prevent runtime procedure table symbols, produced with `ict_irix5' MIPS
    targets, from being swept in section GC, fixing linker errors like:
    
    ./ld-new: tmpdir/dump: protected symbol `_procedure_table_size' isn't defined
    ./ld-new: final link failed: bad value
    
    triggered whenever section GC is enabled with those targets and
    consequently removing the following test suite failures:
    
    FAIL: Build pr22649-2a.so
    FAIL: Build pr22649-2c.so
    FAIL: PR ld/20828 dynamic symbols with section GC (auxiliary shared library)
    FAIL: PR ld/20828 dynamic symbols with section GC (plain)
    FAIL: PR ld/20828 dynamic symbols with section GC (version script)
    FAIL: PR ld/20828 dynamic symbols with section GC (versioned shared library)
    FAIL: PR ld/20828 dynamic symbols with section GC (versioned)
    FAIL: --gc-sections with .text._init
    FAIL: pr20022
    
    observed with `mips-elf', `tx39-elf', `mipsisa32-elf', `mipsisa64-elf',
    `mipsel-elf', `mipsisa32el-elf', `mipsisa64el-elf', `mips64vr-elf',
    `mips64vrel-elf', `mips64vr4300-elf', `mips64vr4300el-elf',
    `mips-sgi-irix5' and `mips-rtems' targets, among others.  This fix makes
    section GC usable with the affected targets.
    
    	bfd/
    	* elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
    	`mark' for symbols created from `mips_elf_dynsym_rtproc_names'
    	list.

Diff:
---
 bfd/ChangeLog    | 6 ++++++
 bfd/elfxx-mips.c | 1 +
 2 files changed, 7 insertions(+)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index c53d14d..bfe2aa2 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,11 @@
 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
 
+	* elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Set
+	`mark' for symbols created from `mips_elf_dynsym_rtproc_names'
+	list.
+
+2018-07-02  Maciej W. Rozycki  <macro@mips.com>
+
 	* elf64-mips.c (micromips_elf64_howto_table_rel): Add
 	R_MICROMIPS_HI0_LO16, R_MICROMIPS_TLS_GD, R_MICROMIPS_TLS_LDM,
 	R_MICROMIPS_TLS_DTPREL_HI16, R_MICROMIPS_TLS_DTPREL_LO16,
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 82ab417..c33b276 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -7844,6 +7844,7 @@ _bfd_mips_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
 	    return FALSE;
 
 	  h = (struct elf_link_hash_entry *) bh;
+	  h->mark = 1;
 	  h->non_elf = 0;
 	  h->def_regular = 1;
 	  h->type = STT_SECTION;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]