public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Mahadev Cholachagudda" <mahadev_kc@yahoo.com>
To: "Marcio de Oliveira Buss" <ra990898@ic.unicamp.br>
Cc: <gcc-help@gcc.gnu.org>
Subject: Re: Another crash trying to build gcc as cross compiler
Date: Wed, 16 Aug 2000 21:11:00 -0000	[thread overview]
Message-ID: <002c01c00801$5a95cc50$4d0100c8@mahadev.vsnl.net.in> (raw)

For the similar problem, what i did was to write a linker scripts. U can
find these linker scripts in mips-elf directory.

For '__stack' problem, if you are using linker script, you need to enter as
below.

__stack = <end of ram address >. If the stack grows downword.


For 'hardware_init_hook' problems, you need to provide as below.

PROVIDE (hardware_init_hook = 0);
PROVIDE (_hardware_init_hook = 0);
PROVIDE (software_init_hook = 0);
PROVIDE (_software_init_hook = 0);

above statements should be entered into the linker script.

For other problems, u should link with the library files such as libc.a,
libg.a, libm.a etc.


Hope this would help u
with regards
mahadev

>
> Ok, I have discovered the problem. I have to build
> things in this order in order everything works fine:
>
> cd ......./src/libiberty
> make
> cd ......./src/bfd
> make
> cd ......./src/opcodes
> make
> cd ......./src/binutils
> make
> cd ......./gcc
> make
>
>
> And finally I get the compiler!
>
> But now, an error has been occuring when I am trying
> to use the cross-compiler.
> The error message I received every time I invoke the
> compiler is below:
>
>
>[mbuss@moderno]:$ mips-elf-gcc -b mips-elf -mcpu=r3000 -o
>test1 test1.c -I
>
>
>/home/mbuss/Compilers/GCC/gcc-mips/usr/local/lib/gcc-lib/mips-elf/
>2.96/../../../../mips-elf/lib/crt0.o:
>In function `zerobss':
>crt0.S:132: undefined reference to `get_mem_info'
>crt0.S:136: undefined reference to `__stack'
>crt0.S:136: undefined reference to `__stack'
>/home/mbuss/Compilers/GCC/gcc-mips/usr/local/lib/gcc-lib/mips-elf/
>2.96/../../../../mips-elf/lib/crt0.o:
>In function `init':
>crt0.S:172: undefined reference to `hardware_init_hook'
>crt0.S:172: undefined reference to `hardware_init_hook'
>crt0.S:178: undefined reference to `software_init_hook'
>crt0.S:178: undefined reference to `software_init_hook'
>crt0.S:185: undefined reference to `atexit'
>crt0.S:202: undefined reference to `exit'
>/home/mbuss/Compilers/GCC/gcc-mips/usr/local/lib/gcc-lib/mips-elf/
>2.96/libgcc.a(__main.o):
>In function `no symbol':
>/home/mbuss/Compilers/GCC/sources/Gnu/gcc/gcc/./libgcc2.c(.text+0x130):
>undefined reference to `atexit'
>/home/mbuss/Compilers/GCC/gcc-mips/usr/local/lib/gcc-lib/mips-elf/
>2.96/libgcc.a(frame-dwarf2.o):
>In function `no symbol':
>/home/mbuss/Compilers/GCC/sources/Gnu/gcc/gcc/./frame-dwarf2.c(.text+0x1c4)
:
>undefined reference to `abort'
>/home/mbuss/Compilers/GCC/sources/Gnu/gcc/gcc/./frame-dwarf2.c(.text+0x328)
:
>undefined reference to `abort'
>/home/mbuss/Compilers/GCC/sources/Gnu/gcc/gcc/./frame-dwarf2.c(.text+0x534)
:
>undefined reference to `free'
>/home/mbuss/Compilers/GCC/gcc-mips/usr/local/lib/gcc-lib/mips-elf/
>2.96/libgcc.a(frame-dwarf2.o):
>In function `__register_frame':
>/home/mbuss/Compilers/GCC/sources/Gnu/gcc/gcc/./frame-dwarf2.c(.text+0x788)
:
>undefined reference to `malloc'
>/home/mbuss/Compilers/GCC/gcc-mips/usr/local/lib/gcc-lib/mips-elf/2.96/libg
cc.a(frame-dwarf2.o):
>In function `__register_frame_table':
>/home/mbuss/Compilers/GCC/sources/Gnu/gcc/gcc/./frame-dwarf2.c(.text+0x7e8)
:
>undefined reference to `malloc'
>/home/mbuss/Compilers/GCC/gcc-mips/usr/local/lib/gcc-lib/mips-elf/2.96/libg
cc.a(frame-dwarf2.o):
>In function `__deregister_frame_info':
>/home/mbuss/Compilers/GCC/sources/Gnu/gcc/gcc/./frame-dwarf2.c(.text+0x85c)
:
>undefined reference to `free'
>/home/mbuss/Compilers/GCC/sources/Gnu/gcc/gcc/./frame-dwarf2.c(.text+0x88c)
:
>undefined reference to `abort'
>/home/mbuss/Compilers/GCC/gcc-mips/usr/local/lib/gcc-lib/mips-elf/2.96/libg
cc.a(frame-dwarf2.o):
>In function `__deregister_frame':
>/home/mbuss/Compilers/GCC/sources/Gnu/gcc/gcc/./frame-dwarf2.c(.text+0x8a4)
:
>undefined reference to `free'
>/home/mbuss/Compilers/GCC/gcc-mips/usr/local/lib/gcc-lib/mips-elf/2.96/libg
cc.a(frame-dwarf2.o):
>In function `frame_init':
>/home/mbuss/Compilers/GCC/sources/Gnu/gcc/gcc/./frame-dwarf2.c(.text+0xac4)
:
>undefined reference to `malloc'
>/home/mbuss/Compilers/GCC/sources/Gnu/gcc/gcc/./frame-dwarf2.c(.text+0xae8)
:
>undefined reference to `malloc'
>/home/mbuss/Compilers/GCC/gcc-mips/usr/local/lib/gcc-lib/mips-elf/2.96/libg
cc.a(frame-dwarf2.o):
>In function `extract_cie_info':
>/home/mbuss/Compilers/GCC/sources/Gnu/gcc/gcc/./frame-dwarf2.c(.text+0xd94)
:
>undefined reference to `strcmp'
>/home/mbuss/Compilers/GCC/sources/Gnu/gcc/gcc/./frame-dwarf2.c(.text+0xda8)
:
>undefined reference to `strcmp'
>/home/mbuss/Compilers/GCC/sources/Gnu/gcc/gcc/./frame-dwarf2.c(.text+0xdd4)
:
>undefined reference to `strlen'
>/home/mbuss/Compilers/GCC/sources/Gnu/gcc/gcc/./frame-dwarf2.c(.text+0xde8)
:
>undefined reference to `strcmp'
>/home/mbuss/Compilers/GCC/gcc-mips/usr/local/lib/gcc-lib/mips-elf/2.96/libg
cc.a(frame-dwarf2.o):
>In function `decode_stack_op':
>/home/mbuss/Compilers/GCC/sources/Gnu/gcc/gcc/./frame-dwarf2.c:480:
>undefined reference to `abort'
>/home/mbuss/Compilers/GCC/gcc-mips/usr/local/lib/gcc-lib/mips-elf/2.96/libg
cc.a(frame-dwarf2.o):
>In function `execute_cfa_insn':
>/home/mbuss/Compilers/GCC/sources/Gnu/gcc/gcc/./frame-dwarf2.c:609:
>undefined reference to `malloc'
>/home/mbuss/Compilers/GCC/sources/Gnu/gcc/gcc/./frame-dwarf2.c:609:
>undefined reference to `free'
>/home/mbuss/Compilers/GCC/sources/Gnu/gcc/gcc/./frame-dwarf2.c:609:
>undefined reference to `abort'
>/home/mbuss/Compilers/GCC/gcc-mips/usr/local/lib/gcc-lib/mips-elf/2.96/libg
cc.a(frame-dwarf2.o):
>In function `__frame_state_for':
>/home/mbuss/Compilers/GCC/sources/Gnu/gcc/gcc/./frame-dwarf2.c:609:
>undefined reference to `memset'
>collect2: ld returned 1 exit status
>
>
>
> Could someone please help me?
>
> Thanks.
>
> M.Buss.
>
>
>


__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

             reply	other threads:[~2000-08-16 21:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-16 21:11 Mahadev Cholachagudda [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-08-16 16:13 Marcio de Oliveira Buss
2000-08-16 18:10 ` Marcio de Oliveira Buss
2000-08-16 18:59   ` Alexandre Oliva
2000-08-17 10:52     ` Marcio de Oliveira Buss
2000-08-17 11:06       ` Alexandre Oliva

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='002c01c00801$5a95cc50$4d0100c8@mahadev.vsnl.net.in' \
    --to=mahadev_kc@yahoo.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=ra990898@ic.unicamp.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).