Can't get ASSERT() to work in ld script.

Ian Lance Taylor ian@zembu.com
Wed Feb 14 15:32:00 GMT 2001


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



More information about the Binutils mailing list