From: "David S. Miller" <davem@davemloft.net>
To: "David S. Miller" <davem@davemloft.net>
Cc: nickc@redhat.com, ian@airs.com, ebotcazou@libertysurf.fr,
binutils@sources.redhat.com, schwab@suse.de
Subject: Re: Problems compiling elfxx-sparc.c
Date: Mon, 25 Apr 2005 21:54:00 -0000 [thread overview]
Message-ID: <20050425144614.71a2b8c8.davem@davemloft.net> (raw)
In-Reply-To: <20050425120204.5806de8e.davem@davemloft.net>
On Mon, 25 Apr 2005 12:02:04 -0700
"David S. Miller" <davem@davemloft.net> wrote:
> Nevermind... I see elfxx-mips.c is doing BFD64 ifdefs.
> I'll fix sparc up.
Nick, I just checked in this patch which should make
things work again.
I did an "all" target enable build and testsuite run,
then a sparc64-*-linux target build and testsuite run to
check this.
2005-04-25 David S. Miller <davem@davemloft.net>
* elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
(sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
Likewise.
--- elfxx-sparc.c.~1.3.~ 2005-04-21 11:35:41.000000000 -0700
+++ elfxx-sparc.c 2005-04-25 12:06:46.000000000 -0700
@@ -500,13 +500,17 @@ sparc_put_word_64 (bfd *bfd, bfd_vma val
}
static void
-sparc_elf_append_rela_64 (bfd *abfd, asection *s, Elf_Internal_Rela *rel)
+sparc_elf_append_rela_64 (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *s ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela *rel ATTRIBUTE_UNUSED)
{
+#ifdef BFD64
Elf64_External_Rela *loc64;
loc64 = (Elf64_External_Rela *) s->contents;
loc64 += s->reloc_count++;
bfd_elf64_swap_reloca_out (abfd, rel, (bfd_byte *) loc64);
+#endif
}
static void
@@ -520,7 +524,9 @@ sparc_elf_append_rela_32 (bfd *abfd, ase
}
static bfd_vma
-sparc_elf_r_info_64 (Elf_Internal_Rela *in_rel, bfd_vma index, bfd_vma type)
+sparc_elf_r_info_64 (Elf_Internal_Rela *in_rel ATTRIBUTE_UNUSED,
+ bfd_vma index ATTRIBUTE_UNUSED,
+ bfd_vma type ATTRIBUTE_UNUSED)
{
return ELF64_R_INFO (index,
(in_rel ?
@@ -3421,12 +3427,14 @@ _bfd_sparc_elf_finish_dynamic_symbol (bf
thus .plt[4] has corresponding .rela.plt[0] and so on. */
loc = srela->contents;
+#ifdef BFD64
if (ABI_64_P (output_bfd))
{
loc += rela_index * sizeof (Elf64_External_Rela);
bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
}
else
+#endif
{
loc += rela_index * sizeof (Elf32_External_Rela);
bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
@@ -3521,6 +3529,7 @@ _bfd_sparc_elf_finish_dynamic_symbol (bf
/* Finish up the dynamic sections. */
+#ifdef BFD64
static bfd_boolean
sparc64_finish_dyn (bfd *output_bfd, struct bfd_link_info *info,
bfd *dynobj, asection *sdyn,
@@ -3577,6 +3586,7 @@ sparc64_finish_dyn (bfd *output_bfd, str
}
return TRUE;
}
+#endif
static bfd_boolean
sparc32_finish_dyn (bfd *output_bfd,
@@ -3644,9 +3654,11 @@ _bfd_sparc_elf_finish_dynamic_sections (
splt = bfd_get_section_by_name (dynobj, ".plt");
BFD_ASSERT (splt != NULL && sdyn != NULL);
+#ifdef BFD64
if (ABI_64_P (output_bfd))
ret = sparc64_finish_dyn (output_bfd, info, dynobj, sdyn, splt);
else
+#endif
ret = sparc32_finish_dyn (output_bfd, info, dynobj, sdyn, splt);
if (ret != TRUE)
next prev parent reply other threads:[~2005-04-25 21:54 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-20 10:19 Nick Clifton
2005-04-20 13:15 ` Andreas Schwab
2005-04-20 18:26 ` David S. Miller
2005-04-20 18:40 ` David S. Miller
2005-04-20 22:38 ` Andreas Schwab
2005-04-20 23:21 ` David S. Miller
2005-04-21 12:20 ` Andreas Schwab
2005-04-21 3:16 ` Alan Modra
2005-04-21 3:24 ` David S. Miller
2005-04-22 3:19 ` Alan Modra
2005-04-22 3:53 ` David S. Miller
2005-04-21 10:50 ` Nick Clifton
2005-04-21 11:54 ` Eric Botcazou
2005-04-21 13:42 ` Ian Lance Taylor
2005-04-21 18:48 ` David S. Miller
2005-04-22 9:52 ` Nick Clifton
2005-04-22 10:02 ` Nick Clifton
2005-04-22 13:25 ` Ian Lance Taylor
2005-04-22 19:10 ` David S. Miller
2005-04-25 9:47 ` Nick Clifton
2005-04-25 18:32 ` David S. Miller
2005-04-25 19:10 ` David S. Miller
2005-04-25 21:54 ` David S. Miller [this message]
2005-04-26 8:45 ` Nick Clifton
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=20050425144614.71a2b8c8.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=binutils@sources.redhat.com \
--cc=ebotcazou@libertysurf.fr \
--cc=ian@airs.com \
--cc=nickc@redhat.com \
--cc=schwab@suse.de \
/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).