2008-08-25 09:07:34

by Michal Simek

[permalink] [raw]
Subject: Linker script

Hi all,

I am solving one merging issue and I would appreciate if someone can help me
with one problem I have.

We have in vmlinux.lds.S specify two memory regions because we use main memory
and bram memory which is faster.

MEMORY {
ERAM : ORIGIN = CONFIG_XILINX_ERAM_START,
LENGTH = CONFIG_XILINX_ERAM_SIZE
#if defined(CONFIG_XILINX_LMB_START) && defined(CONFIG_USE_BRAM)
LMB : ORIGIN = CONFIG_XILINX_LMB_START,
LENGTH = CONFIG_XILINX_LMB_SIZE
#endif
}

And then we have special section for it which is copied to proper place in
startup sequence.

.bram : {
/* Skip past interrupt, exception and debug vectors. If you
change this, also change the 0x40 (word) offset in
kernel/setup.c:pingpong_bram() */
. = 0x100;
_bram_load_start = . ;
*(.bram*) /* Everything */
*(.bram.text)
*(.bram.data)
_bram_load_end = . ;
} > LMB AT > ERAM

This concept work well but I would like to remove all reference which pointed to
memory regions and of course regions because I would like to use generic macros
which is in asm-generic/vmlinux.lds.h (especially RODATA).

I found that is possible to add memory location after name of section but this
seems work only without included data.
.name mem_lock {

}

When the data is there objcopy announced that section is too big for creating
linux.bin file. :-(

Is there any way how is possible to do it?

Thanks for any hit,
Best regards,
Michal Simek