This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [SPARC] Fix GOT relocation overflow
- From: Nick Clifton <nickc at redhat dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>, binutils at sourceware dot org
- Date: Fri, 9 Feb 2018 09:40:36 +0000
- Subject: Re: [SPARC] Fix GOT relocation overflow
- Authentication-results: sourceware.org; auth=none
- References: <4201293.bIne749SvQ@polaris>
Hi Eric,
> Tested on SPARC64/Linux with a GCC bootstrap, OK for mainline and 2.30 branch?
Approved for both - please apply.
> 2018-02-08 Eric Botcazou <ebotcazou@adacore.com>
>
> bfd/
> * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
> (sparc_elf_append_rela): Assert that there is enough room in the section.
> (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
> (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
> (allocate_dynrelocs): Remove outdated comments and reorder conditions.
> For a symbol subject to a GOT relocation, reserve a slot in the relocation
> section if the symbol isn't dynamic and we are in PIC mode.
> (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If the relocation
> is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
> <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
> <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
> (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
> resolved_to_zero. Do not generate a dynamic GOT relocation for an
> undefined weak symbol with non-default visibility.
> Remove superfluous 'else' and fix formatting.
>
Cheers
Nick