Dear
I used to EDK 6.3 for multiprocessor system implementation. The system worked fine. But, when I upgraded to EDK 8.2, "parse error" occurs in the following linker script.
------------------------------------------------------------------------ .init : { KEEP(*(.init)) } >
.fini : { KEEP(*(.fini)) } >
------------------------------------------------------------------------
Does anyone have this experience? If yes, let me know how to fix this problem.
Thank you in advance.
Entire linker script is below.
---------------------------------------------------------------------------------------------------------------------- /* Linker Script automatically rev'ed up using XPS 8.2 */ /* Define default stack and heap sizes */ _START_ADDR = 0xFFFF8000; /*DEFINED(_START_ADDR) ? _START_ADDR :
0xFFFF0000;*/ _STACK_SIZE = 60k; /*DEFINED(_STACK_SIZE) ? _STACK_SIZE : 4k;*/ _HEAP_SIZE = 60k; /*DEFINED(_HEAP_SIZE) ? _HEAP_SIZE : 4k;*//* Define boot.o to be the first file for linking. This statement is mandatory. */ STARTUP(boot.o)
/* Specify the default entry point to the program */ ENTRY(_boot)
/* Define the Memory layout, specifying the start address and size of the different memory locations */ MEMORY { dRAM : ORIGIN = 0x040E0000, LENGTH = 0x20000 /*(128K)*/ pRAM : ORIGIN = 0xFFFF8000, LENGTH = 0x8000-4 /*32K-4*/ boot : ORIGIN = 0xFFFFFFFC, LENGTH = 4 }
/* Define the sections and where they are mapped in memory */
SECTIONS { . = _START_ADDR;
/* .vectors section must be aligned on a 64k boundary * Hence should be the first section definition as bram start location * is 64k aligned */ .vectors : /*BLOCK (64k):*/ { *(.vectors) } > pRAM
.boot0 : { *(.boot0)} > pRAM .text : { *(.text) *(.text.*) *(.gnu.linkonce.t.*) } > pRAM
/**********************************************/ /* Parse error */ /**********************************************/ .init : { KEEP(*(.init)) } >
.fini : { KEEP(*(.fini)) } >
.boot : { *(.boot) } > boot .data : { *(.data) *(.data.*) *(.gnu.linkonce.d.*) CONSTRUCTORS *(.got2) *(.rodata) *(.fixup) *(.rodata.*) *(.gnu.linkonce.r.*) } > pRAM
.dtors : { __DTOR_LIST__ = .; ___DTORS_LIST___ = .; KEEP (*crtbegin.o(.dtors)) KEEP (*(EXCLUDE_FILE(*crtend.o) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) __DTOR_END__ = .; ___DTORS_END___ = .; } > pRAM
.eh_frame : { *(.eh_frame) } > pRAM
.jcr : { *(.jcr) } > pRAM
.gcc_except_table : { *(.gcc_except_table) } > pRAM
.got : { *(.got) } > pRAM
.tdata : { *(.tdata) *(.gnu.linkonce.td.*) } > pRAM
.tbss : { *(.tbss) *(.gnu.linkonce.tb.*) } > pRAM
/* .data1 : { *(.data1) } > ram .got1 : { *(.got1) } > ram
.got2 : { *(.got2) } > ram
.got1 : { *(.got1) } > ram
.dynamic : { *(.dynamic) } > ram
*/.ctors : { /* __CTOR_LIST__ = .; LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) *(.ctors) LONG(0) __CTOR_END__ = .;*/
KEEP (*crtbegin.o(.ctors)) KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) KEEP (*(SORT(.ctors.*))) KEEP (*(.ctors)) } > pRAM __CTOR_LIST__ = ADDR(.ctors); __CTOR_END__ = ADDR(.ctors) + SIZEOF(.ctors);
/* small data area (read/write): keep together! */ .sdata : { *(.sdata) *(.gnu.linkonce.s.*) } > pRAM
.sbss : { . = ALIGN(4); *(.sbss) *(.gnu.linkonce.sb.*) . = ALIGN(4); } > pRAM
__sbss_start = ADDR(.sbss); __sbss_end = ADDR(.sbss) + SIZEOF(.sbss);
/* small data area 2 (read only) */ .sdata2 : { *(.sdata2) *(.gnu.linkonce.s2.*) } > pRAM
__SDATA2_START__ = ADDR(.sdata2); __SDATA2_END__ = ADDR(.sdata2) + SIZEOF(.sdata2);
.sbss2 : { *(.sbss2) *(.gnu.linkonce.sb2.*) } > pRAM
__SBSS2_START__ = ADDR(.sbss2); __SBSS2_END__ = ADDR(.sbss2) + SIZEOF(.sbss2);
.bss : { . = ALIGN(4); *(.bss) *(.gnu.linkonce.b.*) *(COMMON) . = ALIGN(4); __bss_end = .;
/* add stack and align to 16 byte boundary */ _stack_end = .; . = . + _STACK_SIZE; . = ALIGN(16); __stack = .;
/* add heap and align to 16 byte boundary */ _heap_start = .; . = . + _HEAP_SIZE; . = ALIGN (16); _heap_end = .; } > dRAM
__bss_start = ADDR(.bss);
}ODY>