[PATCH] add support for LayoutAfter/LayoutBefore references
Michael Spencer
bigcheesegs at gmail.com
Thu Feb 7 11:55:39 PST 2013
================
Comment at: lib/ReaderWriter/ELF/File.h:307-316
@@ -288,1 +306,12 @@
+ // If we are inserting a followOn reference, lets add a precededBy
+ // reference too
+ if (followOn) {
+ ELFReference<ELFT> *precededBy = nullptr;
+ followOn->setTarget(newAtom);
+ precededBy = new (_readerStorage)
+ ELFReference<ELFT>(lld::Reference::kindLayoutBefore);
+ precededBy->setTarget(previous_atom);
+ newAtom->addReference(precededBy);
+ }
+
----------------
Shankar Kalpathi Easwaran wrote:
> Michael Spencer wrote:
> > Aren't these completely redundant?
> This is the layout before reference. This is needed to make the atoms stay in the same section.
Yes, but there's already the layout-after reference. Is that not enough to actually make it be directly after?
http://llvm-reviews.chandlerc.com/D373
More information about the llvm-commits
mailing list