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]

Mach-O: handle lazy load dylib command


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:


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