Fix 197259  Unsupported arch_prtctl PR_SET_GS option

On amd64, We handle GS similar to FS, i.e. consider it is constant.
Note that FS is not always 0 on linux. It looks rather to be constant
in all threads, and is zero in the main thread.
As values for FS and/or GS differs between platforms (linux or darwin),
FS_CONST and GS_CONST are used.

Note that we cannot easily test that the value of GS or FS is the
expected one, as the value might not be set at the begin of execution
but only set after prctl has been executed.

So, we just hope that effectively GS and FS are constant.
Some trials to set GS to other values that the expected
constant value on linux was causing a SEGV.
So, it looks like this is all effectively protected.

In summary: we were counting somewhat on the luck for FS,
we now similarly count on luch for GS



git-svn-id: svn://svn.valgrind.org/vex/trunk@3043 8f6e269a-dfd6-0310-a8e1-e2731360e62c
5 files changed