Code organisation of mini-gmp

Richard Henderson rth at
Mon Sep 10 14:14:40 CEST 2012

On 2012-09-10 04:20, Torbjorn Granlund wrote:
> Now, users have some choices:
> (1) #include mini-gmp.c and surely disable any incremental linking
> (2) Compile mini-gmp.c into a separate object mini-gmp.o, to perhaps
>     get incremental linking on some systems
> (3) Link to mini-gmp.a and get incremental linking everywhere.

(4) Compile mini-gmp.c with -ffunction-sections and link with -Wl,--gc-sections.

(5) Mark all of mini-gmp.c functions with __attribute__((visibility("hidden")))
and compile+link with -flto.


More information about the gmp-devel mailing list