Browse Source

bfd: remove use of PTR

* coffcode.h (coff_write_object_contents): Don't cast to PTR.
	* elf32-csky.c (csky_elf_link_hash_traverse): Remove use of PTR
	and PARAMS.
	(csky_allocate_dynrelocs): Don't use PTR cast.
	* elf32-nios2.c (adjust_dynrelocs, allocate_dynrelocs): Replace
	PTR with void *.
	* elf32-visium.c (visium_elf_howto_parity_reloc): Likewise.
	* elfxx-ia64.c (ia64_elf_reloc): Likewise.
	* plugin.c (bfd_plugin_bfd_print_private_bfd_data): Likewise.
binutils-2_39-branch
Alan Modra 4 years ago
parent
commit
f3b9cfd195
  1. 2
      bfd/coffcode.h
  2. 6
      bfd/elf32-csky.c
  3. 4
      bfd/elf32-nios2.c
  4. 4
      bfd/elf32-visium.c
  5. 2
      bfd/elfxx-ia64.c
  6. 4
      bfd/plugin.c

2
bfd/coffcode.h

@ -3843,7 +3843,7 @@ coff_write_object_contents (bfd * abfd)
bfd_byte *b = bfd_zmalloc (fill_size);
if (b)
{
bfd_bwrite ((PTR)b, fill_size, abfd);
bfd_bwrite (b, fill_size, abfd);
free (b);
}
}

6
bfd/elf32-csky.c

@ -1181,7 +1181,7 @@ struct csky_elf_link_hash_entry
#define csky_elf_link_hash_traverse(table, func, info) \
(elf_link_hash_traverse \
(&(table)->root, \
(bool (*) PARAMS ((struct elf_link_hash_entry *, PTR))) (func), \
(bool (*) (struct elf_link_hash_entry *, void *)) (func), \
(info)))
/* Get the C-SKY ELF linker hash table from a link_info structure. */
@ -1659,7 +1659,7 @@ csky_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
dynamic relocs. */
static bool
csky_allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
csky_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
{
struct bfd_link_info *info;
struct csky_elf_link_hash_table *htab;
@ -2010,7 +2010,7 @@ csky_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
/* Allocate global sym .plt and .got entries, and space for global
sym dynamic relocs. */
elf_link_hash_traverse (&htab->elf, csky_allocate_dynrelocs, (PTR) info);
elf_link_hash_traverse (&htab->elf, csky_allocate_dynrelocs, info);
/* Check for GOT overflow. */
if (check_got_overflow == 1

4
bfd/elf32-nios2.c

@ -5413,7 +5413,7 @@ nios2_elf32_adjust_dynamic_symbol (struct bfd_link_info *info,
/* Worker function for nios2_elf32_size_dynamic_sections. */
static bool
adjust_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
adjust_dynrelocs (struct elf_link_hash_entry *h, void *inf)
{
struct bfd_link_info *info;
struct elf32_nios2_link_hash_table *htab;
@ -5442,7 +5442,7 @@ adjust_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
Allocate space in .plt, .got and associated reloc sections for
dynamic relocs. */
static bool
allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
{
struct bfd_link_info *info;
struct elf32_nios2_link_hash_table *htab;

4
bfd/elf32-visium.c

@ -28,7 +28,7 @@
#include "libiberty.h"
static bfd_reloc_status_type visium_elf_howto_parity_reloc
(bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **);
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static reloc_howto_type visium_elf_howto_table[] = {
/* This reloc does nothing. */
@ -304,7 +304,7 @@ visium_parity_bit (bfd_vma insn)
static bfd_reloc_status_type
visium_elf_howto_parity_reloc (bfd * input_bfd, arelent *reloc_entry,
asymbol *symbol, PTR data,
asymbol *symbol, void *data,
asection *input_section, bfd *output_bfd,
char **error_message ATTRIBUTE_UNUSED)
{

2
bfd/elfxx-ia64.c

@ -66,7 +66,7 @@
static bfd_reloc_status_type
ia64_elf_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc,
asymbol *sym ATTRIBUTE_UNUSED,
PTR data ATTRIBUTE_UNUSED, asection *input_section,
void *data ATTRIBUTE_UNUSED, asection *input_section,
bfd *output_bfd, char **error_message)
{
if (output_bfd)

4
bfd/plugin.c

@ -617,7 +617,7 @@ bfd_plugin_bfd_copy_private_symbol_data (bfd *ibfd ATTRIBUTE_UNUSED,
}
static bool
bfd_plugin_bfd_print_private_bfd_data (bfd *abfd ATTRIBUTE_UNUSED, PTR ptr ATTRIBUTE_UNUSED)
bfd_plugin_bfd_print_private_bfd_data (bfd *abfd ATTRIBUTE_UNUSED, void *ptr ATTRIBUTE_UNUSED)
{
BFD_ASSERT (0);
return true;
@ -749,7 +749,7 @@ bfd_plugin_canonicalize_symtab (bfd *abfd,
static void
bfd_plugin_print_symbol (bfd *abfd ATTRIBUTE_UNUSED,
PTR afile ATTRIBUTE_UNUSED,
void *afile ATTRIBUTE_UNUSED,
asymbol *symbol ATTRIBUTE_UNUSED,
bfd_print_symbol_type how ATTRIBUTE_UNUSED)
{

Loading…
Cancel
Save