Recognize some new Mach-O load commands
authorSaagar Jha <saagar@saagarjha.com>
Mon, 22 Jun 2020 13:29:20 +0000 (14:29 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 22 Jun 2020 13:29:20 +0000 (14:29 +0100)
bfd
* mach-o.c: Support the new load commands by reading a linkedit data
command for them.
binutils
* od-macho.c: Dump linkedit data for new load commands.
include
* mach-o/loader.h: Add declarations of two new Mach-O load
commands.

bfd/ChangeLog
bfd/mach-o.c
binutils/ChangeLog
binutils/od-macho.c
include/ChangeLog
include/mach-o/loader.h

index 6ac3c0fb67efc423a25dd12cad0daceccdc9b7ad..f14967791339ef03ae528b7d8af281a4510ee31b 100644 (file)
@@ -1,3 +1,8 @@
+2020-06-22  Saagar Jha  <saagar@saagarjha.com>
+
+       * mach-o.c: Support the new load commands by reading a linkedit
+       data command for them.
+
 2020-06-22  Nelson Chu  <nelson.chu@sifive.com>
 
        * elfxx-riscv.c (struct priv_spec_t priv_specs[]): Move them from
index 43fa56cb5860504788ec6ad60a59f40d3ba932ac..f285305cd0893b39b0908eac12c9815745ce6f3d 100644 (file)
@@ -5017,6 +5017,8 @@ bfd_mach_o_read_command (bfd *abfd, bfd_mach_o_load_command *command,
     case BFD_MACH_O_LC_DATA_IN_CODE:
     case BFD_MACH_O_LC_DYLIB_CODE_SIGN_DRS:
     case BFD_MACH_O_LC_LINKER_OPTIMIZATION_HINT:
+    case BFD_MACH_O_LC_DYLD_EXPORTS_TRIE:
+    case BFD_MACH_O_LC_DYLD_CHAINED_FIXUPS:
       if (!bfd_mach_o_read_linkedit (abfd, command))
        return FALSE;
       break;
index 0cac3f4f95515fab24ddc55521f0a15433eb36f1..700c1ea9397a580a65c38219702b95c0dac646cf 100644 (file)
@@ -1,3 +1,7 @@
+2020-06-22  Saagar Jha  <saagar@saagarjha.com>
+
+       * od-macho.c: Dump linkedit data for new load commands.
+
 2020-06-19  Alan Modra  <amodra@gmail.com>
 
        * testsuite/config/default.exp (ld_elf_shared_opt): Don't set.
index f9d4b3729f8de3ece09399414c81cdb105e15012..938426806c530c9cf01093d54229e581dca17761 100644 (file)
@@ -214,6 +214,8 @@ static const bfd_mach_o_xlat_name bfd_mach_o_load_command_name[] =
   { "version_min_watchos", BFD_MACH_O_LC_VERSION_MIN_WATCHOS},
   { "note", BFD_MACH_O_LC_NOTE},
   { "build_version", BFD_MACH_O_LC_BUILD_VERSION},
+  { "exports_trie", BFD_MACH_O_LC_DYLD_EXPORTS_TRIE},
+  { "chained_fixups", BFD_MACH_O_LC_DYLD_CHAINED_FIXUPS},
   { NULL, 0}
 };
 
@@ -1610,6 +1612,8 @@ dump_load_command (bfd *abfd, bfd_mach_o_load_command *cmd,
     case BFD_MACH_O_LC_FUNCTION_STARTS:
     case BFD_MACH_O_LC_DATA_IN_CODE:
     case BFD_MACH_O_LC_DYLIB_CODE_SIGN_DRS:
+    case BFD_MACH_O_LC_DYLD_EXPORTS_TRIE:
+    case BFD_MACH_O_LC_DYLD_CHAINED_FIXUPS:
       {
         bfd_mach_o_linkedit_command *linkedit = &cmd->command.linkedit;
         printf
index 65e8af867f9a18cf72099a6ab4192091fa7eeb3d..12467f86aba85bcbe6472a694ab3fd576e0a0d5d 100644 (file)
@@ -1,3 +1,8 @@
+2020-06-22  Saagar Jha  <saagar@saagarjha.com>
+
+       * mach-o/loader.h: Add declarations of two new Mach-O load
+       commands.
+
 2020-06-22  Nelson Chu  <nelson.chu@sifive.com>
 
        * opcode/riscv.h (riscv_get_priv_spec_class): Move the function
index a34a89421feb5b152dcbed9c0587af691b049887..47d4608ba98b022e4937161e651984e4bc0fadb6 100644 (file)
@@ -189,6 +189,8 @@ typedef enum bfd_mach_o_load_command_type
   BFD_MACH_O_LC_VERSION_MIN_WATCHOS = 0x30,    /* Minimal watchOS version.  */
   BFD_MACH_O_LC_NOTE = 0x31,                   /* Region of arbitrary data.  */
   BFD_MACH_O_LC_BUILD_VERSION = 0x32,          /* Generic build version.  */
+  BFD_MACH_O_LC_DYLD_EXPORTS_TRIE = 0x33,      /* Exports trie. */
+  BFD_MACH_O_LC_DYLD_CHAINED_FIXUPS = 0x34,    /* Chained fixups. */
 }
 bfd_mach_o_load_command_type;
 \f