[eresi-dev] Welcome to Eduardo + GOT[] question
Julien Vanegue
julien.vanegue at gmail.com
Wed Sep 2 07:08:11 UTC 2009
As I said, _GLOBAL_OFFSET_TABLE is not a variable but a symbol. The value of
the symbol doesnt change in runtime...
On Tue, Sep 1, 2009 at 11:49 PM, machi at0 <camoroz0 at gmail.com> wrote:
> Julien,
>
> thanks for your quick reply.
> Actually, I am doing the following:
>
> ************************************************************
> > cat test.c
> int main(void)
> {
> __asm__ __volatile__("int3");
> }
>
> > gcc -o test test.c -g
>
> > gdb test
> (gdb) x &_GLOBAL_OFFSET_TABLE_
> 0x6007e0 <_GLOBAL_OFFSET_TABLE_>: 0x00600638 <------------- OK
> (gdb) r
> Starting program: /tmp/test
>
> Program received signal SIGTRAP, Trace/breakpoint trap.
> main () at test.c:4
> 4 }
> (gdb) x &_GLOBAL_OFFSET_TABLE_
> 0x21cf80: Cannot access memory at address 0x21cf80 <------------- ??
> (gdb) x _GLOBAL_OFFSET_TABLE_
> Cannot access memory at address 0x21cf80
> ************************************************************
>
>
>
> Sounds like the GOT address is changing somehow. I haven't more
> investigated on that yet.
>
> c0
>
>
> On Tue, Sep 1, 2009 at 5:57 PM, Julien Vanegue <julien.vanegue at gmail.com>wrote:
>
>> The _GLOBAL_OFFSET_TABLE is not a variable but a symbol. It points on the
>> .got section. The address you mention is really strange, it looks like a
>> relative address. Maybe you were looking at a .so file ? In that case, all
>> addresses are relative and the base will be added at runtime, once the
>> loader decided where the library will be mapped.
>>
>> Julien
>>
>> On Tue, Sep 1, 2009 at 3:09 AM, machi at0 <camoroz0 at gmail.com> wrote:
>>
>>> Hi guys,
>>>
>>> I'll profit of this email to welcome Eduardo.
>>>
>>> When I was hacking around with the GOT, I noticed that the
>>> _GLOBAL_OFFSET_TABLE_ variable takes a fancy value in runtime (Something
>>> like 0x1cef8). Is that normal or has it been added for security reasons ?
>>>
>>> Thanks,
>>>
>>> c0
>>>
>>> _______________________________________________
>>> eresi-dev mailing list
>>> eresi-dev at lists.einherjar.de
>>> http://lists.einherjar.de/mailman/listinfo/eresi-dev
>>>
>>>
>>
>> _______________________________________________
>> eresi-dev mailing list
>> eresi-dev at lists.einherjar.de
>> http://lists.einherjar.de/mailman/listinfo/eresi-dev
>>
>>
>
> _______________________________________________
> eresi-dev mailing list
> eresi-dev at lists.einherjar.de
> http://lists.einherjar.de/mailman/listinfo/eresi-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.einherjar.de/pipermail/eresi-dev/attachments/20090902/f26ab2fd/attachment.html>
More information about the eresi-dev
mailing list