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 4/6] mach-o: Handle LC_VERSION_MIN_TVOS


The load command was introduced shortly after LC_VERSION_MIN_WATCHOS. It
has exactly the same format as the other load commands from the same
family.

Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Reviewed-by: Tristan Gingold <tgingold@free.fr>
---
 bfd/ChangeLog           | 1 +
 bfd/mach-o.c            | 1 +
 binutils/ChangeLog      | 2 +-
 binutils/od-macho.c     | 2 ++
 include/ChangeLog       | 1 +
 include/mach-o/loader.h | 1 +
 6 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 5ec55af648..87047fb0eb 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -5,6 +5,7 @@
 	a few fields. Rename reserved to sdk.
 	* mach-o.c (bfd_mach_o_read_version_min): Don't split version into a
 	few fields. Rename reserved to sdk.
+	(bfd_mach_o_read_command): Handle LC_VERSION_MIN_TVOS.
 
 2018-11-06  Romain Margheriti  <lilrom13@gmail.com>
 
diff --git a/bfd/mach-o.c b/bfd/mach-o.c
index 78de9f4637..d6de267397 100644
--- a/bfd/mach-o.c
+++ b/bfd/mach-o.c
@@ -4873,6 +4873,7 @@ bfd_mach_o_read_command (bfd *abfd, bfd_mach_o_load_command *command)
     case BFD_MACH_O_LC_VERSION_MIN_MACOSX:
     case BFD_MACH_O_LC_VERSION_MIN_IPHONEOS:
     case BFD_MACH_O_LC_VERSION_MIN_WATCHOS:
+    case BFD_MACH_O_LC_VERSION_MIN_TVOS:
       if (!bfd_mach_o_read_version_min (abfd, command))
 	return FALSE;
       break;
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index ce07ba8d58..6b05f37eae 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -3,7 +3,7 @@
 
 	* od-macho.c (printf_version): New.
 	(dump_load_command): Use it to print version. Print sdk version. Print
-	version info for watchOS.
+	version info for watchOS and tvOS.
 
 2018-11-06  H.J. Lu  <hongjiu.lu@intel.com>
 
diff --git a/binutils/od-macho.c b/binutils/od-macho.c
index dc64342c65..9f2d51a2da 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_tvos", BFD_MACH_O_LC_VERSION_MIN_TVOS},
   { "version_min_watchos", BFD_MACH_O_LC_VERSION_MIN_WATCHOS},
   { NULL, 0}
 };
@@ -1594,6 +1595,7 @@ dump_load_command (bfd *abfd, bfd_mach_o_load_command *cmd,
     case BFD_MACH_O_LC_VERSION_MIN_MACOSX:
     case BFD_MACH_O_LC_VERSION_MIN_IPHONEOS:
     case BFD_MACH_O_LC_VERSION_MIN_WATCHOS:
+    case BFD_MACH_O_LC_VERSION_MIN_TVOS:
       {
         bfd_mach_o_version_min_command *ver = &cmd->command.version_min;
 
diff --git a/include/ChangeLog b/include/ChangeLog
index d9548a4747..a55fab8f00 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -3,6 +3,7 @@
 
 	* mach-o/external.h (mach_o_version_min_command_external): Rename
 	reserved to sdk.
+	* mach-o/loader.h (BFD_MACH_O_LC_VERSION_MIN_TVOS): Define
 
 2018-11-06  Romain Margheriti  <lilrom13@gmail.com>
 
diff --git a/include/mach-o/loader.h b/include/mach-o/loader.h
index 9abc51c35d..acc31f0499 100644
--- a/include/mach-o/loader.h
+++ b/include/mach-o/loader.h
@@ -185,6 +185,7 @@ typedef enum bfd_mach_o_load_command_type
   BFD_MACH_O_LC_ENCRYPTION_INFO_64 = 0x2c, /* Encrypted 64 bit seg info.  */
   BFD_MACH_O_LC_LINKER_OPTIONS = 0x2d,	/* Linker options.  */
   BFD_MACH_O_LC_LINKER_OPTIMIZATION_HINT = 0x2e, /* Optimization hints.  */
+  BFD_MACH_O_LC_VERSION_MIN_TVOS = 0x2f, /* Minimal tvOS version.  */
   BFD_MACH_O_LC_VERSION_MIN_WATCHOS = 0x30, /* Minimal WatchOS version.  */
   BFD_MACH_O_LC_BUILD_VERSION = 0x32     /* Records linker, SDK, OS, and tools version used.  */
 }
-- 
2.19.1


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