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

Ronie Salgado roniesalg at gmail.com
Tue Feb 21 03:35:09 UTC 2017


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/de47322b/attachment.html>


More information about the Vm-dev mailing list