[uClibc] RE: MIPS _gp

Peter M. Wilcox pmw at techatl.com
Mon Dec 8 12:56:35 UTC 2003


They only way to get _gp I found, was to code something like this:

		bgezal	zero,1f
gp_val:	.word		_gp
1:		lw		gp,(ra)

You can add additional values after _gp as well, but if you
do then the instructions have to be coded with a numeric offset,
i.e. 4(ra), 8(ra), etc...   If you try to use a symbolic offset
the idiot assembler decides that it knows how to get to the item
with a gp relative access.



More information about the uClibc mailing list