This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
.eh_frame references to discarded sections
- From: Richard Henderson <rth at redhat dot com>
- To: binutils at sources dot redhat dot com
- Cc: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Tue, 30 Apr 2002 14:12:21 -0700
- Subject: .eh_frame references to discarded sections
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.
r~
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,