[binutils-gdb] elf32-nds32: Remove elf32_nds32_allocate_dynrelocs
Simon Marchi
simark@sourceware.org
Wed Sep 26 12:29:00 GMT 2018
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=853924149dfc2a3b67fda0a491dc5716d7322a74
commit 853924149dfc2a3b67fda0a491dc5716d7322a74
Author: Simon Marchi <simon.marchi@ericsson.com>
Date: Wed Sep 26 08:27:23 2018 -0400
elf32-nds32: Remove elf32_nds32_allocate_dynrelocs
It is unused, removing it fixes this error when building with clang:
/home/emaisin/src/binutils-gdb/bfd/elf32-nds32.c:3172:1: error: unused function 'elf32_nds32_allocate_dynrelocs' [-Werror,-Wunused-function]
elf32_nds32_allocate_dynrelocs (struct bfd_link_info *info, asection *sreloc,
^
1 error generated.
gcc only reports the error if you remove "inline". I don't know if this
is actually a mistake and it should actually be used though.
gdb/ChangeLog:
* elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
Diff:
---
bfd/elf32-nds32.c | 13 -------------
gdb/ChangeLog | 4 ++++
2 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c
index 8844166..0d86e5b 100644
--- a/bfd/elf32-nds32.c
+++ b/bfd/elf32-nds32.c
@@ -3165,19 +3165,6 @@ static const struct nds32_reloc_map_entry nds32_reloc_map[] =
/* Patch tag. */
-/* Reserve space for COUNT dynamic relocations in relocation selection
- SRELOC. */
-
-static inline void
-elf32_nds32_allocate_dynrelocs (struct bfd_link_info *info, asection *sreloc,
- bfd_size_type count)
-{
- BFD_ASSERT (elf_hash_table (info)->dynamic_sections_created);
- if (sreloc == NULL)
- abort ();
- sreloc->size += sizeof (Elf32_External_Rela) * count;
-}
-
static reloc_howto_type *
bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
const char *r_name)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fa1ca59..70fc324 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2018-09-26 Simon Marchi <simon.marchi@ericsson.com>
+
+ * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
+
2018-09-26 Tom Tromey <tom@tromey.com>
* valops.c (auto_abandon): Remove dead code.
More information about the Binutils-cvs
mailing list