<div dir="ltr">I believe GNU linker prints out "relocations against text section; recomiple with -fPIC" warning if the linker is creating a DSO. Does it warn on text relocations if no -shared is given?</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 22, 2017 at 1:06 PM, George Rimar <span dir="ltr"><<a href="mailto:grimar@accesssoftek.com" target="_blank">grimar@accesssoftek.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr" style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif"><span class="">
<p><span style="color:rgb(33,33,33);font-size:12pt">></span><span style="color:rgb(33,33,33);font-size:12pt">Refused to link a DSO if it contains text relocations is probably too restrictive, even though we are doing that today. DSOs with >text
 relocations are bad but not technically incorrect.</span><br>
</p>
<p><span style="color:rgb(33,33,33);font-size:12pt"><br>
</span></p>
</span><p><span style="color:rgb(33,33,33);font-size:12pt">FWIW, ld.bfd 2.27 I have has next options:</span></p>
<p><span style="color:rgb(33,33,33);font-size:12pt"><br>
</span></p>
<div>  -z text                     Treat DT_TEXTREL in shared object as error</div>
<div>  -z notext                 Don't treat DT_TEXTREL in shared object as error</div>
<div>  -z textoff                 Don't treat DT_TEXTREL in shared object as error<br>
</div>
<div><br>
</div>
<div><a href="https://sourceware.org/bugzilla/show_bug.cgi?id=13469" target="_blank">https://sourceware.org/<wbr>bugzilla/show_bug.cgi?id=13469</a><br>
</div>
<div>
<div><span style="color:rgb(0,0,238);font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;background-color:rgb(255,255,255);text-decoration:underline"><a href="https://sourceware.org/bugzilla/attachment.cgi?id=5966&action=diff" target="_blank">https://sourceware.org/<wbr>bugzilla/attachment.cgi?id=<wbr>5966&action=diff</a></span><br>
​<br>
</div>
May be we should implement them then.<span class="HOEnZb"><font color="#888888"><br>
</font></span></div><span class="HOEnZb"><font color="#888888">
<div><br>
</div>
<div>George.<br>
</div>
<p><span style="color:rgb(33,33,33);font-size:12pt"><br>
</span></p>
</font></span></div>

</blockquote></div><br></div>