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

Holger Freyther holger at freyther.de
Wed Feb 22 01:35:32 UTC 2017


> On 21 Feb 2017, at 10:35, Ronie Salgado <roniesalg at gmail.com> wrote:
> 
> 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.

Can you elaborate on the misbehavior? As of the ABI[1] EBX is a local register, can GCC know that EBX has been used for something else?

holger

[1] http://www.sco.com/developers/devspecs/abi386-4.pdf


More information about the Vm-dev mailing list