I am working some binary code analysis and reverse engineering task on x86 32-bit Ubuntu 14.04. I am using g++ 4.8.4 to compile the C++ program.
I am wondering whether it is possible to prevent compiler from using segment registers. For example, gs.
An example of the usage is like below:
mov %gs:0x8,%ebx
I am aware that some segment registers are used for stack canary checking. However, even if I have disabled such checking (-fno-stack-protector), still, there are quite a lot of usages for segment registers...