32-bit PowerPC sdata linker problem

Alan Modra amodra@gmail.com
Fri Jun 6 12:17:00 GMT 2014


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



More information about the Binutils mailing list