linker script symbol reference

DJ Delorie dj@redhat.com
Tue Apr 3 17:56:00 GMT 2007


Constantine Kousoulos <wuwei@freemail.gr> writes:
> line 1: extern int _data, _edata;

You'll find it more portable to define these like this:

extern char _data[];
extern char _edata[];

This prevents the compiler from treating them like optimizable short
symbols.  MIPS, for example, stores small data in the .sdata segment,
and addresses it differently.



More information about the Binutils mailing list