This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
fix elf64-alpha link
- From: Richard Henderson <rth at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: Sat, 1 Jun 2002 14:26:07 -0700
- Subject: fix elf64-alpha link
Exposed by libstdc++ tests.
r~
* elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
check; don't suppress dynamic relocs for non-allocated sections.
Index: elf64-alpha.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-alpha.c,v
retrieving revision 1.63
diff -c -p -d -u -r1.63 elf64-alpha.c
--- elf64-alpha.c 30 May 2002 22:01:28 -0000 1.63
+++ elf64-alpha.c 1 Jun 2002 21:24:04 -0000
@@ -2640,7 +2640,7 @@ elf64_alpha_check_relocs (abfd, info, se
if (h && ((info->shared
&& (!info->symbolic || info->allow_shlib_undefined))
|| ! (h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
- || h->root.type == bfd_link_hash_defweak))
+ || h->root.root.type == bfd_link_hash_defweak))
maybe_dynamic = true;
need = 0;
@@ -2815,12 +2815,13 @@ elf64_alpha_check_relocs (abfd, info, se
else
rent->count++;
}
- else if (info->shared && (sec->flags & SEC_ALLOC))
+ else if (info->shared)
{
/* If this is a shared library, and the section is to be
loaded into memory, we need a RELATIVE reloc. */
sreloc->_raw_size += sizeof (Elf64_External_Rela);
- if (sec->flags & SEC_READONLY)
+ if ((sec->flags & (SEC_READONLY | SEC_ALLOC))
+ == (SEC_READONLY | SEC_ALLOC))
info->flags |= DF_TEXTREL;
}
}