[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
powerpc-elf ld crashes
From: |
Ryan T. Sammartino |
Subject: |
powerpc-elf ld crashes |
Date: |
Sun, 3 Mar 2002 14:47:39 -0800 |
User-agent: |
Mutt/1.3.27i |
Hello
I have tried various version of binutils from the last official release
to various snapshots and have run into this problem on each version.
ld is configured for powerpc-elf, and whenever it tries to resolve
relocations in a proprietary library that I need to use (this library
contains things like crt0.o for the particular embedded system I'm
working on) it crashes at line 6603 of bfd/elflink.h:
(gdb) list
6598 {
6599 struct elf_link_hash_entry *h;
6600
6601 h = sym_hashes[r_symndx - extsymoff];
6602 while (h->root.type ==bfd_link_hash_indirect
6603 || h->root.type ==bfd_link_hash_warning)
6604 h = (struct elf_link_hash_entry
*)h->root.u.i.link;
6605
6606 /* Complain if the definition comes from a
6607 discarded section. */
(gdb) print h
$27 = (struct elf_link_hash_entry *) 0x0
It is currently working on the ".init" section of crt0.o (this is where
the entry symbol __start lives):
(gdb) print o->name
$29 = 0x80ec7c6 ".init"
and it is working on the 11th symbol:
(gdb) print relend-rel
$30 = 11
according to objdump -r, the 11th symbol is:
0000003e R_PPC_ADDR16_LO _e_bss
Now, there are other symbols of type R_PPC_ADDR16_LO which work fine, so
I don't think it's related to the type. In fact, by feeding it various
.o files from this proprietary library no real pattern emerges, except
that they all crash at the same place with h being NULL.
So, my questions are:
- has anyone else every seen this? If so, what was the fix/workaround?
- what does it mean when h is NULL? Or is the problem that r_symndx
and/or extsymoff are incorrect?
- what's a good place to start figuring out how ld works if you've never
worked with its internals before? :)
If there is any other information that you would need, don't hesitate to
ask.
Thanks
--
Ryan T. Sammartino
http://members.shaw.ca/ryants/
Hackers of the world, unite!
- powerpc-elf ld crashes,
Ryan T. Sammartino <=