This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: linker script symbol reference


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]