This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Mach-O: handle lazy load dylib command
- From: Tristan Gingold <gingold at adacore dot com>
- To: "binutils at sourceware dot org Development" <binutils at sourceware dot org>
- Date: Mon, 17 Mar 2014 10:16:59 +0100
- Subject: Mach-O: handle lazy load dylib command
- Authentication-results: sourceware.org; auth=none
Hello,
this tiny patch adds support for lazy_load_dylib command, so that
bfd doesn't emit a warning on files with that command.
Committed on trunk.
Tristan.
bfd/
* mach-o.c (bfd_mach_o_read_dylib): Handle lazy load dylib.
(bfd_mach_o_read_command): Ditto.
binutils/
* od-macho.c (dump_load_command): Handle lazy load dylib.
diff --git a/bfd/mach-o.c b/bfd/mach-o.c
index da7f87d..c77520a 100644
--- a/bfd/mach-o.c
+++ b/bfd/mach-o.c
@@ -3172,6 +3172,7 @@ bfd_mach_o_read_dylib (bfd *abfd, bfd_mach_o_load_command *command)
switch (command->type)
{
case BFD_MACH_O_LC_LOAD_DYLIB:
+ case BFD_MACH_O_LC_LAZY_LOAD_DYLIB:
case BFD_MACH_O_LC_LOAD_WEAK_DYLIB:
case BFD_MACH_O_LC_ID_DYLIB:
case BFD_MACH_O_LC_REEXPORT_DYLIB:
@@ -3841,6 +3842,7 @@ bfd_mach_o_read_command (bfd *abfd, bfd_mach_o_load_command *command)
return -1;
break;
case BFD_MACH_O_LC_LOAD_DYLIB:
+ case BFD_MACH_O_LC_LAZY_LOAD_DYLIB:
case BFD_MACH_O_LC_ID_DYLIB:
case BFD_MACH_O_LC_LOAD_WEAK_DYLIB:
case BFD_MACH_O_LC_REEXPORT_DYLIB:
diff --git a/binutils/od-macho.c b/binutils/od-macho.c
index b97db04..45a0beb 100644
--- a/binutils/od-macho.c
+++ b/binutils/od-macho.c
@@ -938,6 +938,7 @@ dump_load_command (bfd *abfd, bfd_mach_o_load_command *cmd,
}
break;
case BFD_MACH_O_LC_LOAD_DYLIB:
+ case BFD_MACH_O_LC_LAZY_LOAD_DYLIB:
case BFD_MACH_O_LC_LOAD_WEAK_DYLIB:
case BFD_MACH_O_LC_REEXPORT_DYLIB:
case BFD_MACH_O_LC_ID_DYLIB: