Motorola Shared BSPs not Linking

Thomas Doerfler Thomas.Doerfler at embedded-brains.de
Fri Apr 20 17:59:57 UTC 2012


Ralf,

when I look at Joels further bug report on

http://sourceware.org/bugzilla/show_bug.cgi?id=13991

and the test case he provided, I can see that the symbol "_rtems_start"
seems to be available in "hello.exe", otherwise the final line

-bash-4.2$ powerpc-rtems4.10-nm -g hello.exe | grep rtems_start
00000000 T __rtems_start

would not report the symbol as content of "hello.exe".

So I doubt that the reported problem is really due to a non-provided
symbol, it looks rather like powerpc-rtems4.11-ld would somehow chew up
the symbol "__rtems_start" and then complain about it being undefined.

Or is ld allowed to remove text symbols located at 0x0000 ?

wkr,

Thomas.


Am 05.04.2012 10:16, schrieb Ralf Corsepius:
> On 04/04/2012 03:34 PM, Ralf Corsepius wrote:
>> On 04/04/2012 02:49 PM, Ralf Corsepius wrote:
>>> On 02/23/2012 05:15 PM, Till Straumann wrote:
>>>>
>>>> My last build of 'master' still linked fine but that's been a while
>>>> (7/2011, I believe).
>>>
>>> FYI: I have narrowed down this breakdown to binutils.
>>>
>>> At least for me, building the mcp750 with gcc-4.6.x or gcc-4.7.0, _both_
>>> fail when using binutils-2.22, but both do _not fail_ when using
>>> binutils-2.20.1.
>>
>> It also works with binutils-2.21.1.
>>
>> => this issue was introduced between 2.21.1 and 2.22.
> FWIW: As far as I can gather is a behavioral change in ld since
> binutils-2.22
> 
> It seems to error out when linkage encounters references to undefined
> symbols in linker scripts. This is unlike binutils < 2.22, which seem to
> have silently ignored them and "set them to 0".
> 
> That said, the patch below fixes this issue for me:
> 
> index a2567a9..3ea50bb 100644
> --- a/c/src/lib/libbsp/powerpc/shared/bootloader/ppcboot.lds
> +++ b/c/src/lib/libbsp/powerpc/shared/bootloader/ppcboot.lds
> @@ -78,6 +78,7 @@ SECTIONS
>    }
>    PROVIDE(_binary_initrd_gz_start = 0);
>    PROVIDE(_binary_initrd_gz_end = 0);
> +  PROVIDE(__rtems_start = 0);
>    _rtems_gz_size = _binary_rtems_gz_end - _binary_rtems_gz_start;
>    _rtems_size = __rtems_end - __rtems_start;
>    .bss :
> 
> Unless somebody objects, I am going to commit it.
> 
> Ralf
> 
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users


-- 
--------------------------------------------
Embedded Brains GmbH
Thomas Doerfler           Obere Lagerstr. 30
D-82178 Puchheim          Germany
email: Thomas.Doerfler at embedded-brains.de
Phone: +49-89-18908079-2
Fax:   +49-89-18908079-9



More information about the users mailing list