<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Aug 28, 2013, at 4:24 PM, Shankar Easwaran <<a href="mailto:shankare@codeaurora.org">shankare@codeaurora.org</a>> wrote:</div><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Hi Nick,<br><br><blockquote cite="mid:FFC1B85C-A0CA-4735-9D45-86A812A08862@apple.com" type="cite"><pre wrap=""> Also for the case of -u, the Driver can make generic UndefinedAtoms. </pre></blockquote>ELF would want to treat the undefined symbols as a weak undefined symbols. So the driver cant create undefined atoms.<br><br>Below is an example :-<br><br>$cat 1.c<br>int _start() { return 0; }<br>$gcc -c 1.c<br>$ld -u myundef 1.o<br>==> Does not throw any error, the resolver was hinted that<span class="Apple-converted-space"> </span><i>myundef<span class="Apple-converted-space"> </span></i>was a undefined weak symbol.<br></div></blockquote><div>Wow. Reading the gnu ld man page, that is not obvious. How can you make a non-weak undefined on the command line? That is, how can you force and error if something is not defined?</div><div><br></div><br><blockquote type="cite"><div bgcolor="#FFFFFF" text="#000000" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote cite="mid:FFC1B85C-A0CA-4735-9D45-86A812A08862@apple.com" type="cite"><pre wrap=""> Other options may need platform specific atoms which may be created with the help of static Writer methods.
</pre></blockquote>We wouldnt be able to override the functionality with each flavor, if we have a static method, or you had thought of something else ?</div></blockquote>I’m not sure when we would want polymorphism. If you wanted it in this case, there could be a method on LinkingContext to create a file of UndefinedAtoms, and ELFLinkingContext could override that method to make weak undefines.</div><div><br></div><div>-Nick</div><div><br></div></body></html>