rtems-libbsd: M68K linkcmds Patches Galore

Joel Sherrill joel.sherrill at OARcorp.com
Fri Aug 17 13:02:45 UTC 2012


On 8/17/2012 3:13 AM, Sebastian Huber wrote:
> On 08/17/2012 02:59 AM, Kevin Polulak wrote:
> [...]
>> diff --git a/c/src/lib/libbsp/m68k/mcf52235/startup/linkcmds b/c/src/lib/libbsp/m68k/mcf52235/startup/linkcmds
>> index f5fe3d0..37b425f 100644
>> --- a/c/src/lib/libbsp/m68k/mcf52235/startup/linkcmds
>> +++ b/c/src/lib/libbsp/m68k/mcf52235/startup/linkcmds
>> @@ -11,11 +11,13 @@
>>     */
>>
>>    /*
>> - * Declare some sizes.
>> + * Memory segment sizes.
>> + *
>> + * A heap size of 0 means that all available memory is used for the heap.
>>     */
>> -RamBase = DEFINED(RamBase) ? RamBase : 0x20000000;
>> -RamSize = DEFINED(RamSize) ? RamSize : 32K;
>> -HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
>> +RamBase    = DEFINED(RamBase)    ? RamBase    : 0x20000000;
>> +RamSize    = DEFINED(RamSize)    ? RamSize    : 32K;
>> +HeapSize   = DEFINED(HeapSize)   ? HeapSize   : 0x0;
>>    _StackSize = DEFINED(_StackSize) ? _StackSize : 0x400;
>>    _FlashBase = DEFINED(_FlashBase) ? _FlashBase : 0x00000000;
> I don't like this format.  Each time you change the length of one field in the
> columns you have to adjust other lines as well.  This makes a review harder.
>
> [...]
>> -        PROVIDE (_fini = .);
>> +
>> +        PROVIDE(_fini = .);
> If you look at the default linker command file (e.g. m68k-rtems4.11-ld
> --verbose) then you will see that the previous format is used here (space
> before "(").
>
> [...]
>> diff --git a/c/src/lib/libbsp/m68k/shared/startup/linkcmds.robsdsets b/c/src/lib/libbsp/m68k/shared/startup/linkcmds.robsdsets
>> new file mode 100644
>> index 0000000..23a1d92
>> --- /dev/null
>> +++ b/c/src/lib/libbsp/m68k/shared/startup/linkcmds.robsdsets
>> @@ -0,0 +1,29 @@
>> +/*
>> + * This file contains directives for the GNU linker which are needed for
>> + * rtems-libbsd FreeBSD code.
>> + *
>> + * COPYRIGHT (c) 1989-1999.
>> + * On-Line Applications Research Corporation (OAR).
>> + *
>> + * The license and distribution terms for this file may be
>> + * found in the file LICENSE in this distribution or at
>> + *http://www.rtems.com/license/LICENSE.e
>> + */
>> +
>> +__start_set_sysctl_set = .;
>> +*(set_sysctl_*);
>> +__stop_set_sysctl_set = .;
>> +*(set_domain_*);
>> +*(set_pseudo_*);
>> +
>> +_bsd__start_set_modmetadata_set = .;
>> +*(_bsd_set_modmetadata_set);
>> +_bsd__stop_set_modmetadata_set = .;
>> +
>> +_bsd__start_set_sysctl_set = .;
>> +*(_bsd_set_sysctl_set);
>> +_bsd__stop_set_sysctl_set = .;
>> +
>> +_bsd__start_set_sysinit_set = .;
>> +*(_bsd_set_sysinit_*);
>> +_bsd__stop_set_sysinit_set = .;
> Why is this linkcmds.robsdsets and not linkcmds.rortems?
>
> 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



-- 
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 mailing list