Re: Linker Script:

"John Pickwick" <[email protected]>
Newsgroups gmane.comp.gnu.utils
Organization Guest of ProXad - France
Message-ID <[email protected]>
Hi Chris,

did you try to define ROM_1 and ROM_2 with MEMORY instruction and then to 
use the syntax :
.myfirstrom {
            a_group.o (.text)
            . = 0x100000;
         } > ROM_1
?
This should "send" the content of .myfirstrom section to your ROM_1 memory.

John

<[email protected]> a écrit dans le message de news: 
[email protected]...
>I am trying to write a linker script for a m/c that has a hole in its
> ROM.
>
> i.e
>
> ROM_1: 0x60000 (size 0x80000)
>
> ROM_2 :0x160000 (size 0x80000)
>
> I can partition the code in two separate groups, for instance
> a_group.o and b_group.o.
> Then set a_group.o to start @0x60000, since the size of a_group is
> about 0x76500, it almost fills up ROM_1.
>
> I can then use a
>
> . = 0x100000;
>
> to force the creation of the rest of the image in ROM_2, however the
> image is now filled with 0x00 for memory range 0x80000 -- 0x100000.
> This causes the image to be larger than the original image if
> contiguous.
>
> Example linker script used:
>
> SECTIONS {
> .text {
>            a_group.o (.text)
>            . = 0x100000;
>            b_group.o (.text)
>         }
> .data {
>            * (.text)
>            _edata = ABSOLUTE(.);
>        }
> .bss  {
>            * (.bss)
>        }
>           _end = ABSOLUTE(.);
> }
>
> Is there anyway to specify the creation of the b_group at memory
> location 0x100000, using an "AT" without out causing the image to have
> any fill data?
>
> Please let me know you need more clarification.
>
> Thank you,
>
> Chris
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.