This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ld is broken on Linux/alpha
On Fri, Nov 23, 2001 at 10:41:18PM -0800, H . J . Lu wrote:
This doesn't look correct, IMHO the gotent should be changed.
I'll read it on Monday as well as check other backends, sorry.
> --- bfd/elf64-alpha.c.merge Fri Nov 23 11:54:42 2001
> +++ bfd/elf64-alpha.c Fri Nov 23 22:28:17 2001
> @@ -3270,7 +3270,7 @@ elf64_alpha_relocate_section (output_bfd
> struct alpha_elf_link_hash_entry *h;
> Elf_Internal_Sym *sym;
> bfd_vma relocation;
> - bfd_vma addend;
> + bfd_vma addend, addend_merge;
> bfd_reloc_status_type r;
>
> r_type = ELF64_R_TYPE(rel->r_info);
> @@ -3313,6 +3313,7 @@ elf64_alpha_relocate_section (output_bfd
> h = NULL;
> sym = NULL;
> sec = NULL;
> + addend_merge = rel->r_addend;
>
> if (r_symndx < symtab_hdr->sh_info)
> {
> @@ -3404,7 +3405,8 @@ elf64_alpha_relocate_section (output_bfd
>
> BFD_ASSERT(gotent != NULL);
>
> - while (gotent->gotobj != gotobj || gotent->addend != addend)
> + while (gotent->gotobj != gotobj
> + || gotent->addend != addend_merge)
> gotent = gotent->next;
>
> BFD_ASSERT(gotent->use_count >= 1);
Jakub