[BACK]Return to ldscript CVS log [TXT][DIR] Up to [local] / funnyos / arch / sam7s64

File: [local] / funnyos / arch / sam7s64 / ldscript (download)

Revision 1.3, Sat Nov 10 00:17:34 2007 UTC (16 years, 6 months ago) by init
Branch: MAIN
Changes since 1.2: +2 -2 lines

after some beer i found that vectors in .text are incorrect.
today's idea is:
- place .vectors in the beginning of .data (_sdata) (data is right in start of SRAM)
- .text starts with relocation code that disables FLASH at 0x00000000 and enables SRAM there
after that we may safely enable interrupts (or cause data aborts :])

/*
 * $Id: ldscript,v 1.3 2007/11/10 00:17:34 init Exp $
 */
/*
 * Where to put each section.
 */
SECTIONS
{
	.text : {
		_stext = .;
		*(.text)
		*(.rodata)
		*(.rodata*)
		. = ALIGN(4);
		_etext = .;
	} /* .text */

	/* initialized data (.data) */
	.data : AT (ADDR(.text) + SIZEOF(.text)) {
		_sdata = .;
		*(.vectors)
		*(.data)
		_edata = .;
	} /* .data */

	/* uninitialized data (.bss) */
	.bss (NOLOAD) : {
		. = ALIGN(4);
		_sbss = .;
		*(.bss)
		_ebss = .;
	} /* .bss */

} /* SECTIONS */

end = .;