This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Porting the bug fix to Bug ld/19704 Missing dynamic relocation against undefined weak symbol into SPARC
- From: Nick Clifton <nickc at redhat dot com>
- To: Qing Zhao <qing dot zhao at oracle dot com>, binutils at sourceware dot org
- Date: Mon, 10 Apr 2017 12:48:29 +0100
- Subject: Re: [PATCH] Porting the bug fix to Bug ld/19704 Missing dynamic relocation against undefined weak symbol into SPARC
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=nickc at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D46E27D0C4
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D46E27D0C4
- References: <PATCH on SPARC> <1490637676-285507-1-git-send-email-qing.zhao@oracle.com> <CB47AC02-F61E-40C4-BE1B-B0394562EFB4@oracle.com>
Hi Qing,
> ping!
Oops - sorry!
>> 2017-03-21 Qing Zhao <qing.zhao@oracle.com>
>>
>> * elf32-sparc.c
>> (elf_backend_fixup_symbol): New.
>> * elf64-sparc.c.
>> (elf_backend_fixup_symbol): New.
>> * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
>> (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
>> has_non_got_reloc.
>> (link_hash_newfunc): Initialize has_got_reloc and
>> has_non_got_reloc.
>> (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
>> section.
>> (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
>> has_non_got_reloc.
>> (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
>> has_non_got_reloc.
>> (_bfd_sparc_elf_fixup_symbol): New function.
>> (allocate_dynrelocs): Don't allocate space for dynamic
>> relocations and discard relocations against resolved undefined
>> weak symbols in executable. Don't make resolved undefined weak
>> symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
>> relocation against undefined weak symbols in PIE.
>> (_bfd_sparc_elf_relocate_section): Don't generate dynamic
>> relocations against resolved undefined weak symbols in PIE
>> (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
>> without ynamic PLT/GOT relocations for resolved undefined weak
>> symbols.
>> Don't generate dynamic relocation against resolved undefined
>> weak symbol in executable.
>> (pie_finish_undefweak_symbol): New function.
>> (_bfd_sparc_elf_finish_dynamic_sections): Call
>> pie_finish_undefweak_symbol on all symbols in PIE.
>> * elfxx-sparc.h
>> (_bfd_sparc_elf_link_hash_table): Add interp.
>> (_bfd_sparc_elf_fixup_symbol): New function.
>> ---
Approved and applied - along with some minor comment formatting tidy ups.
Cheers
Nick