This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 2/2] S12Z: Avoid compiler warnings.


* bfd/elf32-s12z.c: delete unused functions, and mark unused parameters with
 appropriate attribute.
---
 bfd/elf32-s12z.c | 59 +++-----------------------------------------------------
 1 file changed, 3 insertions(+), 56 deletions(-)

diff --git a/bfd/elf32-s12z.c b/bfd/elf32-s12z.c
index 123b2d6..0753d1b 100644
--- a/bfd/elf32-s12z.c
+++ b/bfd/elf32-s12z.c
@@ -34,8 +34,9 @@ static bfd_boolean s12z_info_to_howto_rel
   (bfd *, arelent *, Elf_Internal_Rela *);
 
 static bfd_reloc_status_type
-shift_addend_reloc (bfd *abfd, arelent *reloc_entry, struct bfd_symbol *symbol,
-		  void *data, asection *input_section, bfd *output, char **msg)
+shift_addend_reloc (bfd *abfd, arelent *reloc_entry, struct bfd_symbol *symbol ATTRIBUTE_UNUSED,
+		    void *data ATTRIBUTE_UNUSED, asection *input_section ATTRIBUTE_UNUSED,
+		    bfd *output ATTRIBUTE_UNUSED, char **msg ATTRIBUTE_UNUSED)
 {
   /* This is a really peculiar reloc, which is done for compatibility
      with the Freescale toolchain.
@@ -248,53 +249,12 @@ s12z_info_to_howto_rel (bfd *abfd,
 
 /* Far trampoline generation.  */
 
-/* Build a S12Z trampoline stub.  */
-static bfd_boolean
-s12z_elf_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
-{
-  printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__);
-  struct elf32_s12z_stub_hash_entry *stub_entry;
-  struct bfd_link_info *info;
-  struct s12z_elf_link_hash_table *htab;
-  asection *stub_sec;
-  bfd *stub_bfd;
-  bfd_byte *loc;
-  bfd_vma sym_value, phys_page, phys_addr;
-
-  /* Massage our args to the form they really have.  */
-  stub_entry = (struct elf32_s12z_stub_hash_entry *) gen_entry;
-  info = (struct bfd_link_info *) in_arg;
-
-  //  htab = s12z_elf_hash_table (info);
-
-
-  return TRUE;
-}
-
-/* As above, but don't actually build the stub.  Just bump offset so
-   we know stub section sizes.  */
-
-static bfd_boolean
-s12z_elf_size_one_stub (struct bfd_hash_entry *gen_entry,
-			   void *in_arg ATTRIBUTE_UNUSED)
-{
-  printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__);
-  return TRUE;
-}
-
 /* Create a S12Z ELF linker hash table.  */
 
-static struct bfd_link_hash_table *
-s12z_elf_bfd_link_hash_table_create (bfd *abfd)
-{
-  printf ("%s:%d %s\n", __FILE__, __LINE__, __FUNCTION__);
-  return NULL;
-}
 
 static bfd_boolean
 s12z_elf_set_mach_from_flags (bfd *abfd)
 {
-  flagword flags = elf_elfheader (abfd)->e_flags;
   bfd_default_set_arch_mach (abfd, bfd_arch_s12z, 0); // bfd_mach_s12z);
 
   return TRUE;
@@ -311,21 +271,8 @@ s12z_elf_set_mach_from_flags (bfd *abfd)
 
 #define elf_info_to_howto	0
 #define elf_info_to_howto_rel	s12z_info_to_howto_rel
-//#define elf_backend_check_relocs     elf32_s12z_check_relocs
-//#define elf_backend_relocate_section elf32_s12z_relocate_section
 #define elf_backend_object_p		s12z_elf_set_mach_from_flags
 #define elf_backend_final_write_processing	0
 #define elf_backend_can_gc_sections		1
-/* #define elf_backend_post_process_headers     elf32_s12z_post_process_headers */
-/* #define elf_backend_add_symbol_hook  elf32_s12z_add_symbol_hook */
-/* #define elf_backend_merge_symbol_attribute elf32_s12z_merge_symbol_attribute */
-
-/* #define bfd_elf32_bfd_link_hash_table_create \ */
-/* 				s12z_elf_bfd_link_hash_table_create */
-/* #define bfd_elf32_bfd_merge_private_bfd_data \ */
-/* 					_bfd_s12z_elf_merge_private_bfd_data */
-/* #define bfd_elf32_bfd_set_private_flags	_bfd_s12z_elf_set_private_flags */
-/* #define bfd_elf32_bfd_print_private_bfd_data \ */
-/* 					_bfd_s12z_elf_print_private_bfd_data */
 
 #include "elf32-target.h"
-- 
2.1.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]