From: Pedro Alves <palves@redhat.com>
To: binutils@sourceware.org
Subject: [PATCH 4/5] bfd: Rename bsd_write_armap and coff_write_armap
Date: Fri, 17 Feb 2017 00:24:00 -0000 [thread overview]
Message-ID: <1487290680-24260-5-git-send-email-palves@redhat.com> (raw)
In-Reply-To: <1487290680-24260-1-git-send-email-palves@redhat.com>
Give these bfd-internal symbols with external linkage a _bfd_ prefix
to avoid collisions in the global symbol namespace.
bfd/ChangeLog:
2017-02-16 Pedro Alves <palves@redhat.com>
* archive.c (bsd_write_armap): Rename to ...
(_bfd_bsd_write_armap): ... this.
(coff_write_armap): Rename to ...
(_bfd_coff_write_armap): ... this.
* libbfd-in.h (bsd_write_armap): Rename to ...
(_bfd_bsd_write_armap): ... this.
(coff_write_armap): Rename to ...
(_bfd_coff_write_armap): ... this.
* aout-target.h, aout-tic30.c: Adjust all users.
* libbfd.h: Regenerate.
---
bfd/aout-target.h | 2 +-
bfd/aout-tic30.c | 2 +-
bfd/archive.c | 20 ++++++++++----------
bfd/libbfd-in.h | 10 +++++-----
bfd/libbfd.h | 10 +++++-----
5 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/bfd/aout-target.h b/bfd/aout-target.h
index de954ca..9f77c95 100644
--- a/bfd/aout-target.h
+++ b/bfd/aout-target.h
@@ -373,7 +373,7 @@ MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
_bfd_archive_bsd_construct_extended_name_table
#endif
#ifndef MY_write_armap
-#define MY_write_armap bsd_write_armap
+#define MY_write_armap _bfd_bsd_write_armap
#endif
#ifndef MY_read_ar_hdr
#define MY_read_ar_hdr _bfd_generic_read_ar_hdr
diff --git a/bfd/aout-tic30.c b/bfd/aout-tic30.c
index 66de656..29dad9f 100644
--- a/bfd/aout-tic30.c
+++ b/bfd/aout-tic30.c
@@ -828,7 +828,7 @@ tic30_aout_set_arch_mach (bfd *abfd,
_bfd_archive_bsd_construct_extended_name_table
#endif
#ifndef MY_write_armap
-#define MY_write_armap bsd_write_armap
+#define MY_write_armap _bfd_bsd_write_armap
#endif
#ifndef MY_read_ar_hdr
#define MY_read_ar_hdr _bfd_generic_read_ar_hdr
diff --git a/bfd/archive.c b/bfd/archive.c
index cb7f226..d96c866 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -2455,11 +2455,11 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
}
bfd_boolean
-bsd_write_armap (bfd *arch,
- unsigned int elength,
- struct orl *map,
- unsigned int orl_count,
- int stridx)
+_bfd_bsd_write_armap (bfd *arch,
+ unsigned int elength,
+ struct orl *map,
+ unsigned int orl_count,
+ int stridx)
{
int padit = stridx & 1;
unsigned int ranlibsize = orl_count * BSD_SYMDEF_SIZE;
@@ -2679,11 +2679,11 @@ _bfd_archive_bsd_update_armap_timestamp (bfd *arch)
symbol name n-1 */
bfd_boolean
-coff_write_armap (bfd *arch,
- unsigned int elength,
- struct orl *map,
- unsigned int symbol_count,
- int stridx)
+_bfd_coff_write_armap (bfd *arch,
+ unsigned int elength,
+ struct orl *map,
+ unsigned int symbol_count,
+ int stridx)
{
/* The size of the ranlib is the number of exported symbols in the
archive * the number of bytes in an int, + an int for the count. */
diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h
index 99251e2..ad362dc 100644
--- a/bfd/libbfd-in.h
+++ b/bfd/libbfd-in.h
@@ -207,11 +207,11 @@ void bfd_bsd_truncate_arname
void bfd_gnu_truncate_arname
(bfd *abfd, const char *filename, char *hdr);
-bfd_boolean bsd_write_armap
+bfd_boolean _bfd_bsd_write_armap
(bfd *arch, unsigned int elength, struct orl *map, unsigned int orl_count,
int stridx);
-bfd_boolean coff_write_armap
+bfd_boolean _bfd_coff_write_armap
(bfd *arch, unsigned int elength, struct orl *map, unsigned int orl_count,
int stridx);
@@ -321,7 +321,7 @@ extern int _bfd_nocore_core_file_pid
extern bfd_boolean _bfd_archive_bsd_construct_extended_name_table
(bfd *, char **, bfd_size_type *, const char **);
#define _bfd_archive_bsd_truncate_arname bfd_bsd_truncate_arname
-#define _bfd_archive_bsd_write_armap bsd_write_armap
+#define _bfd_archive_bsd_write_armap _bfd_bsd_write_armap
#define _bfd_archive_bsd_read_ar_hdr _bfd_generic_read_ar_hdr
#define _bfd_archive_bsd_write_ar_hdr _bfd_generic_write_ar_hdr
#define _bfd_archive_bsd_openr_next_archived_file \
@@ -341,7 +341,7 @@ extern bfd_boolean _bfd_archive_bsd_update_armap_timestamp
extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
(bfd *, char **, bfd_size_type *, const char **);
#define _bfd_archive_coff_truncate_arname bfd_dont_truncate_arname
-#define _bfd_archive_coff_write_armap coff_write_armap
+#define _bfd_archive_coff_write_armap _bfd_coff_write_armap
#define _bfd_archive_coff_read_ar_hdr _bfd_generic_read_ar_hdr
#define _bfd_archive_coff_write_ar_hdr _bfd_generic_write_ar_hdr
#define _bfd_archive_coff_openr_next_archived_file \
@@ -360,7 +360,7 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
extern bfd_boolean _bfd_archive_bsd44_construct_extended_name_table
(bfd *, char **, bfd_size_type *, const char **);
#define _bfd_archive_bsd44_truncate_arname bfd_bsd_truncate_arname
-#define _bfd_archive_bsd44_write_armap bsd_write_armap
+#define _bfd_archive_bsd44_write_armap _bfd_bsd_write_armap
#define _bfd_archive_bsd44_read_ar_hdr _bfd_generic_read_ar_hdr
#define _bfd_archive_bsd44_write_ar_hdr _bfd_bsd44_write_ar_hdr
#define _bfd_archive_bsd44_openr_next_archived_file \
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index f19b0db..9869e15 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -212,11 +212,11 @@ void bfd_bsd_truncate_arname
void bfd_gnu_truncate_arname
(bfd *abfd, const char *filename, char *hdr);
-bfd_boolean bsd_write_armap
+bfd_boolean _bfd_bsd_write_armap
(bfd *arch, unsigned int elength, struct orl *map, unsigned int orl_count,
int stridx);
-bfd_boolean coff_write_armap
+bfd_boolean _bfd_coff_write_armap
(bfd *arch, unsigned int elength, struct orl *map, unsigned int orl_count,
int stridx);
@@ -326,7 +326,7 @@ extern int _bfd_nocore_core_file_pid
extern bfd_boolean _bfd_archive_bsd_construct_extended_name_table
(bfd *, char **, bfd_size_type *, const char **);
#define _bfd_archive_bsd_truncate_arname bfd_bsd_truncate_arname
-#define _bfd_archive_bsd_write_armap bsd_write_armap
+#define _bfd_archive_bsd_write_armap _bfd_bsd_write_armap
#define _bfd_archive_bsd_read_ar_hdr _bfd_generic_read_ar_hdr
#define _bfd_archive_bsd_write_ar_hdr _bfd_generic_write_ar_hdr
#define _bfd_archive_bsd_openr_next_archived_file \
@@ -346,7 +346,7 @@ extern bfd_boolean _bfd_archive_bsd_update_armap_timestamp
extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
(bfd *, char **, bfd_size_type *, const char **);
#define _bfd_archive_coff_truncate_arname bfd_dont_truncate_arname
-#define _bfd_archive_coff_write_armap coff_write_armap
+#define _bfd_archive_coff_write_armap _bfd_coff_write_armap
#define _bfd_archive_coff_read_ar_hdr _bfd_generic_read_ar_hdr
#define _bfd_archive_coff_write_ar_hdr _bfd_generic_write_ar_hdr
#define _bfd_archive_coff_openr_next_archived_file \
@@ -365,7 +365,7 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
extern bfd_boolean _bfd_archive_bsd44_construct_extended_name_table
(bfd *, char **, bfd_size_type *, const char **);
#define _bfd_archive_bsd44_truncate_arname bfd_bsd_truncate_arname
-#define _bfd_archive_bsd44_write_armap bsd_write_armap
+#define _bfd_archive_bsd44_write_armap _bfd_bsd_write_armap
#define _bfd_archive_bsd44_read_ar_hdr _bfd_generic_read_ar_hdr
#define _bfd_archive_bsd44_write_ar_hdr _bfd_bsd44_write_ar_hdr
#define _bfd_archive_bsd44_openr_next_archived_file \
--
2.5.5
next prev parent reply other threads:[~2017-02-17 0:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-17 0:18 [PATCH 0/5] Rename a few internal symbols to avoid collisions Pedro Alves
2017-02-17 0:18 ` [PATCH 1/5] bfd: Rename read_{signed,unsigned}_leb128, safe_read_leb128 Pedro Alves
2017-02-17 0:18 ` [PATCH 2/5] bfd: Rename real_{ftell, fseek, fopen} Pedro Alves
2017-02-17 0:18 ` [PATCH 3/5] bfd: Rename warn_deprecated Pedro Alves
2017-02-17 0:24 ` [PATCH 5/5] bfd: Rename Chunk and S3Forced Pedro Alves
2017-02-17 0:24 ` Pedro Alves [this message]
2017-02-17 1:06 ` [PATCH 0/5] Rename a few internal symbols to avoid collisions Alan Modra
2017-02-17 2:16 ` Pedro Alves
2017-02-17 2:30 ` Pedro Alves
2017-02-17 2:53 ` Alan Modra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1487290680-24260-5-git-send-email-palves@redhat.com \
--to=palves@redhat.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).