summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@nildram.co.uk>2006-03-02 08:52:49 +0000
committerRichard Sandiford <rsandifo@nildram.co.uk>2006-03-02 08:52:49 +0000
commit6c0d1c745c5e554bc1f149b9bbd61195fa5a33db (patch)
tree6e4d754d826f1d0f1c6d80120d9a4c986e65e560 /bfd
parentd01f909fd44893193234e23de533626bdf388c64 (diff)
downloadbinutils-redhat-6c0d1c745c5e554bc1f149b9bbd61195fa5a33db.tar.gz
bfd/
* elf32-i386.c (elf_i386_vxworks_link_output_symbol_hook): Delete. (elf_backend_link_output_symbol_hook): Use elf_vxworks_link_output_symbol_hook instead. * elf32-ppc.c (elf_i386_vxworks_link_output_symbol_hook): Delete. (elf_backend_link_output_symbol_hook): Use elf_vxworks_link_output_symbol_hook instead. * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Provide the same interface as elf_backend_link_output_symbol_hook. * elf-vxworks.h (elf_vxworks_link_output_symbol_hook): Update prototype accordingly.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog13
-rw-r--r--bfd/elf-vxworks.c13
-rw-r--r--bfd/elf-vxworks.h3
-rw-r--r--bfd/elf32-i386.c19
-rw-r--r--bfd/elf32-ppc.c19
5 files changed, 28 insertions, 39 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 105ef257f2..53c3ed3c5e 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,18 @@
2006-03-02 Richard Sandiford <richard@codesourcery.com>
+ * elf32-i386.c (elf_i386_vxworks_link_output_symbol_hook): Delete.
+ (elf_backend_link_output_symbol_hook): Use
+ elf_vxworks_link_output_symbol_hook instead.
+ * elf32-ppc.c (elf_i386_vxworks_link_output_symbol_hook): Delete.
+ (elf_backend_link_output_symbol_hook): Use
+ elf_vxworks_link_output_symbol_hook instead.
+ * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Provide the
+ same interface as elf_backend_link_output_symbol_hook.
+ * elf-vxworks.h (elf_vxworks_link_output_symbol_hook): Update
+ prototype accordingly.
+
+2006-03-02 Richard Sandiford <richard@codesourcery.com>
+
* elf32-ppc.c (ppc_elf_plt_type): New enumeration.
(ppc_elf_link_hash_table): Replace old_got and new_got with
plt_type and can_use_new_plt.
diff --git a/bfd/elf-vxworks.c b/bfd/elf-vxworks.c
index 708177a2ee..0dca07c583 100644
--- a/bfd/elf-vxworks.c
+++ b/bfd/elf-vxworks.c
@@ -58,9 +58,18 @@ elf_vxworks_add_symbol_hook (bfd *abfd ATTRIBUTE_UNUSED,
/* Tweak magic VxWorks symbols as they are written to the output file. */
bfd_boolean
-elf_vxworks_link_output_symbol_hook (const char *name,
- Elf_Internal_Sym *sym)
+elf_vxworks_link_output_symbol_hook (struct bfd_link_info *info
+ ATTRIBUTE_UNUSED,
+ const char *name,
+ Elf_Internal_Sym *sym,
+ asection *input_sec ATTRIBUTE_UNUSED,
+ struct elf_link_hash_entry *h
+ ATTRIBUTE_UNUSED)
{
+ /* Ignore the first dummy symbol. */
+ if (!name)
+ return TRUE;
+
/* Reverse the effects of the hack in elf_vxworks_add_symbol_hook. */
if (strcmp (name, "__GOTT_INDEX__") == 0
|| strcmp (name, "__GOTT_BASE__") == 0)
diff --git a/bfd/elf-vxworks.h b/bfd/elf-vxworks.h
index 0ac422e95a..76db15e64d 100644
--- a/bfd/elf-vxworks.h
+++ b/bfd/elf-vxworks.h
@@ -25,7 +25,8 @@ bfd_boolean elf_vxworks_add_symbol_hook
(bfd *, struct bfd_link_info *, Elf_Internal_Sym *, const char **,
flagword *, asection **, bfd_vma *);
bfd_boolean elf_vxworks_link_output_symbol_hook
- (const char *, Elf_Internal_Sym *);
+ (struct bfd_link_info *, const char *name, Elf_Internal_Sym *,
+ asection *, struct elf_link_hash_entry *);
bfd_boolean elf_vxworks_emit_relocs
(bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *,
struct elf_link_hash_entry **);
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 794215cfb3..6b51f38b4c 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -3969,23 +3969,6 @@ elf_i386_vxworks_link_hash_table_create (bfd *abfd)
}
-/* Tweak magic VxWorks symbols as they are written to the output file. */
-static bfd_boolean
-elf_i386_vxworks_link_output_symbol_hook (struct bfd_link_info *info
- ATTRIBUTE_UNUSED,
- const char *name,
- Elf_Internal_Sym *sym,
- asection *input_sec ATTRIBUTE_UNUSED,
- struct elf_link_hash_entry *h
- ATTRIBUTE_UNUSED)
-{
- /* Ignore the first dummy symbol. */
- if (!name)
- return TRUE;
-
- return elf_vxworks_link_output_symbol_hook (name, sym);
-}
-
#undef elf_backend_post_process_headers
#undef bfd_elf32_bfd_link_hash_table_create
#define bfd_elf32_bfd_link_hash_table_create \
@@ -3995,7 +3978,7 @@ elf_i386_vxworks_link_output_symbol_hook (struct bfd_link_info *info
elf_vxworks_add_symbol_hook
#undef elf_backend_link_output_symbol_hook
#define elf_backend_link_output_symbol_hook \
- elf_i386_vxworks_link_output_symbol_hook
+ elf_vxworks_link_output_symbol_hook
#undef elf_backend_emit_relocs
#define elf_backend_emit_relocs elf_vxworks_emit_relocs
#undef elf_backend_final_write_processing
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 952075513b..353f288b18 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -7558,23 +7558,6 @@ ppc_elf_vxworks_add_symbol_hook (bfd *abfd,
return ppc_elf_add_symbol_hook(abfd, info, sym,namep, flagsp, secp, valp);
}
-/* Tweak magic VxWorks symbols as they are written to the output file. */
-static bfd_boolean
-elf_i386_vxworks_link_output_symbol_hook (struct bfd_link_info *info
- ATTRIBUTE_UNUSED,
- const char *name,
- Elf_Internal_Sym *sym,
- asection *input_sec ATTRIBUTE_UNUSED,
- struct elf_link_hash_entry *h
- ATTRIBUTE_UNUSED)
-{
- /* Ignore the first dummy symbol. */
- if (!name)
- return TRUE;
-
- return elf_vxworks_link_output_symbol_hook (name, sym);
-}
-
static void
ppc_elf_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
{
@@ -7605,7 +7588,7 @@ ppc_elf_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
ppc_elf_vxworks_add_symbol_hook
#undef elf_backend_link_output_symbol_hook
#define elf_backend_link_output_symbol_hook \
- elf_i386_vxworks_link_output_symbol_hook
+ elf_vxworks_link_output_symbol_hook
#undef elf_backend_final_write_processing
#define elf_backend_final_write_processing \
ppc_elf_vxworks_final_write_processing