[3/6] mach-o: Print LC_VERSION_MIN_WATCHOS

Message ID 20181106140637.78145-4-r.bolshakov@yadro.com
State Superseded
Headers show
Series
  • Fixes for new mach-o load commands
Related show

Commit Message

Roman Bolshakov Nov. 6, 2018, 2:06 p.m.
Content of LC_VERSION_MIN_WATCHOS gets parsed by bfd but objdump doesn't
print it.

Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>

Cc: Tristan Gingold <tgingold@free.fr>
---
 binutils/ChangeLog  | 3 ++-
 binutils/od-macho.c | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

-- 
2.19.1

Patch

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 2e75d67dcd..d57efdd14f 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -2,7 +2,8 @@ 
 	    Saagar Jha  <saagar@saagarjha.com>
 
 	* od-macho.c (printf_version): New.
-	(dump_load_command): Use it to print version. Print sdk version.
+	(dump_load_command): Use it to print version. Print sdk version. Print
+	version info for watchOS.
 
 2018-11-03  H.J. Lu  <hongjiu.lu@intel.com>
 
diff --git a/binutils/od-macho.c b/binutils/od-macho.c
index c8972eaf7b..dec6228f48 100644
--- a/binutils/od-macho.c
+++ b/binutils/od-macho.c
@@ -209,6 +209,7 @@  static const bfd_mach_o_xlat_name bfd_mach_o_load_command_name[] =
   { "encryption_info_64", BFD_MACH_O_LC_ENCRYPTION_INFO_64},
   { "linker_options", BFD_MACH_O_LC_LINKER_OPTIONS},
   { "linker_optimization_hint", BFD_MACH_O_LC_LINKER_OPTIMIZATION_HINT},
+  { "version_min_watchos", BFD_MACH_O_LC_VERSION_MIN_WATCHOS},
   { NULL, 0}
 };
 
@@ -1591,6 +1592,7 @@  dump_load_command (bfd *abfd, bfd_mach_o_load_command *cmd,
       break;
     case BFD_MACH_O_LC_VERSION_MIN_MACOSX:
     case BFD_MACH_O_LC_VERSION_MIN_IPHONEOS:
+    case BFD_MACH_O_LC_VERSION_MIN_WATCHOS:
       {
         bfd_mach_o_version_min_command *ver = &cmd->command.version_min;