This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Problem with 2ram section
It has been a while since I've dived this deep into linker scripts,
but I think the .2ram section will just grow. Maybe someone can
confirm or correct this?
2ram just is placed in RAM behind the ecos.table.* sections and before
the __GOT2_START__ section.
_GLOBAL_OFFSET_TABLE_ = ABSOLUTE(. + 65536); just means: put
_GLOBAL_OFFSET_TABLE at this absolute address: the current location
pointer + 65536.
Have you looked at your elf file to see where everything is actually
located? This can be done using readelf or objdump from your specific
toolchain. (I guess it will be powerpc-eabi-readelf and so on)
On Tue, Jun 3, 2008 at 10:59 AM, Andrey Baboshin <ababoshin@tepkom.ru> wrote:
> Hi, Tom.
>
>> You can enlarge the RAM section by adapting the linker script,
>> providing your RAM is physically big enough. Look for *.ldi that your
>> target is using. I don't have any experience with your specific
>> platform so I cannot give you it's exact name.
>
> I have found following describing of data-section:
>
> #define SECTION_data(_region_, _vma_, _lma_) \
> .data _vma_ : _lma_
> \
> { __ram_data_start = ABSOLUTE(.); *(.data*)
> \
> __GOT1_START__ = ABSOLUTE(.); *(.got1) __GOT1_END__ = ABSOLUTE(.);
> \
> /* Put .ctors and .dtors next to the .got2 section, so that */
> \
> /* the pointers get relocated with -mrelocatable. */
> \
> . = ALIGN(8); __CTOR_LIST__ = ABSOLUTE(.);
> \
> KEEP(*(SORT(.ctors*))) __CTOR_END__ = ABSOLUTE(.);
> \
> __DTOR_LIST__ = ABSOLUTE(.);
> \
> KEEP(*(SORT(.dtors*))) __DTOR_END__ = ABSOLUTE(.);
> \
> . = ALIGN(8);
> \
> KEEP(*( SORT (.ecos.table.*))) ;
> \
> . = ALIGN(4);
> \
> *( .2ram.*) ;
> \
> __GOT2_START__ = ABSOLUTE(.); *(.got2) __GOT2_END__ = ABSOLUTE(.);
> \
> __GOT_START = ABSOLUTE(.); _GLOBAL_OFFSET_TABLE_ = ABSOLUTE(. + 32768);
> \
> _SDA_BASE_ = ABSOLUTE(.); *(.got.plt) *(.got)
> \
> __GOT_END__ = ABSOLUTE(.); *(.dynamic)
> \
> *(.eh_frame)
> \
> /* We want the small data sections together, so single-instruction */
> \
> /* offsets can access them all, and initialized data all before */
> \
> /* uninitialized, so we can shorten the on-disk segment size. */
> \
> __SDATA_START__ = ABSOLUTE(.); *(.sdata) *(.sdata.*)
> \
> __SDATA2_START__ = ABSOLUTE(.); *(.sdata2*) }
> \
> > _region_
> \
> __rom_data_start = LOADADDR(.data);
> \
> __ram_data_end = .; PROVIDE(__ram_data_end = .);
> \
> _edata = .; PROVIDE (edata = .);
>
> How can I change it to enlarge 2ram-section?
> I have tryed change the " __GOT_START = ABSOLUTE(.); _GLOBAL_OFFSET_TABLE_
> = ABSOLUTE(. + 32768); \" line to " __GOT_START = ABSOLUTE(.);
> _GLOBAL_OFFSET_TABLE_ = ABSOLUTE(. + 65536); \" but it doesn't effect.
>
>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss