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: COMMON symbols get overridden by PROVIDE commands?


On Thu, Dec 18, 2014 at 04:31:27PM +0800, Tony Beta Lambda wrote:
> Hi,
> 
> The default linker script PROVIDEs the symbol end, but this replaces
> the symbol defined in COMMON section and causes error.  (ld version
> 2.24 on Linux 3.16.0 x86_64)
> 
> Example C code:
> 
>   int end[100000];
>   int main(void) { end[99999] = 0; return 0; }

PROVIDE has overridden common symbols right from the initial support
added 20 years ago, commit 31ddb156.  Ian, is there a good reason for
this ld behaviour?

-- 
Alan Modra
Australia Development Lab, IBM


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