From: Doug Evans <dje@transmeta.com>
To: "Russ.Shaw" <russell@webaxs.net>
Cc: crossgcc@sourceware.cygnus.com
Subject: gcc, crt0, and linker scripts...
Date: Wed, 02 Aug 2000 10:04:00 -0000 [thread overview]
Message-ID: <14728.21640.41984.942659@casey.transmeta.com> (raw)
In-Reply-To: <39880727.84586D00@webaxs.net>
> However, what does gcc use for a linker script? I need to tell
> gcc about my eprom memory map etc.
It uses these:
> /usr/local/h8300-hms/lib/ldscripts/h8300h.x
> h8300h.xbn
> h8300h.xn
> h8300h.xr
> h8300h.xu
> I could get gcc to use my own script using -Wl,T<myscript>, but
> i'll still get linker errors because the output section names
> need to be compatible with the supplied crt0 start-up file.
>
> I can't use my own startup file, because the standard C libraries
> refer to symbols such as _end in crt0.o.
Maybe take the source for newlib's crt0.o
(newlib/libc/sys/h8300hms/crt0.S), and munge it with your crt0.S
to achieve something usable?
When linking, specify your crt0.o and -nostartfiles.
> So what is the 'normal' procedure for configuring a cross-gcc to
> custom hardware?
In general, it's always the same (just as you have already done).
There's no trick (in general) to configuring the gnu tools
for custom hardware. The trick comes at link time.
You need to write your own linker script (and maybe crt0) and
work out the right args to pass to gcc (or ld) when you link.
Keep at it, you're almost there. :-)
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
next prev parent reply other threads:[~2000-08-02 10:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-07-26 6:28 error in building arm-elf gcc Jun Wu
2000-07-26 18:24 ` Joel Sherrill
2000-07-31 21:30 ` How to link in <string.h> object file? Russ.Shaw
2000-08-01 11:19 ` error in building arm-elf gcc Joel Sherrill
2000-08-01 22:49 ` Library and linker errors Russ.Shaw
2000-08-01 23:10 ` Doug Evans
2000-08-02 2:27 ` Russ.Shaw
2000-08-02 9:57 ` Doug Evans
2000-08-02 4:32 ` gcc, crt0, and linker scripts Russ.Shaw
2000-08-02 6:08 ` Russ.Shaw
2000-08-02 10:04 ` Doug Evans [this message]
2000-08-02 16:51 ` Russ.Shaw
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=14728.21640.41984.942659@casey.transmeta.com \
--to=dje@transmeta.com \
--cc=crossgcc@sourceware.cygnus.com \
--cc=russell@webaxs.net \
/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).