public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Doug Evans <dje@transmeta.com>
To: Stephane Dalton <Stephane.Dalton@abl.ca>
Cc: crossgcc@sourceware.cygnus.com
Subject: sbrk undefined symbol
Date: Sat, 01 Apr 2000 00:00:00 -0000	[thread overview]
Message-ID: <14513.37899.796422.56073@casey.transmeta.com> (raw)
In-Reply-To: <C5B7AD50B789D31191B400805F9F52CB17C501@exchange1.abl.ca>

Stephane Dalton writes:
 > I've a simple question for you, I've successfully build a m68k-psos-elf
 > compiler and library (binutils 2.9.1, gcc-2.95.2, and newlib 1.8.2), and
 > I've been able to compile assemble and link my new bootloader for our board.
 > 
 > Today I've added a #include <assert.h> inside on of the file and now at link
 > time I got these error messages:

Loosely phrased [the details aren't important]:
assert() calls fprintf, fprintf calls malloc, malloc calls sbrk.

 > ent/sbrkr.c:61: undefined reference to `sbrk'

 > I've encountered this kind of error before (for different type of function)
 > and the FAQ simply told to stub out these. Should I do the same here. I'm a
 > bit worry to see sbrk here because as far as I know it is used for memory
 > allocation???

sbrk is a function you have to write yourself.
See for example newlib-1.8.2/libgloss/mcore/sbrk.c.

An alternative is to roll your own assert() and avoid this.

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

  reply	other threads:[~2000-04-01  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-01  0:00 Stephane Dalton
2000-04-01  0:00 ` Doug Evans [this message]
2000-04-01  0:00 ` Aaron J. Grier

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=14513.37899.796422.56073@casey.transmeta.com \
    --to=dje@transmeta.com \
    --cc=Stephane.Dalton@abl.ca \
    --cc=crossgcc@sourceware.cygnus.com \
    /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).