rtems-libbsd: M68K linkcmds Patches Galore
joel.sherrill at OARcorp.com
Fri Aug 17 14:38:02 UTC 2012
On 08/17/2012 08:23 AM, Sebastian Huber wrote:
> 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
>> 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
> #define CPU_LINKER_SYMBOL_NAME(_x) _x
The C compiler automatically prepends the _. These are more useful
in assembly where you need to follow what the compiler does implicitly.
> Even if we deal with the underscore in the linker command files, then I see
> only two variants and not one for each CPU.
Or one variant which provides both versions of the symbol.
> Is this underscore a GNU linker feature or defined in the ABI?
ABI as Ralf points out.
Joel Sherrill, Ph.D. Director of Research& Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the devel