[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] Re: mips64 assembler
From: |
Camm Maguire |
Subject: |
[Gcl-devel] Re: mips64 assembler |
Date: |
Fri, 15 Oct 2010 16:51:16 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Greetings!
David Kuehling <address@hidden> writes:
>>>>>> "Camm" == Camm Maguire <address@hidden> writes:
>
>> Greetings! What is wrong with this stub attempting a jump to contents
>> of register $t0?
>
>> (gdb) p/x *(ul *)address@hidden $3 = {0x3c080077, /*lui t0,0x77*/
>> 0x2508a170, /*addui t0,t0,0xa170*/ 0x8d08a288, /*lw t0,-23928(t0) */
>> 0x1000008 /* jr t0*/ }
>
>> (gdb) c Program received signal SIGTRAP, Trace/breakpoint trap.
>> 0x01094148 in ?? () /*this is the jump instruction*/ (gdb) i reg t0
>> t0: 0x2ae13bf0 /*this is the correct address*/
>
> I don't understand the context of what you're trying to do. But when I
> did some MIPS32 OABI assembly last time, I noticed that calls into
> shared libraries _must_ load the address of the function into t9 before
> doing the jump. Else position-independant code won't work.
> I.e. replace t0 in your stub with t9.
>
Yes, ran into this one too and solved trial and error. Thank you so
much for the reply! Should have read email before experimenting.
Take care,
> BTW why not use gdb's 'disas' command to look at the stub?
>
> David
> --
> GnuPG public key: http://user.cs.tu-berlin.de/~dvdkhlng/dk.gpg
> Fingerprint: B17A DC95 D293 657B 4205 D016 7DEF 5323 C174 7D40
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
- [Gcl-devel] Re: mips64 assembler, Camm Maguire, 2010/10/15
- Message not available
- Message not available
- [Gcl-devel] Re: mips64 assembler,
Camm Maguire <=
- Message not available
- Message not available
- Message not available
- [Gcl-devel] Re: recent SIGBUS/SIGSEGV mips kernel bug, Camm Maguire, 2010/10/25
- Message not available
- Message not available
- [Gcl-devel] gdb for mips64, Camm Maguire, 2010/10/25
- Message not available
- [Gcl-devel] Re: gdb for mips64, Camm Maguire, 2010/10/26
- Re: [Gcl-devel] Re: gdb for mips64, Camm Maguire, 2010/10/26
- Message not available
- Re: [Gcl-devel] Re: gdb for mips64, Camm Maguire, 2010/10/28
- Message not available
- Re: [Gcl-devel] Re: gdb for mips64, Camm Maguire, 2010/10/29