This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: linker script symbol reference
- From: DJ Delorie <dj at redhat dot com>
- To: Constantine Kousoulos <wuwei at freemail dot gr>
- Cc: binutils at sourceware dot org
- Date: 03 Apr 2007 13:55:46 -0400
- Subject: Re: linker script symbol reference
- References: <46120711.5000608@freemail.gr>
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.