Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to force gcc use int for system calls, not sysenter?

Tags:

People also ask

What is linking GCC?

Linking is performed when the input file are object files " .o " (instead of source file " . cpp " or " . c "). GCC uses a separate linker program (called ld.exe ) to perform the linking.

Does GCC compile C?

GCC stands for GNU Compiler Collections which is used to compile mainly C and C++ language. It can also be used to compile Objective C and Objective C++.

Can you use GCC on Windows?

Install GCC on Windows To install GCC, click the GCC and G++ package to mark GNU C and C++ compiler for installation. To complete the process, select Apply Changes from the Installation menu in the top-left corner of the mingw-get window.


Is it possible to force gcc use int instruction for all the system calls, but not sysenter? This question may sound strange but I have to compile some projects like Python and Firefox this way.

Summary

Thanks to jbcreix, I've downloaded glibc 2.9 source code, and modified the lines in sysdeps/unix/sysv/linux/i386/sysdep.h, to disable use of sysenter by #undef I386_USE_SYSENTER, and it works.