This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: malloc always returns null
- From: Andrew Haley <aph at redhat dot com>
- To: Ted Phares <tphares at ybad dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sat, 19 Jul 2008 14:11:04 +0100
- Subject: Re: malloc always returns null
- References: <48812B89.1040804@ybad.com>
Ted Phares wrote:
> Hi,
>
> I'm attempting to configure the gcc 4.0.3 tool chain to compile c++
> source on an ARM 9 (ARM926-ejs) target. At this point, everything seems
> to be working except malloc: It always returns the null pointer.
>
> I'm wondering if I've correctly configured my .ld script indicate the
> location and size of the heap. It was put together with a bit of
> guesswork & patching together examples for other targets, since it's not
> clear to me what symbols malloc() relies upon for locating the heap (is
> this documented somewhere?).
>
> Below are the command lines i'm using for compile/assemble/link & the ld
> script. Do they look substantially complete?
Questions like this really need the expertise of the binutils list.
Andrew.