]> git.saurik.com Git - apple/ld64.git/blobdiff - src/ld/passes/huge.cpp
ld64-253.6.tar.gz
[apple/ld64.git] / src / ld / passes / huge.cpp
index 51dda805dad9d9e938c9b7918ddee09365327466..693976cef69b27c15a3b60e6944b62cf3d5a75d7 100644 (file)
@@ -30,6 +30,7 @@
 #include <mach/machine.h>
 
 #include <vector>
+#include <map>
 
 #include "ld.hpp"
 #include "huge.h"
@@ -94,6 +95,7 @@ void doPass(const Options& opts, ld::Internal& state)
                                const ld::Atom* atom = *ait;
                                if ( atom->size() > 1024*1024 ) {
                                        hugeSection->atoms.push_back(atom);
+                                       state.atomToSection[atom] = hugeSection;
                                        if (log) fprintf(stderr, "moved to __huge: %s, size=%llu\n", atom->name(), atom->size());
                                        *ait = NULL;  // change atom to NULL for later bulk removal
                                        movedSome = true;