[PATCH 6/7] Renamed linker script templates in BBB port to match BBB target

Jarielle Catbagan jcatbagan93 at gmail.com
Mon Jun 22 15:38:07 UTC 2015


Ed,

Take your time.  I can make modifications/improvements anytime to the
patches I previously submitted should there be any discrepancies.  In
the meantime, I will continue pushing any changes I make to my github
and will be submitting patches once the changes are ready for review.

On Mon, Jun 22, 2015 at 6:39 AM, Ed Sutter <ed.sutter at alcatel-lucent.com> wrote:
> My original goal with this was to keep the linker file extremely simple.
> The core umon does not even support writeable initialized data; because that
> used to be a mess to coordinate when trying to build with different toolsets
> (cross compilers).
>
> To allow the user to avoid touching the linker file, the makefile is able to
> modify
> the key base addresses in the system at build time; hence the use of a
> template
> (*.ldt) linker file to create the actual linker file.
>
> As you've heard me say in the past, much of this is historical back when I
> was trying to support
> several different cross compilers each with their own set of quirks in
> linker language and
> libraries.  Most of this is history, so I'm certainly open to adjust this
> moving forward.
>
> I suggest we just get over this first hump (BBB port) and then we can step
> back and
> adjust some of that stuff.
> Jarielle, I apologize for my slow-response on the patches.  I should be able
> to start looking
> through them tonight.
>
>
>> With all this copy-and-paste, you might want to investigate how to
>> share linker script pieces via include directive. This has been done
>> on RTEMS for the ARM targets, see rtems/c/src/lib/libbsp/arm/startup
>>
>> On Fri, Jun 19, 2015 at 5:32 PM, Jarielle Catbagan
>> <jcatbagan93 at gmail.com> wrote:
>>>
>>> * Renamed CSB740_boot.ldt -> BEAGLEBONEBLACK_boot.ldt
>>> * Renamed CSB740_ramtst.ldt -> BEAGLEBONEBLACK_ramtst.ldt
>>> ---
>>>   ports/beagleboneblack/BEAGLEBONEBLACK_boot.ldt   | 63
>>> ++++++++++++++++++++++++
>>>   ports/beagleboneblack/BEAGLEBONEBLACK_ramtst.ldt | 59
>>> ++++++++++++++++++++++
>>>   ports/beagleboneblack/CSB740_boot.ldt            | 63
>>> ------------------------
>>>   ports/beagleboneblack/CSB740_ramtst.ldt          | 59
>>> ----------------------
>>>   4 files changed, 122 insertions(+), 122 deletions(-)
>>>   create mode 100644 ports/beagleboneblack/BEAGLEBONEBLACK_boot.ldt
>>>   create mode 100644 ports/beagleboneblack/BEAGLEBONEBLACK_ramtst.ldt
>>>   delete mode 100644 ports/beagleboneblack/CSB740_boot.ldt
>>>   delete mode 100644 ports/beagleboneblack/CSB740_ramtst.ldt
>>>
>>> diff --git a/ports/beagleboneblack/BEAGLEBONEBLACK_boot.ldt
>>> b/ports/beagleboneblack/BEAGLEBONEBLACK_boot.ldt
>>> new file mode 100644
>>> index 0000000..c8bc089
>>> --- /dev/null
>>> +++ b/ports/beagleboneblack/BEAGLEBONEBLACK_boot.ldt
>>> @@ -0,0 +1,63 @@
>>> +/* CSB740_boot.ld:
>>> + * This is the memory map file used for the boot-flash based version
>>> + * of MicroMonitor.  The only value that should be considered adjustable
>>> + * here is the base address of the 'dram' memory block.
>>> + *
>>> + */
>>> +MEMORY
>>> +{
>>> +       rom :   org = ROMBASE,  len = ROMLEN
>>> +       dram :  org = DRAMBASE, len = DRAMLEN
>>> +}
>>> +
>>> +SECTIONS
>>> +{
>>> +       .text   :
>>> +       {
>>> +               boot_base = .;
>>> +               rom_reset.o(.text)
>>> +               *(.glue_7t)
>>> +               *(.glue_7)
>>> +       } >rom
>>> +
>>> +       .data   :
>>> +       {
>>> +               *(.data)
>>> +       } >rom
>>> +
>>> +       .sdata  :
>>> +       {
>>> +               *(.sdata)
>>> +       } >rom
>>> +
>>> +       .sdata2 :
>>> +       {
>>> +               *(.sdata2)
>>> +       } >rom
>>> +
>>> +       .rodata :
>>> +       {
>>> +               *(.rodata)
>>> +               *(.rodata.str1.4)
>>> +       } >rom
>>> +
>>> +       .got    :
>>> +       {
>>> +               *(.got)
>>> +       } >rom
>>> +
>>> +       .bss    :
>>> +       {
>>> +               bss_start = .;
>>> +               atag_space = .;
>>> +               . += ATAGSIZE;
>>> +               end_atag_space = .;
>>> +               *(.bss) *(COMMON)
>>> +       } >dram
>>> +
>>> +       .sbss   :
>>> +       {
>>> +               *(.sbss)
>>> +               bss_end = .;
>>> +       } >dram
>>> +}
>>> diff --git a/ports/beagleboneblack/BEAGLEBONEBLACK_ramtst.ldt
>>> b/ports/beagleboneblack/BEAGLEBONEBLACK_ramtst.ldt
>>> new file mode 100644
>>> index 0000000..76fbce4
>>> --- /dev/null
>>> +++ b/ports/beagleboneblack/BEAGLEBONEBLACK_ramtst.ldt
>>> @@ -0,0 +1,59 @@
>>> +etheraddr              = MACADDRBASE;
>>> +alt_tfsdevtbl_base     = ALTTFSDEVTBLBASE;
>>> +
>>> +MEMORY
>>> +{
>>> +       rom :   org = RAMTSTROMBASE,    len = RAMTSTROMLEN
>>> +}
>>> +
>>> +SECTIONS
>>> +{
>>> +       .text   :
>>> +       {
>>> +               boot_base = .;
>>> +               ram_reset.o(.text)
>>> +               *(.glue_7t)
>>> +               *(.glue_7)
>>> +       } >rom
>>> +
>>> +       .data   :
>>> +       {
>>> +               *(.data)
>>> +       } >rom
>>> +
>>> +       .sdata  :
>>> +       {
>>> +               *(.sdata)
>>> +       } >rom
>>> +
>>> +       .sdata2 :
>>> +       {
>>> +               *(.sdata2)
>>> +       } >rom
>>> +
>>> +       .rodata :
>>> +       {
>>> +               *(.rodata)
>>> +        *(.rodata.str1.4)
>>> +       } >rom
>>> +
>>> +       .got    :
>>> +       {
>>> +               *(.got)
>>> +       } >rom
>>> +
>>> +       .bss    :
>>> +       {
>>> +               bss_start = .;
>>> +               atag_space = .;
>>> +               . += ATAGSIZE;
>>> +               end_atag_space = .;
>>> +               *(.bss) *(COMMON)
>>> +       } >rom
>>> +
>>> +       .sbss   :
>>> +       {
>>> +               *(.sbss)
>>> +               bss_end = .;
>>> +       } >rom
>>> +}
>>> diff --git a/ports/beagleboneblack/CSB740_boot.ldt
>>> b/ports/beagleboneblack/CSB740_boot.ldt
>>> deleted file mode 100644
>>> index c8bc089..0000000
>>> --- a/ports/beagleboneblack/CSB740_boot.ldt
>>> +++ /dev/null
>>> @@ -1,63 +0,0 @@
>>> -/* CSB740_boot.ld:
>>> - * This is the memory map file used for the boot-flash based version
>>> - * of MicroMonitor.  The only value that should be considered adjustable
>>> - * here is the base address of the 'dram' memory block.
>>> - *
>>> - */
>>> -MEMORY
>>> -{
>>> -       rom :   org = ROMBASE,  len = ROMLEN
>>> -       dram :  org = DRAMBASE, len = DRAMLEN
>>> -}
>>> -
>>> -SECTIONS
>>> -{
>>> -       .text   :
>>> -       {
>>> -               boot_base = .;
>>> -               rom_reset.o(.text)
>>> -               *(.glue_7t)
>>> -               *(.glue_7)
>>> -       } >rom
>>> -
>>> -       .data   :
>>> -       {
>>> -               *(.data)
>>> -       } >rom
>>> -
>>> -       .sdata  :
>>> -       {
>>> -               *(.sdata)
>>> -       } >rom
>>> -
>>> -       .sdata2 :
>>> -       {
>>> -               *(.sdata2)
>>> -       } >rom
>>> -
>>> -       .rodata :
>>> -       {
>>> -               *(.rodata)
>>> -               *(.rodata.str1.4)
>>> -       } >rom
>>> -
>>> -       .got    :
>>> -       {
>>> -               *(.got)
>>> -       } >rom
>>> -
>>> -       .bss    :
>>> -       {
>>> -               bss_start = .;
>>> -               atag_space = .;
>>> -               . += ATAGSIZE;
>>> -               end_atag_space = .;
>>> -               *(.bss) *(COMMON)
>>> -       } >dram
>>> -
>>> -       .sbss   :
>>> -       {
>>> -               *(.sbss)
>>> -               bss_end = .;
>>> -       } >dram
>>> -}
>>> diff --git a/ports/beagleboneblack/CSB740_ramtst.ldt
>>> b/ports/beagleboneblack/CSB740_ramtst.ldt
>>> deleted file mode 100644
>>> index 76fbce4..0000000
>>> --- a/ports/beagleboneblack/CSB740_ramtst.ldt
>>> +++ /dev/null
>>> @@ -1,59 +0,0 @@
>>> -etheraddr              = MACADDRBASE;
>>> -alt_tfsdevtbl_base     = ALTTFSDEVTBLBASE;
>>> -
>>> -MEMORY
>>> -{
>>> -       rom :   org = RAMTSTROMBASE,    len = RAMTSTROMLEN
>>> -}
>>> -
>>> -SECTIONS
>>> -{
>>> -       .text   :
>>> -       {
>>> -               boot_base = .;
>>> -               ram_reset.o(.text)
>>> -               *(.glue_7t)
>>> -               *(.glue_7)
>>> -       } >rom
>>> -
>>> -       .data   :
>>> -       {
>>> -               *(.data)
>>> -       } >rom
>>> -
>>> -       .sdata  :
>>> -       {
>>> -               *(.sdata)
>>> -       } >rom
>>> -
>>> -       .sdata2 :
>>> -       {
>>> -               *(.sdata2)
>>> -       } >rom
>>> -
>>> -       .rodata :
>>> -       {
>>> -               *(.rodata)
>>> -        *(.rodata.str1.4)
>>> -       } >rom
>>> -
>>> -       .got    :
>>> -       {
>>> -               *(.got)
>>> -       } >rom
>>> -
>>> -       .bss    :
>>> -       {
>>> -               bss_start = .;
>>> -               atag_space = .;
>>> -               . += ATAGSIZE;
>>> -               end_atag_space = .;
>>> -               *(.bss) *(COMMON)
>>> -       } >rom
>>> -
>>> -       .sbss   :
>>> -       {
>>> -               *(.sbss)
>>> -               bss_end = .;
>>> -       } >rom
>>> -}
>>> --
>>> 2.3.3
>>>
>>> _______________________________________________
>>> umon-devel mailing list
>>> umon-devel at rtems.org
>>> http://lists.rtems.org/mailman/listinfo/umon-devel
>>
>> _______________________________________________
>> umon-devel mailing list
>> umon-devel at rtems.org
>> http://lists.rtems.org/mailman/listinfo/umon-devel
>
>
>
> --
> Ed Sutter
> Alcatel-Lucent Technologies -- Bell Laboratories
> Phone: 908-582-2351
> Email: ed.sutter at alcatel-lucent.com
>
>
> _______________________________________________
> umon-devel mailing list
> umon-devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/umon-devel



More information about the umon-devel mailing list