rtems-libbsd: M68K linkcmds Patches Galore

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Aug 17 13:23:40 UTC 2012


On 08/17/2012 03:02 PM, Joel Sherrill wrote:
>>
>> Why do we have CPU specific variants of this?  On ARM, PowerPC, etc. this file
>> would look like identical.
> Some targets place a leading underscore in front of symbols. If you have every
> symbol both with and without an extra _ prepended, then it will be Ok. For
> example,
> both _bsd__stop_set_sysinit_set and __bsd__stop_set_sysinit_set would have
> to be defined.
>
> This is all the targets I have tools installed for and whether or not they add a
> leading underscore.
>
>         arm-rtems4.11 - no leading underscore
>         avr-rtems4.11 - no leading underscore
>        bfin-rtems4.11 - leading underscore
>       h8300-rtems4.11 - leading underscore
>        i386-rtems4.11 - no leading underscore
>        lm32-rtems4.11 - no leading underscore
>        m32c-rtems4.11 - leading underscore
>        m32r-rtems4.11 - no leading underscore
>        m68k-rtems4.11 - no leading underscore
> microblaze-rtems4.11 - no leading underscore
>        mips-rtems4.11 - no leading underscore
>     powerpc-rtems4.11 - no leading underscore
>          sh-rtems4.11 - leading underscore
>     sparc64-rtems4.11 - no leading underscore
>       sparc-rtems4.11 - no leading underscore
>        v850-rtems4.11 - leading underscore

With this extra underscore can be dealt in the macros that generate these symbols.

The CPU port should provide a macro like

#define CPU_LINKER_SYMBOL_NAME(_x) _ ## _x

or

#define CPU_LINKER_SYMBOL_NAME(_x) _x

Even if we deal with the underscore in the linker command files, then I see 
only two variants and not one for each CPU.

Is this underscore a GNU linker feature or defined in the ABI?

-- 
Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.





More information about the devel mailing list