<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2014-04-24 17:53 GMT+04:00 Rafael EspĂ­ndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span>:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>> Since on Android only PIC code is supported.<br>
> One reason for this is unsupported COPY relocation on Android.<br>
<br>
</div>If only pic code is supported, then every executable is PIE, no? My<br>
understanding is that all that -pie does is<br>
<br>
* Complain if code that is not position independent is found.<br>
* Avoid relaxing PIC code to non PIC.<br>
<br>
Given that the current setup works, it looks like the android linker<br>
has no PIC->non PIC relaxations. In other words, passing -pie should<br>
be a nop and we should always do it.<br>
<br>
Do you see any other difference in the produced binaries when passing -pie?<br></blockquote><div>Also with -pie linker will not create PLT section that is useless for executable.</div><div>Anyway the executable should work regardless of -pie linker option presence.</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Cheers,<br>
Rafael<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Alexey Volkov<div>Intel Corporation</div></div>
</div></div>