Why does this memory address %fs:0x28 ( fs[0x28] ) have a random value?

后端 未结 3 1098
暖寄归人
暖寄归人 2020-12-02 10:56

I\'ve written a piece of C code and I\'ve disassembled it as well as read the registers to understand how the program works in assembly.

int test(char *this)         


        
3条回答
  •  时光说笑
    2020-12-02 11:18

    Looking at http://www.imada.sdu.dk/Courses/DM18/Litteratur/IntelnATT.htm, I think %fs:28 is actually an offset of 28 bytes from the address in %fs. So I think it's loading a full register size from location %fs + 28 into %rax.

提交回复
热议问题