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 2/6] mach-o: Print sdk field in LC_VERSION_MIN_*


sdk field was read by bfd but never printed.
Rename it to sdk and dump it in od.

Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Saagar Jha  <saagar@saagarjha.com>
Reviewed-by: Tristan Gingold <tgingold@free.fr>
---
 bfd/ChangeLog             | 5 +++--
 bfd/mach-o.c              | 2 +-
 bfd/mach-o.h              | 2 +-
 binutils/ChangeLog        | 3 ++-
 binutils/od-macho.c       | 2 ++
 include/ChangeLog         | 6 ++++++
 include/mach-o/external.h | 2 +-
 7 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index d90e4576f1..5ec55af648 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,9 +1,10 @@
 2018-11-06  Roman Bolshakov <r.bolshakov@yadro.com>
+	    Saagar Jha  <saagar@saagarjha.com>
 
 	* mach-o.h (bfd_mach_o_version_min_command): Don't split version into
-	a few fields.
+	a few fields. Rename reserved to sdk.
 	* mach-o.c (bfd_mach_o_read_version_min): Don't split version into a
-	few fields.
+	few fields. Rename reserved to sdk.
 
 2018-11-06  Romain Margheriti  <lilrom13@gmail.com>
 
diff --git a/bfd/mach-o.c b/bfd/mach-o.c
index e3d5dbe0d5..78de9f4637 100644
--- a/bfd/mach-o.c
+++ b/bfd/mach-o.c
@@ -4603,7 +4603,7 @@ bfd_mach_o_read_version_min (bfd *abfd, bfd_mach_o_load_command *command)
     return FALSE;
 
   cmd->version = bfd_get_32 (abfd, raw.version);
-  cmd->reserved = bfd_get_32 (abfd, raw.reserved);
+  cmd->sdk = bfd_get_32 (abfd, raw.sdk);
   return TRUE;
 }
 
diff --git a/bfd/mach-o.h b/bfd/mach-o.h
index 4fd229f352..28ccb09c69 100644
--- a/bfd/mach-o.h
+++ b/bfd/mach-o.h
@@ -520,7 +520,7 @@ bfd_mach_o_dyld_info_command;
 typedef struct bfd_mach_o_version_min_command
 {
   uint32_t version;
-  uint32_t reserved;
+  uint32_t sdk;
 }
 bfd_mach_o_version_min_command;
 
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 089d7a61b6..270ee4d693 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,7 +1,8 @@
 2018-11-06  Roman Bolshakov  <r.bolshakov@yadro.com>
+	    Saagar Jha  <saagar@saagarjha.com>
 
 	* od-macho.c (printf_version): New.
-	(dump_load_command): Use it to print version.
+	(dump_load_command): Use it to print version. Print sdk version.
 
 2018-11-06  H.J. Lu  <hongjiu.lu@intel.com>
 
diff --git a/binutils/od-macho.c b/binutils/od-macho.c
index 9b10f2d654..d394c75774 100644
--- a/binutils/od-macho.c
+++ b/binutils/od-macho.c
@@ -1597,6 +1597,8 @@ dump_load_command (bfd *abfd, bfd_mach_o_load_command *cmd,
 
         printf ("   os: ");
         printf_version (ver->version);
+        printf ("\n   sdk: ");
+        printf_version (ver->sdk);
         printf ("\n");
       }
       break;
diff --git a/include/ChangeLog b/include/ChangeLog
index 3bcf18047b..d9548a4747 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,9 @@
+2018-11-06  Roman Bolshakov <r.bolshakov@yadro.com>
+	    Saagar Jha  <saagar@saagarjha.com>
+
+	* mach-o/external.h (mach_o_version_min_command_external): Rename
+	reserved to sdk.
+
 2018-11-06  Romain Margheriti  <lilrom13@gmail.com>
 
 	PR 23742
diff --git a/include/mach-o/external.h b/include/mach-o/external.h
index 2609bad982..aa7260a58a 100644
--- a/include/mach-o/external.h
+++ b/include/mach-o/external.h
@@ -308,7 +308,7 @@ struct mach_o_twolevel_hints_command_external
 struct mach_o_version_min_command_external
 {
   unsigned char version[4];
-  unsigned char reserved[4];
+  unsigned char sdk[4];
 };
 
 struct mach_o_encryption_info_command_external
-- 
2.19.1


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