<div dir="ltr">On 11 September 2013 11:25, Robinson, Paul <span dir="ltr"><<a href="mailto:Paul_Robinson@playstation.sony.com" target="_blank">Paul_Robinson@playstation.sony.com</a>></span> wrote:<br><div class="gmail_extra">

<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">My linker guys say that visibility and dllimport/dllexport are orthogonal, therefore I conclude that dllimport/dllexport should not be modeled as visibility
 values.  It may be that some combinations of visibility and import/export don't make sense, but that doesn't mean you have to make it syntactically impossible to express them.  (That's what semantic checking is for.)<u></u><u></u></span></p>


<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">My linker guys are also agitating to make –fvisibility=hidden the default for our platform, which caused me to double-take at the thought of dllexport'ing a
 hidden symbol but they say it is a reasonable thing to do.  We already default to –fPIC so we'd get a bit of a win by defaulting to –fvisibility=hidden as well (references to hidden symbols don't have to go through the GOT).  I'm not saying we want it to be
 the default for everybody, but rather it should be target-specific.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I think this was settled previously in the thread but I thought I'd chime in that we use dllimport/dllexport and we are an ELF/non-Windows target.</span></p>

</div></div></blockquote><div><br></div><div>Could you explain what it means to use dllimport and dllexport on an ELF target?</div><div><br></div><div>Nick</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:llvm-commits-bounces@cs.uiuc.edu" target="_blank">llvm-commits-bounces@cs.uiuc.edu</a> [mailto:<a href="mailto:llvm-commits-bounces@cs.uiuc.edu" target="_blank">llvm-commits-bounces@cs.uiuc.edu</a>]
<b>On Behalf Of </b>Reid Kleckner<br>
<b>Sent:</b> Wednesday, September 11, 2013 9:24 AM<br>
<b>To:</b> Nico Rieck; Chandler Carruth<br>
<b>Cc:</b> <a href="mailto:reviews%2BD1110%2Bpublic%2B872068f434b7231c@llvm-reviews.chandlerc.com" target="_blank">reviews+D1110+public+872068f434b7231c@llvm-reviews.chandlerc.com</a>; llvm-commits</span></p><div class="im">

<br>
<b>Subject:</b> Re: [PATCH] Change representation of dllexport/dllimport<u></u><u></u></div><p></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Wed, Sep 11, 2013 at 11:38 AM, Nico Rieck <<a href="mailto:nico.rieck@gmail.com" target="_blank">nico.rieck@gmail.com</a>> wrote:<u></u><u></u></p><div><div class="h5">
<div>
<div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">On 09.09.2013 18:36, Reid Kleckner wrote:<u></u><u></u></p>
<p class="MsoNormal">How's this patch doing?  It's come up on the mailing lists a few times, so I thought I'd ping. :)<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">I guess it's mainly lacking more feedback about which variant to pursue. As reasoned before, I don't really like conflating the term "visibility" with dllimport (it would also require making -fvisibility=hidden the default). But opinions
 on this have been very scarce.<u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">As for opinions, everyone I talked to locally felt that if the export controls can't be combined with visibility, then there's no reason to make the invalid combinations representable in IR.  Maybe they'll chime in.<u></u><u></u></p>


</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I don't see a need to make -fvisibility=hidden the default, either.  I don't want to use the same enum for default visibility and dllexport.  It seems to me that default visibility should be the platform default visibility when linking
 DSOs, and dllexport should force a symbol into .drectve and possibly into .dynsym for ELF, if that's representable in a .o file.<u></u><u></u></p>
</div>
</div></div></div>
</div>
</div>
</div>

<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div></div>