This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v2 0/6] Fixes for new mach-o load commands


Hello dear maintainers,

Apple has added a set of new load commands that weren't handled by bfd.
Some of them are rarely processed by binutils, like binaries with
LC_VERSION_MIN_TVOS.

But inability to handle LC_BUILD_VERSION resulted in a few bug reports,
and rendered binutils/gdb to be unusable with Mojave binaries:
  binutils/23728, gdb/23742, binutils/23746

The patch series implements processing of the new commands in bfd and
dump routines in objectdump.

I'm leaving the original cover message as is because couple hours after
v1 patchset, another commit came into master brach that fixes the
aforementioned errors on macOS Mojave by skipping LC_BUILD_VERSION
command.

The patchset should still be helpful as it does parse LC_BUILD_VERSION
and a few other load commands.

--
Best regards,
Roman

Changes in v2:
  * Reformatted printf_version to follow GNU style
  * Rebased to master

Roman Bolshakov (6):
  mach-o: Don't split version into a few fields
  mach-o: Print sdk field in LC_VERSION_MIN_*
  mach-o: Print LC_VERSION_MIN_WATCHOS
  mach-o: Handle LC_VERSION_MIN_TVOS
  mach-o: Handle LC_NOTE
  mach-o: Handle LC_BUILD_VERSION command

 bfd/ChangeLog             |  19 +++++++
 bfd/mach-o.c              |  49 +++++++++++++++---
 bfd/mach-o.h              |  44 ++++++++++++++--
 binutils/ChangeLog        |  11 ++++
 binutils/od-macho.c       | 104 +++++++++++++++++++++++++++++++++++++-
 include/ChangeLog         |  10 ++++
 include/mach-o/external.h |  17 ++++++-
 include/mach-o/loader.h   |   2 +
 8 files changed, 242 insertions(+), 14 deletions(-)

-- 
2.19.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]