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@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