ld-linkerscript: ROM-output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello 

Im using a ld-linker script to generate an ROM-based application. Here
is a part of it:

lma_init_text = lma_init_rm; 
vma_init_text = vma_init_rm;
.init.text vma_init_text : AT
	(lma_init_text) {
		*(.init.text)
	}
elma_init_text = lma_init_text + SIZEOF(.init.text);

vma_init_data = vma_init_text + SIZEOF(.init.text);
.init.data vma_init_data : AT (lma_init_data)
{
	*(.init.data)
}
lma_init_data = lma_init + (ADDR(.init.data) - vma_init);
elma_init_data = lma_init_data + SIZEOF(.init.data);


In short, i put two sections behind each other in the ROM file and at
execution in memory. The reason i do this complicated way is, that
ADDR(.init.text) and vma_init_text can differ, because of a possible
alignment.

Is there any easier way to express this ? 
And i wonder if this 'defining the load address' after the corresponding
section is actually a really supported feature ?

ciao
josef

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux