Hi all,
I am trying to port blob over the assabet. so that I can flash the kernel.Now
I am not able to flash bcoz Iam running from the flash itself.So I am trying to
copy the code from flash to RAM once the stack is initialised.First of all
I need to modify the linker script.The start.o file alone need to be there
in the ROM address and rest in the RAM .I have tried modifying the linker
script but I am getting lot of errors.I used the GNU linker format ld to write
the linker script.For eg I tried
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_start)
MEMORY{ ram : ORIGIN = 0xc1e00000, l = 1024K
rom : ORIGIN = 0x00000000, l = 256K
romdata : ORIGIN = 0x00040000, l = 128k
datadummy : ORIGIN = 0x00060000, l = 128k
romtext : ORIGIN =0x00080000, l = 256K
romgot : ORIGIN =0x000c0000, l =256K
}
SECTIONS
{
text :
{
start.o(.text)
}>rom
. = 0xc1e00000;
/*textram :
{
main.o clock.o command.o flash.o serial.o time.o util.o uucodec.o(.text)
}>romtext*/
textram :
{
*(.text)
}>romtext
rodata :
{
*(.rodata)
}>romdata
data :
{
*(.data)
}>datadummy
got :
{
*(.got)
}>romgot
I have tried the above script after lot of permuations and combinations.Can
some body please help me to solve this problem. I am getting the following
errors after compile.
on `.bss'
/usr/local/arm-linux/arm-linux/bin/ld: warning: no memory region specified for section
`.got.plt'
/usr/local/arm-linux/arm-linux/bin/ld: warning: no memory region specified for section
`.glue_7'
/usr/local/arm-linux/arm-linux/bin/ld: warning: no memory region specified for section
`.glue_7t'
/usr/local/arm-linux/bin/arm-linux-objcopy -O binary -R .note -R .comment -S
blob-elf32 blob
BFD: Warning: Writing section `.got.plt' to huge (ie negative) file offset 0xc1e00e1c.
BFD: Warning: Writing section `.glue_7' to huge (ie negative) file offset 0xc1e00e28.
BFD: Warning: Writing section `.glue_7t' to huge (ie negative) file offset 0xc1e00e28.
/usr/local/arm-linux/bin/arm-linux-objcopy: blob: File truncated
make[1]: *** [blob] Error 1
make[1]: Leaving directory `/root/devel/blob-1.0.8-pre2/src'
make: *** [all-recursive] Error 1
And when I objdump the code I am not seeing any change in VMA in teh code.Both
LMA and VMA are the same.(Load memory and Virtual Memory Address).
Please suggest me a good link which will tell me abt how to writa ARM linux
linker script.
Please help.
Thanx in advance,
hari
_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
Please visit the above address for information on this list.