This is the mail archive of the binutils@sources.redhat.com 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]

Re: [BUG] ld segfault in binutils-2.13.90.0.20 when compiling


Alan Modra wrote:
On Fri, Mar 28, 2003 at 10:56:47AM -0500, Nicholas Wourms wrote:

#2  0x4003d68d in mips_elf_got_section (abfd=0x0,
maybe_excluded=0) at ../../binutils/bfd/elfxx-mips.c:1679
#3  0x4004a776 in _bfd_mips_elf_hide_symbol (info=0x80a1ea0,
entry=0x80c06f8, force_local=1) at
../../binutils/bfd/elfxx-mips.c:7719
#4  0x40054c6c in elf_link_add_object_symbols
(abfd=0x80bb448, info=0x80a1ea0) at elflink.h:2123


_bfd_mips_elf_hide_symbol needs to handle the case where dynobj is
NULL.  That's probably just a matter of

Index: bfd/elfxx-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-mips.c,v
retrieving revision 1.46
diff -u -p -r1.46 elfxx-mips.c
--- bfd/elfxx-mips.c 12 Mar 2003 23:05:51 -0000 1.46
+++ bfd/elfxx-mips.c 29 Mar 2003 07:15:34 -0000
@@ -7537,6 +7537,8 @@ _bfd_mips_elf_hide_symbol (info, entry, h->forced_local = TRUE;
dynobj = elf_hash_table (info)->dynobj;
+ if (dynobj != NULL)
+ {
got = mips_elf_got_section (dynobj, FALSE);
g = mips_elf_section_data (got)->u.got_info;
@@ -7585,6 +7587,7 @@ _bfd_mips_elf_hide_symbol (info, entry, BFD_ASSERT (g->global_gotno > 0);
g->local_gotno++;
g->global_gotno--;
+ }
}
_bfd_elf_link_hash_hide_symbol (info, &h->root, force_local);


and some reformatting, but don't trust this patch.  I try not to
dabble with mips too much.

I don't know if it is the "right" thing to do, but it appears to work... well it let me compile glibc anyhow. I'll let the mips binutils experts comment on the correctness of this fix...


Cheers,
Nicholas



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