[PATCH] Add explictly exported atoms and export R_*_COPY'ed atoms.
kledzik at apple.com
kledzik at apple.com
Tue Nov 5 16:26:41 PST 2013
LGTM
================
Comment at: include/lld/Core/DefinedAtom.h:189
@@ +188,3 @@
+ enum DynamicExport {
+ /// \brief The linker may or may not export this atom dynamicly depending on
+ /// the output type and other context of the link.
----------------
dynamically
================
Comment at: include/lld/Core/DefinedAtom.h:263
@@ -254,1 +262,3 @@
+ /// \brief Under which conditions should this atom be dynamicly exported.
+ virtual DynamicExport dynamicExport() const {
----------------
dynamically
================
Comment at: lib/ReaderWriter/ELF/OutputELFWriter.h:157-158
@@ +156,4 @@
+ for (const auto &atom : section->atoms()) {
+ const DefinedAtom *da = dyn_cast<const DefinedAtom>(atom->_atom);
+ if (da && da->dynamicExport() == DefinedAtom::dynamicExportAlways)
+ _dynamicSymbolTable->addSymbol(atom->_atom, section->ordinal(),
----------------
if (const DefinedAtom *da = dyn_cast<const DefinedAtom>(atom->_atom)) {
if (da->dynamicExport() == DefinedAtom::dynamicExportAlways))
gets rid of the "da &&"
http://llvm-reviews.chandlerc.com/D1799
More information about the llvm-commits
mailing list