Speeding internal GMP calls
Sun, 01 Dec 2002 08:27:57 +1000
Torbjorn Granlund <firstname.lastname@example.org> writes:
> Anybody want to work in improving the GMP build system to
> get rid of the stubs? It requires reading compiler/linker
> docs for some systems, and check libtool's capabilities in
> this area.
On svr4 style x86, ld -Bsymbolic will send internal calls direct to
their target, rather than via the PLT. gcc and maybe some other
compilers have -symbolic to pass that option.
It'd be pretty easy to set that up via configure, and would apply to a
number of other CPUs I imagine (m68k definitely, sparc probably, ...).
Per notes in x86/README, this will still leave a setup of the GOT
register (%ebx), which is unnecessary if all calls are only to
I don't think gcc has a way to be told that certain routines can be
called without the PLT and let it figure out if %ebx is needed,
Compiling objects non-PIC would probably work, but would probably mean
compiling once as PIC to check that all external references were
within libgmp, then recompiling as non-PIC if permitted.