[vbox-dev] Virtualbox compiled as PIE/PIC

Knut St. Osmundsen bird at sun.com
Sun Feb 21 11:05:35 PST 2010

On Feb 21, 2010, at 2:52 AM, Dariem Pérez Herrera wrote:

> Hi,
> This is a patch I made trying to solve an issue presented in Gentoo Hardened project. VirtualBox doesn't compile with gcc if PIC/PIE related options are activated. The problem is related to inline asm code trying to use ebx register for passing arguments, but PIC/PIE systems reserve this register for specific functions, so special treatment is required when PIC/PIE is defined (gcc refuses to compile such a code if you don't do it). This may need extensive testing, but it seems to work fine. Please, let me know any problem you encounter. The patch is under MIT license.

Since etherboot ROM code that belongs to the guest side of the operation, I don't think it should be necessary to make it build in PIC or PIE mode. A better fix would be to disable the PIC/PIE options in the makefile.


Kind regards / Mit freundlichen Gruessen / Vennlig hilsen,


Sun Microsystems GmbH        Knut St. Osmundsen
Werkstrasse 24               Senior Staff Engineer, VirtualBox
71384 Weinstadt, Germany     mailto:bird at sun.com

Sitz der Gesellschaft: Sun Microsystems GmbH,
Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Gesch?ftsf?hrer: Thomas Schroeder, Wolfgang Engels
Vorsitzender des Aufsichtsrates: Martin Haering

More information about the vbox-dev mailing list