From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by sourceware.org (Postfix) with ESMTPS id 3198338485AD for ; Tue, 10 May 2022 01:47:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3198338485AD Received: by mail-pj1-x102e.google.com with SMTP id gj17-20020a17090b109100b001d8b390f77bso825468pjb.1 for ; Mon, 09 May 2022 18:47:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=L1cJ7+Ne2oreG6d1lY9en7SUeWYW0PRS+AqoC2FLjEU=; b=Q6AIeFfm6m80nDraiiWY0NNaWCy9/TeQBw4Llm2nVE3njh0r22S9jmCDHd5TXrL1+M SiZv+xWA09IOomc3Mmk2fFiDNCeWznnUmCzS6WD4JSmqMfBlv6UFfFGmZQCxemnXwliZ lMQOZ+/zjWTuJfT8OisVYwLaq6YDM8HdX3pKCmo1Hpyebky8kr28qyfOyZeRzkPTg/GQ XHx4SM/S5gLxPMAry4fD3vqbMKBaPXK4Cy4wxxAbKhabW/Eb76FGNCw6NPOL2d2XCwnL ioSnf03QwJm80IJ4V4/OMIfqHdEHFmzvd/mHqjwA3UXFX3WZjHgN5oUEXHMrHVGgypzy LVVg== X-Gm-Message-State: AOAM531U+QYFx6DVR1lmoeVH9jWGbHo3tWbCz7345cDNhp0JAMqimOFX suYoBZGkGGB/XkaC/unVzEnUXeIrQ28= X-Google-Smtp-Source: ABdhPJyQNTcZLrdwWTH84jKCOPeePiD2y8ZFn8TKGpi5EZKSUfxWPDDEqnr6k73D9B2ScdS8HTBQKg== X-Received: by 2002:a17:903:240a:b0:14e:dad4:5ce4 with SMTP id e10-20020a170903240a00b0014edad45ce4mr19051334plo.125.1652147254804; Mon, 09 May 2022 18:47:34 -0700 (PDT) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:4e2a:1243:210:2d5c]) by smtp.gmail.com with ESMTPSA id v16-20020a62a510000000b005103abd2fdbsm9268271pfm.206.2022.05.09.18.47.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 18:47:34 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id B22E31141D15; Tue, 10 May 2022 11:17:31 +0930 (ACST) Date: Tue, 10 May 2022 11:17:31 +0930 From: Alan Modra To: binutils@sourceware.org Subject: bfd: remove use of PTR Message-ID: References: <99b5380e-8072-dd67-497d-94f72eee43c3@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3036.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 May 2022 01:47:46 -0000 * 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. diff --git a/bfd/coffcode.h b/bfd/coffcode.h index 31bd97542d0..dde8a649e43 100644 --- a/bfd/coffcode.h +++ b/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); } } diff --git a/bfd/elf32-csky.c b/bfd/elf32-csky.c index 87a879ea011..c601088a486 100644 --- a/bfd/elf32-csky.c +++ b/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 diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c index 93e503bbd79..74a9f98da3e 100644 --- a/bfd/elf32-nios2.c +++ b/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; diff --git a/bfd/elf32-visium.c b/bfd/elf32-visium.c index 4c27ba7bce2..e189647b59e 100644 --- a/bfd/elf32-visium.c +++ b/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) { diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c index a13b3c9327c..c126adf6890 100644 --- a/bfd/elfxx-ia64.c +++ b/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) diff --git a/bfd/plugin.c b/bfd/plugin.c index fb45cbee514..c69fbd7b568 100644 --- a/bfd/plugin.c +++ b/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) { -- Alan Modra Australia Development Lab, IBM