<div dir="ltr"><div class="gmail_extra"><div>On Tue, Oct 1, 2013 at 12:30 PM, <a href="mailto:kledzik@apple.com">kledzik@apple.com</a> <span dir="ltr"><<a href="mailto:kledzik@apple.com" target="_blank">kledzik@apple.com</a>></span> wrote:<br>
</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
  Can you explain the "explicitly exported" concept.  Will it be needed elsewhere?   It sounds like this is logically an attribute of an atom, but it does not come from the object file.  Instead it is an attribute that came about during the link.  There are potentially other attributes like that.  For instance, liveness (used during dead stripping), or canBeNullAtRuntime (copied from Undefined atom to SharedLibraryAtom).   We should have a general solution for this.  (In ld64 I wound up adding these attributes to the base Atom class and const casting in the handful of places in the linker I needed to "set" them).<br>

<br>
  Also, it took some head scratching to figure out what ObjectAtom was.  The term "object" is way overloaded.  I think it is for data atoms that came from STT_OBJECT symbols...<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D1799" target="_blank">http://llvm-reviews.chandlerc.com/D1799</a><br>
</blockquote></div><br></div><div class="gmail_extra">By default no symbols are dynamically exported from executables. Symbols need to be exported in the case of interposition (such as what happens with COPY relocations) and providing a symbol for shared libs to dlsym. There are also two command line options that can be used to explicitly export symbols by name.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">I really dislike const_cast. It makes code much harder to reason about.</div><div class="gmail_extra"><br></div><div class="gmail_extra">I agree that ObjectAtom isn't a great name. I couldn't think of a better one.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">- Michael Spencer<br></div><div class="gmail_extra"><br></div></div>