rtems-libbsd: M68K linkcmds Patches Galore

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


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.

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