This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 0/5] Rename a few internal symbols to avoid collisions
- From: Pedro Alves <palves at redhat dot com>
- To: binutils at sourceware dot org
- Date: Fri, 17 Feb 2017 00:17:55 +0000
- Subject: [PATCH 0/5] Rename a few internal symbols to avoid collisions
- Authentication-results: sourceware.org; auth=none
Jan ran into a global symbol name conflict between GDB and BFD here:
https://sourceware.org/ml/gdb-patches/2017-02/msg00299.html
The BFD symbols in question are not part of the BFD API, however they
need to have external linkage. Given that BFD is a library, I think
that it's BFD that should be a bit more careful in the name of symbols
it exports. I.e., to avoid naming conflicts with projects that use
BFD, these symbols should have names in BFD's "internal namespace",
i.e,. they should have a "_bfd_" prefix.
Playing with:
$ nm -A libbfd.a | grep " T " | grep -v " bfd" | grep -v " _bfd"
$ nm -A libbfd.a | grep " B " | grep -v " bfd" | grep -v " _bfd"
$ nm -A libbfd.a | grep " D " | grep -v " bfd" | grep -v " _bfd"
I noticed quite a few others that need similar treatment. This series
fixes a few easy glaring ones, though there's a lot more that could be
done [which I don't really plan on doing].
OK?
Pedro Alves (5):
bfd: Rename read_{signed,unsigned}_leb128, safe_read_leb128
bfd: Rename real_{ftell, fseek, fopen}
bfd: Rename warn_deprecated
bfd: Rename bsd_write_armap and coff_write_armap
bfd: Rename Chunk and S3Forced
bfd/aout-target.h | 2 +-
bfd/aout-tic30.c | 2 +-
bfd/archive.c | 20 ++++++------
bfd/bfd-in.h | 10 +++---
bfd/bfd-in2.h | 10 +++---
bfd/bfdio.c | 6 ++--
bfd/cache.c | 17 ++++++-----
bfd/dwarf2.c | 90 +++++++++++++++++++++++++++++++++++-------------------
bfd/elf-attrs.c | 8 ++---
bfd/elf32-nds32.c | 4 +--
bfd/libbfd-in.h | 24 +++++++--------
bfd/libbfd.c | 30 +++++++++---------
bfd/libbfd.h | 24 +++++++--------
bfd/opncls.c | 8 ++---
bfd/srec.c | 22 ++++++-------
binutils/objcopy.c | 12 ++++----
16 files changed, 159 insertions(+), 130 deletions(-)
--
2.5.5