This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
More on %gs:0x0
- From: Amittai Aviram <amittai dot aviram at yale dot edu>
- To: libc-help at sourceware dot org
- Date: Sun, 23 Aug 2009 22:31:26 -0400
- Subject: More on %gs:0x0
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