[llvm] r269846 - [obj2yaml][yaml2obj] Fixing dyld_info_command mappings

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Tue May 17 14:33:59 PDT 2016


Author: cbieneman
Date: Tue May 17 16:33:59 2016
New Revision: 269846

URL: http://llvm.org/viewvc/llvm-project?rev=269846&view=rev
Log:
[obj2yaml][yaml2obj] Fixing dyld_info_command mappings

Apparently I mucked up the mappings here, which was causing some binary differences in round tripping.

Modified:
    llvm/trunk/lib/ObjectYAML/MachOYAML.cpp

Modified: llvm/trunk/lib/ObjectYAML/MachOYAML.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ObjectYAML/MachOYAML.cpp?rev=269846&r1=269845&r2=269846&view=diff
==============================================================================
--- llvm/trunk/lib/ObjectYAML/MachOYAML.cpp (original)
+++ llvm/trunk/lib/ObjectYAML/MachOYAML.cpp Tue May 17 16:33:59 2016
@@ -120,10 +120,12 @@ void MappingTraits<MachO::dyld_info_comm
     IO &IO, MachO::dyld_info_command &LoadCommand) {
   IO.mapRequired("rebase_off", LoadCommand.rebase_off);
   IO.mapRequired("rebase_size", LoadCommand.rebase_size);
-  IO.mapRequired("bind_off", LoadCommand.bind_size);
+  IO.mapRequired("bind_off", LoadCommand.bind_off);
+  IO.mapRequired("bind_size", LoadCommand.bind_size);
   IO.mapRequired("weak_bind_off", LoadCommand.weak_bind_off);
   IO.mapRequired("weak_bind_size", LoadCommand.weak_bind_size);
-  IO.mapRequired("lazy_bind_off", LoadCommand.lazy_bind_size);
+  IO.mapRequired("lazy_bind_off", LoadCommand.lazy_bind_off);
+  IO.mapRequired("lazy_bind_size", LoadCommand.lazy_bind_size);
   IO.mapRequired("export_off", LoadCommand.export_off);
   IO.mapRequired("export_size", LoadCommand.export_size);
 }




More information about the llvm-commits mailing list