summaryrefslogtreecommitdiffstats
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2012-06-22 05:53:04 +0000
committerAlan Modra <amodra@gmail.com>2012-06-22 05:53:04 +0000
commit27fc25a1a9c4bea12a981d67ac68a626ade87837 (patch)
tree2dc801cc32d838ff11b905f176948c287b87e3d5 /bfd
parent3cfa09946bcab3c5c95be233497aa6340e8d7d1c (diff)
downloadppe42-binutils-27fc25a1a9c4bea12a981d67ac68a626ade87837.tar.gz
ppe42-binutils-27fc25a1a9c4bea12a981d67ac68a626ade87837.zip
* elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't emit out-of-line
save/restore functions when relocatable. Make "funcs" static.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf64-ppc.c9
2 files changed, 10 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index d4902da22e..105c72b88e 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2012-06-22 Alan Modra <amodra@gmail.com>
+
+ * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't emit out-of-line
+ save/restore functions when relocatable. Make "funcs" static.
+
2012-06-18 Hans-Peter Nilsson <hp@axis.com>
* elf32-cris.c (cris_elf_plt_sym_val): Rewrite to work in presence
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 52785894bc..46e82471e9 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -6468,7 +6468,7 @@ ppc64_elf_func_desc_adjust (bfd *obfd ATTRIBUTE_UNUSED,
{
struct ppc_link_hash_table *htab;
unsigned int i;
- const struct sfpr_def_parms funcs[] =
+ static const struct sfpr_def_parms funcs[] =
{
{ "_savegpr0_", 14, 31, savegpr0, savegpr0_tail },
{ "_restgpr0_", 14, 29, restgpr0, restgpr0_tail },
@@ -6494,9 +6494,10 @@ ppc64_elf_func_desc_adjust (bfd *obfd ATTRIBUTE_UNUSED,
/* Provide any missing _save* and _rest* functions. */
htab->sfpr->size = 0;
- for (i = 0; i < sizeof (funcs) / sizeof (funcs[0]); i++)
- if (!sfpr_define (info, &funcs[i]))
- return FALSE;
+ if (!info->relocatable)
+ for (i = 0; i < sizeof (funcs) / sizeof (funcs[0]); i++)
+ if (!sfpr_define (info, &funcs[i]))
+ return FALSE;
elf_link_hash_traverse (&htab->elf, func_desc_adjust, info);
OpenPOWER on IntegriCloud