RFA: Don't canonicalize STT_SECTION syms

Alan Modra amodra@bigpond.net.au
Wed Dec 8 23:57:00 GMT 2004


On Wed, Dec 08, 2004 at 04:50:11PM -0500, Daniel Jacobowitz wrote:
> Index: elfcode.h
> ===================================================================
> RCS file: /big/fsf/rsync/src-cvs/src/bfd/elfcode.h,v
> retrieving revision 1.59
> diff -u -p -r1.59 elfcode.h
> --- elfcode.h	25 Nov 2004 02:14:10 -0000	1.59
> +++ elfcode.h	8 Dec 2004 21:37:19 -0000
> @@ -1293,11 +1293,7 @@ elf_slurp_reloc_table_from_section (bfd 
>  	  ps = symbols + ELF_R_SYM (rela.r_info) - 1;
>  	  s = *ps;
>  
> -	  /* Canonicalize ELF section symbols.  FIXME: Why?  */
> -	  if ((s->flags & BSF_SECTION_SYM) == 0)
> -	    relent->sym_ptr_ptr = ps;
> -	  else
> -	    relent->sym_ptr_ptr = s->section->symbol_ptr_ptr;
> +	  relent->sym_ptr_ptr = ps;
>  	}
>  
>        relent->addend = rela.r_addend;

I've been tempted to remove this code myself, but never had a pressing
need.  I also didn't find any reason for it when I went looking.  So,
OK, let's see what breaks.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list