linux-mips
[Top] [All Lists]

about gas load_address

To: MAKE FUN PRANK CALLS <linux-mips@linux-mips.org>
Subject: about gas load_address
From: Fuxin Zhang <fxzhang@ict.ac.cn>
Date: Tue, 27 May 2003 17:35:04 +0800
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030206
hi,all

(sorry if it is somewhat out of topic,but i think most mips experts
are here:)

else if (mips_pic == SVR4_PIC && ! mips_big_got)
{
expressionS ex;

/* If this is a reference to an external symbol, we want
lw $reg,<sym>($gp) (BFD_RELOC_MIPS_GOT16)
Otherwise we want
lw $reg,<sym>($gp) (BFD_RELOC_MIPS_GOT16)
nop
QUESTION:
Could somebody tell me why we generate a unconditional 'nop' here?
addiu $reg,$reg,<sym> (BFD_RELOC_LO16)
If there is a constant, it must be added in after.

If we have NewABI, we want
lw $reg,<sym+cst>($gp) (BFD_RELOC_MIPS_GOT_DISP)
unless we're referencing a global symbol with a non-zero
offset, in which case cst must be added separately. */

Thanks in advance.




<Prev in Thread] Current Thread [Next in Thread>