This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: 32-bit PowerPC sdata linker problem
- From: Alan Modra <amodra at gmail dot com>
- To: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- Cc: binutils at sourceware dot org
- Date: Fri, 6 Jun 2014 21:46:59 +0930
- Subject: Re: 32-bit PowerPC sdata linker problem
- Authentication-results: sourceware.org; auth=none
- References: <53918356 dot 3040102 at embedded-brains dot de> <20140606105420 dot GH5592 at bubble dot grove dot modra dot org> <5391A4BF dot 2030308 at embedded-brains dot de>
On Fri, Jun 06, 2014 at 01:23:43PM +0200, Sebastian Huber wrote:
> On 2014-06-06 12:54, Alan Modra wrote:
> >Hmm, I'm surprised that your git bisect found this patch. Was
> >_SDA_BASE_ set differently before this?
>
> A diff -u map.ok map.error yields:
>
> @@ -6549,10 +6550,11 @@
> 0x0000000000008000 PROVIDE (_SDA_BASE_, 0x8000)
> *(.sdata .sdata.* .gnu.linkonce.s.*)
> .sdata 0x00000000000d7c00 0x0
> /opt/rtems-4.11/lib64/gcc/powerpc-rtems4.11/4.8.3/m603e/ecrti.o
> - 0x00000000000d7c00 _SDA_BASE_
> 0x00000000000d7c00 __SDATA_START__
> .sdata 0x00000000000d7c00 0x4
> /opt/rtems-4.11/lib64/gcc/powerpc-rtems4.11/4.8.3/m603e/crtbegin.o
> 0x00000000000d7c00 __dso_handle
> + 0x00000000000dfc00 _SDA_BASE_
> + .sdata 0x00000000000d7c04 0x0
> /opt/rtems-4.11/lib64/gcc/powerpc-rtems4.11/4.8.3/m603e/crtbegin.o
> .sdata 0x00000000000d7c04 0x4c b-br_uid/init.o
> 0x00000000000d7c0c rtems_shell_Initial_aliases
> 0x00000000000d7c14
> _RTEMS_tasks_Initialize_user_tasks_p
Ah, light dawns. I'm guessing you still have a definition for
_SDA_BASE_ in your linker script, but using PROVIDE. Due to the way I
implemented the automatic define of _SDA_BASE_, PROVIDE in a linker
script won't override the automatic define. That's a bug.
--
Alan Modra
Australia Development Lab, IBM