This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: .eh_frame references to discarded sections


On Tue, Apr 30, 2002 at 02:12:21PM -0700, Richard Henderson wrote:
> What's the current wisdom on handling these?
> 
> At present I'm getting relocation overflow errors of
> 32-bit relative relocs to SHN_UNDEF.  The following
> produces correct results, but may not be what we're
> currently looking for.

Is this with --eh-frame-hdr or without? With it something like that
shouldn't happen, since such FDEs should be removed.

> Index: elf64-alpha.c
> ===================================================================
> RCS file: /cvs/src/src/bfd/elf64-alpha.c,v
> retrieving revision 1.61
> diff -c -p -d -r1.61 elf64-alpha.c
> *** elf64-alpha.c	4 Apr 2002 19:53:37 -0000	1.61
> --- elf64-alpha.c	30 Apr 2002 21:09:51 -0000
> *************** elf64_alpha_relocate_section (output_bfd
> *** 3695,3700 ****
> --- 3695,3710 ----
>   	  }
>   	  goto default_reloc;
>   
> + 	case R_ALPHA_SREL32:
> + 	case R_ALPHA_SREL64:
> + 	  /* ??? .eh_frame references to discarded sections will be smashed
> + 	     to relocations against SHN_UNDEF.  The .eh_frame format allows
> + 	     NULL to be encoded as 0 in any format, so this works here.  */
> + 	  if (r_symndx == 0)
> + 	    howto = (elf64_alpha_howto_table
> + 		     + (r_type - R_ALPHA_SREL32 + R_ALPHA_REFLONG));
> + 	  goto default_reloc;
> + 
>   	default:
>   	default_reloc:
>   	  r = _bfd_final_link_relocate (howto, input_bfd, input_section,

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]