This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: elf64/mips is broken
- From: "H . J . Lu" <hjl at lucon dot org>
- To: seufer at csv dot ica dot uni-stuttgart dot de
- Cc: binutils at sourceware dot cygnus dot com
- Date: Sat, 15 Dec 2001 10:02:55 -0800
- Subject: Re: elf64/mips is broken
- References: <20011215094035.A15360@lucon.org>
On Sat, Dec 15, 2001 at 09:40:35AM -0800, H . J . Lu wrote:
> Hi Thiemo,
>
> I believe you applied a patch against the older CVS. Now elf64/mips is
> broken since your patch references stab_info which has been removed.
>
>
This patch makes it to compile. But I don't know if it is enough, given
the Jakub's eh frame change. Thiemo, you should check if elf64/mips
handles ELF_INFO_TYPE_EH_FRAME right.
Thanks.
H.J.
-----
2001-12-15 H.J. Lu <hjl@gnu.org>
* elf64-mips.c (mips_elf64_create_dynamic_relocation): Call
_bfd_elf_section_offset to get the offset.
--- elf64-mips.c.stab Sat Dec 15 09:51:44 2001
+++ elf64-mips.c Sat Dec 15 09:54:31 2001
@@ -3321,9 +3321,12 @@ mips_elf64_create_dynamic_relocation (ou
/* We begin by assuming that the offset for the dynamic relocation
is the same as for the original relocation. We'll adjust this
later to reflect the correct output offsets. */
- if (elf_section_data (input_section)->stab_info == NULL)
+ outrel[0].r_offset = _bfd_elf_section_offset (output_bfd, info,
+ input_section,
+ rel[0].r_offset);
+ if (elf_section_data (input_section)->sec_info_type
+ != ELF_INFO_TYPE_STABS)
{
- outrel[0].r_offset = rel[0].r_offset;
outrel[1].r_offset = rel[1].r_offset;
outrel[2].r_offset = rel[2].r_offset;
}
@@ -3333,12 +3336,6 @@ mips_elf64_create_dynamic_relocation (ou
Because we compress stab information, the offset given in the
relocation may not be the one we want; we must let the stabs
machinery tell us the offset. */
- outrel[0].r_offset
- = (_bfd_stab_section_offset
- (output_bfd, &elf_hash_table (info)->stab_info,
- input_section,
- &elf_section_data (input_section)->stab_info,
- rel->r_offset));
outrel[1].r_offset = outrel[0].r_offset;
outrel[2].r_offset = outrel[0].r_offset;
/* If we didn't need the relocation at all, this value will be