Subject: Re: Mozilla on MIPS

From: "H . J . Lu" <[email-masked]>
Date: Thu, 1 Nov 2001 08:51:49 -0800

On Thu, Nov 01, 2001 at 10:54:42AM -0500, Colin Burgess wrote:
> Hi H.J,
> 
> We're hitting the problem with getting Mozilla to run on MIPS (GOT overflow).
> I read the thread on binutils about it, and the gp_overflow manpage of the
> IRIX linker which has the multigot option.
> 
> Do you know of anyone that has successfully linked Mozilla on MIPS with the
> GNU ld?  Is anyone looking into implementing multigot functionality?

I think some platforms use 32bit GOT by default or something like that such
that Mozilla is not a problem. I don't know if it is a good idea for Linux.
As for the -multigot option for ld, I have an impression from the man page
that it is a linker feature and you don't need to modify the compiler. If
it is true, we should investigate the possibility. Unfortunately, I don't
know how -multigot works on mips.

H.J.

---

From: Peter Andersson <[email-masked]>
Date: Fri, 02 Nov 2001 03:04:18 +0100

I have now managed to compile Mozilla on my mips-linux machine but only by 
"cheating". As it turned out when i compiled it with the -Wa,-xgot flags i 
did not get any errors from the mozilla source files. The thing is that, as 
Ryan Murray pointed out, that gcc has to be compiled with the -Wa,-xgot 
flags as well (because of "relocation truncated errors" in crtibeginS.o and 
probably the other .o files included with gcc). I did not manage to compile 
a working version of gcc for some reason.
Also glibc had to be compiled with the same flags (otherwise crti.o 
returned the "relocation" error). Because of my own lack of competence i 
did not manage to pass the -Wa,-xgot arguments automatically during the 
making of the crt*.o-files. I could not find the file used for creating 
those particular files and i could not find them in any makefile. This 
meant that i had to wait for those files to "get made" and then stop the 
compilation and pass the arguments manually to gcc.
These two factors resulted in me "cheating" to get it to compile. I just 
replaced the files from the glibc/gcc rpms (crti.o from glibc and 
crtibeginS.o from gcc) with the ones i had compiled and then i managed to 
compile mozilla without any trouble. This, of course, did not produce a 
working binary but if someone, a bit more knowledgeable about these things 
than i, recompiled gcc and glibc they probably would get it to work...

I hope this will shed some light on the "mozilla problem".

Perhaps i should mention that i got the web browser galeon 
(http://galeon.sourceforge.net/) working using the mozilla libs i compiled...

Peter