This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Can't get ASSERT() to work in ld script.
- To: Grant Edwards <grante at visi dot com>
- Subject: Re: Can't get ASSERT() to work in ld script.
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 14 Feb 2001 15:31:39 -0800
- Cc: binutils at sources dot redhat dot com
- References: <20010214165541.B13983@visi.com>
Grant Edwards <grante@visi.com> writes:
> I've spend hours trying to get a simple ASSSERT() statement to
> work in a linker script.
>
> I've tried every variation of ASSERT() syntax I can think of
> and all of them generate parse errors.
>
> Can somebody point me to an example link script with an ASSERT?
>
> $ arm-elf-ld --version
> GNU ld 2.10
> [...]
> Supported emulations:
> armelf
Something like this works for me:
. = ASSERT ( 0, error );
It always helps to give an example of what doesn't work.
Ian