[PATCH 0/3] fallout from CTF symbol section work

Nick Alcock nick.alcock@oracle.com
Tue Nov 24 18:59:18 GMT 2020


This series fixes a couple of bugs that arose after the symbol section
stuff went in.  HJ's format argument fix has been seen on the list
already and is here for completeness because I tweaked it a bit, but the
other two are new.  The first (which can't really have a testcase
because it needs a cross-compiler) fixes symbol table handling in libctf
when the symbol table is on a target with endianness opposite to that of
the host, and arranges to detect this automatically when a bfd target is
involved (so ld and objcopy need no changes): the second ties readelf
into this machinery so that it can inspect the function info and data
object sections of .ctf sections of opposite-to-host endianness.

I don't think any of these need (further) review: the readelf one might,
but it's entirely in the CTF-handling part of readelf so perhaps not.

Tested the cross-endian stuff using sparc64-unknown-linux-gnu binaries
viewed with objcopy and readelf on x86_64-pc-linux-gnu, and vice versa.

Will push tomorrow if nobody objects.

H.J. Lu (1):
  libctf: Pass format argument to asprintf

Nick Alcock (2):
  libctf, include: support foreign-endianness symtabs with CTF
  binutils: readelf: support CTF dicts with non-native-endian symtabs

 binutils/readelf.c    |  3 +++
 include/ctf-api.h     | 30 ++++++++++++---------
 libctf/ctf-archive.c  | 35 +++++++++++++++++++-----
 libctf/ctf-create.c   |  1 +
 libctf/ctf-dump.c     |  2 +-
 libctf/ctf-impl.h     |  2 ++
 libctf/ctf-open-bfd.c |  7 +++++
 libctf/ctf-open.c     | 56 +++++++++++++++++++++-----------------
 libctf/ctf-util.c     | 62 +++++++++++++++++++++++++++++++++++--------
 libctf/libctf.ver     |  2 ++
 libctf/swap.h         | 24 +++++++++++++++++
 11 files changed, 167 insertions(+), 57 deletions(-)

-- 
2.29.0.249.g249b51256f



More information about the Binutils mailing list