This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: SH: forced local symbols
On Thu, Aug 22, 2002 at 03:24:16PM -0400, Daniel Jacobowitz wrote:
> That patch wasn't quite right; I checked created_dynamic_sections
> before it was necessarily set. Here's an update; this should probably
> be taken together with Stephen's zalloc patch, since it now could
> potentially allocate more relocation slots than necessary.
s/could potentially/will, with the right input,/ You need to delay
allocation similarly to elf32-i386.c, elf32-hppa.c etc. to stop
R_NONE relocs.
> @@ -5091,7 +5104,12 @@ sh_elf_check_relocs (abfd, info, sec, re
> return false;
> }
>
> - srelgot->_raw_size += sizeof (Elf32_External_Rela);
> + /* If the symbol is still dynamic allocate space for the
> + relocation. We have to use true instead of the correct
> + dynamic_sections_created, because we don't know if they've
> + been created yet. */
> + if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (true, info, h))
> + srelgot->_raw_size += sizeof (Elf32_External_Rela);
Shouldn't you just be using "if (info->shared)" here?
--
Alan Modra
IBM OzLabs - Linux Technology Centre