aboutsummaryrefslogtreecommitdiffstats
path: root/meta-microblaze/recipes-devtools/binutils/binutils/0048-bfd-elf-microblaze.c-Remove-obsolete-entries.patch
blob: 7feaceb944af08697b813740020f9ef9c65cbe86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
From 2f07425ca330dd357c374acdc30a27c6647454c9 Mon Sep 17 00:00:00 2001
From: Mark Hatle <mark.hatle@xilinx.com>
Date: Thu, 3 Dec 2020 11:23:26 -0800
Subject: [PATCH 48/52] bfd/elf*-microblaze.c: Remove obsolete entries

Replace microblaze_elf_merge_private_bfd_data with a direct call to
_bfd_generic_verify_endian_match, this simplifies the implementation.

Remove microblaze_elf_gc_sweep_hook, removed in 2017.

Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
---
 bfd/elf64-microblaze.c | 29 +----------------------------
 1 file changed, 1 insertion(+), 28 deletions(-)

diff --git a/bfd/elf64-microblaze.c b/bfd/elf64-microblaze.c
index cf84e0db4e..786f659232 100644
--- a/bfd/elf64-microblaze.c
+++ b/bfd/elf64-microblaze.c
@@ -1690,21 +1690,6 @@ microblaze_elf_relocate_section (bfd *output_bfd,
   return ret;
 }
 
-/* Merge backend specific data from an object file to the output
-   object file when linking.
-
-   Note: We only use this hook to catch endian mismatches.  */
-static bfd_boolean
-microblaze_elf_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
-{
-  /* Check if we have the same endianess.  */
-  if (! _bfd_generic_verify_endian_match (ibfd, obfd))
-    return FALSE;
-
-  return TRUE;
-}
-
-
 /* Calculate fixup value for reference.  */
 
 static int
@@ -2427,17 +2412,6 @@ microblaze_elf_gc_mark_hook (asection *sec,
   return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
 }
 
-/* Update the got entry reference counts for the section being removed.  */
-
-static bfd_boolean
-microblaze_elf_gc_sweep_hook (bfd * abfd ATTRIBUTE_UNUSED,
-     			      struct bfd_link_info * info ATTRIBUTE_UNUSED,
-     			      asection * sec ATTRIBUTE_UNUSED,
-     			      const Elf_Internal_Rela * relocs ATTRIBUTE_UNUSED)
-{
-  return TRUE;
-}
-
 /* PIC support.  */
 
 #define PLT_ENTRY_SIZE 16
@@ -3704,11 +3678,10 @@ microblaze_elf_add_symbol_hook (bfd *abfd,
 #define bfd_elf64_bfd_is_local_label_name       microblaze_elf_is_local_label_name
 #define elf_backend_relocate_section		microblaze_elf_relocate_section
 #define bfd_elf64_bfd_relax_section             microblaze_elf_relax_section
-#define bfd_elf64_bfd_merge_private_bfd_data    microblaze_elf_merge_private_bfd_data
+#define bfd_elf64_bfd_merge_private_bfd_data    _bfd_generic_verify_endian_match
 #define bfd_elf64_bfd_reloc_name_lookup		microblaze_elf_reloc_name_lookup
 
 #define elf_backend_gc_mark_hook		microblaze_elf_gc_mark_hook
-#define elf_backend_gc_sweep_hook		microblaze_elf_gc_sweep_hook
 #define elf_backend_check_relocs                microblaze_elf_check_relocs
 #define elf_backend_copy_indirect_symbol        microblaze_elf_copy_indirect_symbol
 #define bfd_elf64_bfd_link_hash_table_create    microblaze_elf_link_hash_table_create
-- 
2.17.1