This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]