[PATCH] Improve and consolidate sparc PIC assembler.

David Miller davem at davemloft.net
Sun Apr 14 00:46:42 CEST 2013


From: Torbjorn Granlund <tg at gmplib.org>
Date: Sat, 13 Apr 2013 23:55:24 +0200

> David Miller <davem at davemloft.net> writes:
> 
>   1) Build:
 ...
> (Very old gcc, tried building a gcc 4.8 cross compiler for
> --target=sparc-sun-solaris10, but it fails to configure.)

That gcc on there is before the gotdata support got added, nevermind.

>   2) Put ctz_table at the end of gcd_1.asm and see if that makes
>      a difference.
> 
> No difference.

Ok, that's a good data point.

Try this, declare the table as:

        .section        ".rodata"
	.type		ctz_table,#object
ctz_table:

Because I'm beginning to suspect that the linker isn't lying to us,
and the assembler is emitting ctz_table in section STT_TLS for some
reason.

And that this has been happening all along.  Perhaps if you don't
declare an object's type it gets some default, and in this case the
default ends up being #tlsobject.

If this is the case, it's simple to deal with this this by simply
using ".type" directive consistently.

I can do all of the grunt work once you confirm this.

Thanks!


More information about the gmp-devel mailing list