[PATCH] Fix 64-bit T3 invert_limb.asm on PIC again.
David Miller
davem at davemloft.net
Mon Apr 15 22:22:16 CEST 2013
Some of this stuff doesn't work, for example, from invert_limb.asm:
+ rd %pc, %g3
+ sethi %hi(_GLOBAL_OFFSET_TABLE_+4), %g4
+ add %g4, %lo(_GLOBAL_OFFSET_TABLE_+8), %g4
+ add %g3, %g4, %g4
sethi %hi(approx_tab-512), %g2
or %g2, %lo(approx_tab-512), %g2
+ ldx [%g4+%g2], %g2
You can't use "approx_tab-512", you're addressing the GOT slot
of the resolved address, not the address itself.
That's why my fix used:
sethi %hi(approx_tab), %g2
or %g2, %lo(approx_tab), %g2
ldx [%g4+%g2], %g2
sub %g2, 512, %g2
More information about the gmp-devel
mailing list