This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: IA64 linker is totally broken (Re: PATCH: ELF linker is broken)
On Wed, Feb 02, 2005 at 10:27:01AM +1030, Alan Modra wrote:
> On Tue, Feb 01, 2005 at 02:45:50PM -0800, H. J. Lu wrote:
> > There are quite a few failures on ia64. I am not sure if they can be
> > fixed by a single change. I am enclosing the cause of all the problems
> > I have seen so far on ia64. IA64 linker has a relaxation pass, which
> > seems to be the problem. Dos it ring a bell to you? If not, I will
> > send you a bunch of ia64 binaries as a testcase.
>
> Please send me the binaries! I can only make wild guesses otherwise.
> BTW, I still can't send email to you directly. Your anti-spam filters
> don't like my ISP's mail hub, nor do they like smtp directly from my
I will see what I can do.
> dynamic ip address. :-( Hmm, a bounce through gcc.gnu.org might
> work.
>
I have sent you a testcase. I think this patch should do the trick.
We have to keep the next pointer. Otherwise, out hash table may be
screwed up.
H.J.
--- elflink.c.relax 2005-01-31 21:41:46.000000000 -0800
+++ elflink.c 2005-02-01 16:35:34.177300019 -0800
@@ -2829,6 +2829,7 @@ elf_smash_syms (struct elf_link_hash_ent
{
struct elf_smash_syms_data *inf = (struct elf_smash_syms_data *) data;
struct bfd_link_hash_entry *bh;
+ struct bfd_hash_entry *next;
switch (h->root.type)
{
@@ -2865,12 +2866,14 @@ elf_smash_syms (struct elf_link_hash_ent
/* Set sym back to newly created state, but keep undefs list pointer. */
bh = h->root.u.undef.next;
+ next = h->root.root.next;
if (bh != NULL || inf->htab->root.undefs_tail == &h->root)
inf->twiddled = TRUE;
(*inf->htab->root.table.newfunc) (&h->root.root,
&inf->htab->root.table,
h->root.root.string);
h->root.u.undef.next = bh;
+ h->root.root.next = next;
h->root.u.undef.abfd = inf->not_needed;
h->non_elf = 0;
return TRUE;