Karim BELABAS on Tue, 4 Mar 2003 16:51:28 +0100 (MET)

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: linker warning

On Tue, 4 Mar 2003, Bill Allombert wrote:

> On Sun, Mar 02, 2003 at 08:33:01PM +0100, Karim BELABAS wrote:
>> I also have removed some of the code duplication, but didn't dare merging the
>> sparcv7 assembler yet, since I cannot test it.
> You can test it by using Configure --kernel=sparcv7-none.
> > 4) These global symbols are still being defined and included in libpari in
> > case one uses different compilers when compiling the library and applications
> > [ a bad idea, but... ]. It's the level0 kernel's job to define them, and it
> > did that [ without using them, in some cases ].
> Where ? I cannot find them.

In one of the various level0.* files.

> > These symbols were mistakenly redefined in kernel/none/mp.c and
> > kernel/gmp/mp.c.  Hence the linker's warning: two global symbols with the
> > same name had been defined, one through direct assembly with 'as', the other
> > through gcc's compilation of mp.c.
> Maybe i am confused, but what happens with kernel=none ?

In this case, hiremainder and overflow are defined in
src/kernel/none/level0.c, by way of including src/kernel/none/level0.h, with
the right set of #define.

It's a terrible mess. I started to rationalize this by removing the worst
hacks first (sparc). I'm not claiming the current situation is satisfactory.
All the more as it seems I've forgotten a case, and hiremainder may not be
defined [ cf Ilya's and Igor's bug reports ].

Also, sparcv8_super division is currently broken when cc = gcc, because it
accesses an irrelevant global 'hiremainder' variable, I'm working on it.

Karim Belabas                     Tel: (+33) (0)1 69 15 57 48
Dép. de Mathématiques, Bât. 425   Fax: (+33) (0)1 69 15 60 19
Université Paris-Sud              http://www.math.u-psud.fr/~belabas/
F-91405 Orsay (France)            http://www.parigp-home.de/  [PARI/GP]