More on %gs:0x0
Amittai Aviram
amittai.aviram@yale.edu
Mon Aug 24 02:31:00 GMT 2009
Here is a follow-up to my previous query. My question remains this:
how do values get into %gs:0x0? Suppose I have a simple C program
called prog, with source prog.c. Suppose I perform the following steps:
gcc -Wall -static -o prog prog.c
objdump -D prog > prog_obj.txt
grep "%gs:0x0" prog_obj.txt | more
The final step will show me zillions of instances of moving data from
location %gs:0x0 to a general purpose register, but not a single
instance of moving data _into_ location %gs:0x0. How does anything
except 0 ever get into %gs:0x0? This is a glibc question because all
the routines that have these instructions and depend on them are glibc
routines. Thanks!
Amittai Aviram
Graduate Student in Computer Science
Yale University
646 483 2639
amittai.aviram@yale.edu
http://www.amittai.com
More information about the Libc-help
mailing list