[PATCH] [ELF] Fix weak symbols order
Michael Spencer
bigcheesegs at gmail.com
Wed Mar 6 13:35:59 PST 2013
Looks fine with these changes. Also, you're missing the binary files.
================
Comment at: lib/Passes/LayoutPass.cpp:162
@@ +161,3 @@
+ // atom into the chain
+ size_t currentAtomSize = (*ai).size();
+
----------------
.empty()
================
Comment at: lib/Passes/LayoutPass.cpp:204-205
@@ +203,4 @@
+ _followOnNexts[ai] = targetAtom;
+ }
+ else {
+ _followOnNexts[ai] = _followOnRoots[targetAtom];
----------------
No newline.
================
Comment at: lib/Passes/LayoutPass.cpp:219-226
@@ -200,7 +218,10 @@
+ break;
+ } // while true
+ } // end else (currentAtomSize != 0)
} // end else
} // else
} // kindLayoutAfter
} // Reference
} // range
}
----------------
This function is getting nested too deeply. It should probably be split into multiple functions.
================
Comment at: lib/ReaderWriter/ELF/File.h:464
@@ +463,3 @@
+ // reference to the anonymous atom that we created
+ if (((*si)->getBinding() == llvm::ELF::STB_WEAK) && (anonAtom)) {
+ ELFReference<ELFT> *wFollowedBy = new (_readerStorage)
----------------
Drop the extra parens.
if ((*si)->getBinding() == llvm::ELF::STB_WEAK && anonAtom)
http://llvm-reviews.chandlerc.com/D501
More information about the llvm-commits
mailing list