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

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

Revision 1.5, Mon Nov 12 22:02:18 2007 UTC (16 years, 5 months ago) by nbrk
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +4 -4 lines

place data at the top 4 KB of 64KB flash;
hardcode disposition of .data and .bss into ldscript.

this all makes compiler generate code with data at 0x00200000 in mind,
while linker places it at the (imaginary) end of text (60 KB) - last 4KB (0x0000f000) in ROM

/*
 * $Id: ldscript,v 1.5 2007/11/12 22:02:18 nbrk Exp $
 */
/*
 * Where to put each section.
 */
SECTIONS
{
	.text : {
		_stext = .;
		*(.text)
		*(.rodata)
		*(.rodata*)
		. = ALIGN(4);
		_etext = .;
	} /* .text */

	/* initialized data (.data), place this at 60KB (upper 4KB of flash) */
	.data : AT (0x0000f000) {
		_sdata = .;
		*(.data)
		_edata = .;
	} /* .data */

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

} /* SECTIONS */

end = .;