+2010-11-04 Maciej W. Rozycki <macro@codesourcery.com>
+
+ PR ld/10144
+ * elfxx-mips.c (_bfd_mips_elf_check_relocs)
+ [R_MIPS_32, R_MIPS_REL32, R_MIPS_64]: Ignore relocs from
+ SEC_DEBUGGING sections.
+
2010-11-04 Tristan Gingold <gingold@adacore.com>
* vms-lib.c (vms_write_index): Fix thinko: reverse the loop.
elf_hash_table (info)->dynobj = dynobj = abfd;
break;
}
+ /* For sections that are not SEC_ALLOC a copy reloc would be
+ output if possible (implying questionable semantics for
+ read-only data objects) or otherwise the final link would
+ fail as ld.so will not process them and could not therefore
+ handle any outstanding dynamic relocations.
+
+ For such sections that are also SEC_DEBUGGING, we can avoid
+ these problems by simply ignoring any relocs as these
+ sections have a predefined use and we know it is safe to do
+ so.
+
+ This is needed in cases such as a global symbol definition
+ in a shared library causing a common symbol from an object
+ file to be converted to an undefined reference. If that
+ happens, then all the relocations against this symbol from
+ SEC_DEBUGGING sections in the object file will resolve to
+ nil. */
+ if ((sec->flags & SEC_DEBUGGING) != 0)
+ break;
/* Fall through. */
default: