mips64 gcc 3.3.6 problem
Hi all! I've made a toolchain for mips64el - binutils 2.17.90 + gcc 3.3.6 + glibc 2.3.6. I've successfully compile a linux 2.16.62 kernel and run it in qemu. But when I try to execute dynamically compiled "Hello world" program - I' ve got a SIGSEGV" do_page_fault() #2: sending SIGSEGV to a.out for invalid write access to 0056a7a7 (epc == 00558010, ra == 00557cd0) @@@ do_page_fault Segmentation fault Statically linked executables are running without any problem! If I use gcc 4.1.3 + glibc 2.7 + binutils 2.19 - everything ok. I tried to install binutils 2.19 instead of binutils 2.17 (binutils 2.19, gcc 3.3.6 and glibc 2.3.6) - and dynamically linked programs are running. So, I think it is a compiler problem, isn'it? Does anybody have such problem? Or mips64 platform and gcc 3.3.6 are not compatible? Thanks!
gcc 3.3.6 and multilib
Dear All, I want to use multilib (EL/EB) in mips-unknown-linux-gcc. So when I add some lines to gcc/config/mips/t-mips, it looks like gcc uses multilib. [r...@st1 SPECS]# mips-vniins-linux-gcc -print-multi-lib .; el;@EL But output of mips-unknown-linux-gcc --print-search-dirs and mips-unknown-linux-gcc -mel --print-search-dirs is the same. Patch PR20425 from Alan Modra is for gcc 4.1.0. I've tried to apply this patch to gcc 3.3.6 source tree, but the result was the same. Is there any solution or patches for using multilib in gcc 3.3.6?
Re[2]: gcc 3.3.6 and multilib
Yes, of course. My gcc/config/mips/t-mips file: FPBIT = fp-bit.c DPBIT = dp-bit.c $(T)crti.o: $(srcdir)/config/mips/crti.asm $(GCC_PASSES) $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/mips/crti.asm $(T)crtn.o: $(srcdir)/config/mips/crtn.asm $(GCC_PASSES) $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/mips/crtn.asm MULTILIB_OPTIONS = EB/EL MULTILIB_DIRNAMES = eb el MULTILIB_MATCHES = mel=EL meb=EB EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o crtbeginS.o crtendS.o LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib dp-bit.c: $(srcdir)/config/fp-bit.c echo '#ifdef __MIPSEL__' > dp-bit.c echo '#define FLOAT_BIT_ORDER_MISMATCH' >> dp-bit.c echo '#endif' >> dp-bit.c cat $(srcdir)/config/fp-bit.c >> dp-bit.c fp-bit.c: $(srcdir)/config/fp-bit.c echo '#define FLOAT' > fp-bit.c echo '#ifdef __MIPSEL__' >> fp-bit.c echo '#define FLOAT_BIT_ORDER_MISMATCH' >> fp-bit.c echo '#endif' >> fp-bit.c cat $(srcdir)/config/fp-bit.c >> fp-bit.c
Re: gcc 3.3.6 and multilib
The problem was not in the patch, which I've applied. Patch is good. The problem was in t-mips config file. Now I have a gcc 3.3.6 compiler working with multilib correctly. Thanks