[PATCH] [lld][ELF] Make AtomLayout more accessible.

Shankar Kalpathi Easwaran shankarke at gmail.com
Mon Jan 28 18:32:14 PST 2013



================
Comment at: lib/ReaderWriter/ELF/DefaultELFLayout.h:376-378
@@ -396,1 +375,5 @@
   if (const DefinedAtom *definedAtom = dyn_cast<DefinedAtom>(atom)) {
+    // HACK: Ignore undefined atoms. We need to adjust the interface so that
+    // undefined atoms can still be included in the output symbol table for
+    // -noinhibit-exec.
+    if (definedAtom->contentType() == DefinedAtom::typeUnknown)
----------------
We can add atoms to the output symbol table as usual because Undefined Atoms are not owned by any section.

================
Comment at: lib/ReaderWriter/ELF/DefaultELFLayout.h:379-380
@@ -397,1 +378,4 @@
+    // -noinhibit-exec.
+    if (definedAtom->contentType() == DefinedAtom::typeUnknown)
+      return make_error_code(llvm::errc::invalid_argument);
     const StringRef sectionName = getSectionName(
----------------
Is there a need to check this ?


http://llvm-reviews.chandlerc.com/D340



More information about the llvm-commits mailing list