[Vm-dev] IMPORTANT: GCC 6 generates position independent executables by default on Linux

Ronie Salgado roniesalg at gmail.com
Tue Feb 21 05:23:12 UTC 2017


Correction: this is not because of GCC, but because of Ubuntu 16.10. The
same happens with GCC 5

2017-02-21 0:35 GMT-03:00 Ronie Salgado <roniesalg at gmail.com>:

> Hello,
>
> I was debugging a strange crash when calling sqrt via a Lowcode
> instruction in the interpreter, which I tracked to currentBytecode stored
> in register(EBX), having a very large value. When debugging the generated
> assembly code with GDB, I noticed that GCC was generating position
> independent code and using EBX for doing a call without spilling/unspilling
> its value.
>
> By googling, it seems that position independent executable generation was
> turned on GCC 6 by default ( https://www.open-mesh.org/issues/304 ). To
> disable PIE, we have to compile the sources with -fno-pie and link with the
> -no-pie options.
>
> Best regards,
> Ronie
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20170221/258921fb/attachment.html>


More information about the Vm-dev mailing list