From: Alan Modra <amodra@bigpond.net.au>
To: Ben Elliston <bje+dated+1111959143.7bcef5@air.net.au>
Cc: Anton Blanchard <anton@samba.org>, binutils@sources.redhat.com
Subject: Re: cvs binutils+gcc4.0 build fail
Date: Tue, 29 Mar 2005 13:54:00 -0000 [thread overview]
Message-ID: <20050329065139.GG14407@bubble.modra.org> (raw)
In-Reply-To: <20050322222308.GE30711@bubble.modra.org>
On Wed, Mar 23, 2005 at 08:53:08AM +1030, Alan Modra wrote:
> On Wed, Mar 23, 2005 at 08:32:19AM +1100, Ben Elliston wrote:
> > > Does this look familiar?
> >
> > Not immediately.
> >
> > > /usr/local/ppc64-4.0/bin/powerpc-linux-ld:
> > > .libs/wstring-inst.o(.eh_frame+0x13c8): R_PPC64_REL64 reloc against
> > > `.gnu.linkonce.t._ZNKSbIwSt11char_traitsIwESaIwEE7compareEmmRKS2_mm':
> > > error 2
> >
> > So _bfd_final_link_relocate is returning bfd_reloc_outofrange. I
> > suspect the remaining errors just cascade from that. As to why this
> > is happening, I don't know. Alan?
>
> My guess is that the .gnu.linkonce.* section in question has been
> removed because it's a duplicate, and something has gone wrong with
> .eh_frame editing. We have had a lot of problems with linkonce
> sections in the past, but I thought it was all OK now..
Something was indeed going wrong with eh_frame editing. It was being
done twice due to my 2005-03-21 ppc64elf.em change. Oops.
* emultempl/ppc64elf.em (need_laying_out): Delete. Remove all refs.
(ppc_finish): Don't call bfd_elf_discard_info.
* emultempl/hppaelf.em: Similarly.
Index: ld/emultempl/ppc64elf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/ppc64elf.em,v
retrieving revision 1.40
diff -u -p -r1.40 ppc64elf.em
--- ld/emultempl/ppc64elf.em 21 Mar 2005 09:39:53 -0000 1.40
+++ ld/emultempl/ppc64elf.em 29 Mar 2005 06:37:13 -0000
@@ -32,9 +32,6 @@ cat >>e${EMULATION_NAME}.c <<EOF
static lang_input_statement_type *stub_file;
static int stub_added = 0;
-/* Whether we need to call ppc_layout_sections_again. */
-static int need_laying_out = 0;
-
/* Maximum size of a group of input sections that can be handled by
one stub section. A value of +/-1 indicates the bfd back-end
should use a suitable default size. */
@@ -258,8 +255,6 @@ ppc_layout_sections_again (void)
/* If we have changed sizes of the stub sections, then we need
to recalculate all the section offsets. This may mean we need to
add even more stubs. */
- need_laying_out = 0;
-
lang_reset_memory_regions ();
/* Resize the sections. */
@@ -321,13 +316,6 @@ ppc_finish (void)
descriptor in the .opd section. */
entry_section = ".opd";
- /* bfd_elf_discard_info just plays with debugging sections,
- ie. doesn't affect any code, so we can delay resizing the
- sections. It's likely we'll resize everything in the process of
- adding stubs. */
- if (bfd_elf_discard_info (output_bfd, &link_info))
- need_laying_out = 1;
-
/* If generating a relocatable output file, then we don't have any
stubs. */
if (stub_file != NULL && !link_info.relocatable)
@@ -356,9 +344,6 @@ ppc_finish (void)
}
}
- if (need_laying_out)
- ppc_layout_sections_again ();
-
if (link_info.relocatable)
{
asection *toc = bfd_get_section_by_name (output_bfd, ".toc");
Index: ld/emultempl/hppaelf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/hppaelf.em,v
retrieving revision 1.38
diff -u -p -r1.38 hppaelf.em
--- ld/emultempl/hppaelf.em 21 Mar 2005 09:39:53 -0000 1.38
+++ ld/emultempl/hppaelf.em 29 Mar 2005 06:37:13 -0000
@@ -36,9 +36,6 @@ static lang_input_statement_type *stub_f
stubs. */
static int multi_subspace = 0;
-/* Whether we need to call hppa_layout_sections_again. */
-static int need_laying_out = 0;
-
/* Maximum size of a group of input sections that can be handled by
one stub section. A value of +/-1 indicates the bfd back-end
should use a suitable default size. */
@@ -220,8 +217,6 @@ hppaelf_layout_sections_again (void)
/* If we have changed sizes of the stub sections, then we need
to recalculate all the section offsets. This may mean we need to
add even more stubs. */
- need_laying_out = 0;
-
lang_reset_memory_regions ();
/* Resize the sections. */
@@ -258,13 +253,6 @@ build_section_lists (lang_statement_unio
static void
hppaelf_finish (void)
{
- /* bfd_elf_discard_info just plays with debugging sections,
- ie. doesn't affect any code, so we can delay resizing the
- sections. It's likely we'll resize everything in the process of
- adding stubs. */
- if (bfd_elf_discard_info (output_bfd, &link_info))
- need_laying_out = 1;
-
/* If generating a relocatable output file, then we don't
have to examine the relocs. */
if (stub_file != NULL && !link_info.relocatable)
@@ -296,9 +284,6 @@ hppaelf_finish (void)
}
}
- if (need_laying_out)
- hppaelf_layout_sections_again ();
-
if (! link_info.relocatable)
{
/* Set the global data pointer. */
--
Alan Modra
IBM OzLabs - Linux Technology Centre
next parent reply other threads:[~2005-03-29 6:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20050322212341.GD4980@krispykreme>
[not found] ` <20050323083219.A21240@mailhub.air.net.au>
[not found] ` <20050322222308.GE30711@bubble.modra.org>
2005-03-29 13:54 ` Alan Modra [this message]
2005-03-29 15:43 ` Alan Modra
2005-03-29 23:33 ` Thorsten Glaser
2005-03-30 16:34 ` Alan Modra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050329065139.GG14407@bubble.modra.org \
--to=amodra@bigpond.net.au \
--cc=anton@samba.org \
--cc=binutils@sources.redhat.com \
--cc=bje+dated+1111959143.7bcef5@air.net.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).