/* Exports from the Linker Script */
extern ulong __text_start;
+extern ulong __data_end;
extern ulong __rel_dyn_start;
extern ulong __rel_dyn_end;
extern ulong __bss_start;
void board_init_f (ulong gdp)
{
void *text_start = &__text_start;
- void *u_boot_cmd_end = &__u_boot_cmd_end;
+ void *data_end = &__data_end;
Elf32_Rel *rel_dyn_start = (Elf32_Rel *)&__rel_dyn_start;
Elf32_Rel *rel_dyn_end = (Elf32_Rel *)&__rel_dyn_end;
void *bss_start = &__bss_start;
ulong rel_offset;
Elf32_Rel *re;
- uboot_size = (ulong)u_boot_cmd_end - (ulong)text_start;
+ uboot_size = (ulong)data_end - (ulong)text_start;
dest_addr = (void *)gdp - (uboot_size + (ulong)bss_size);
rel_offset = text_start - dest_addr;
{
. = TEXT_BASE; /* Location of bootcode in flash */
__text_start = .;
- .text : { *(.text); }
+ .text : { *(.text*); }
. = ALIGN(4);
- .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
-
- . = ALIGN(4);
-
- .data : { *(.data) }
+ __u_boot_cmd_start = .;
+ .u_boot_cmd : { *(.u_boot_cmd) }
. = ALIGN(4);
+ __u_boot_cmd_end = .;
- .interp : { *(.interp) }
. = ALIGN(4);
+ .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
- .dynsym : { *(.dynsym) }
. = ALIGN(4);
+ .data : { *(.data*) }
- .dynstr : { *(.dynstr) }
. = ALIGN(4);
+ .dynsym : { *(.dynsym*) }
- .hash : { *(.hash) }
. = ALIGN(4);
+ .hash : { *(.hash*) }
- .got : { *(.got) }
. = ALIGN(4);
+ .got : { *(.got*) }
- .got.plt : { *(.got.plt) }
. = ALIGN(4);
+ __data_end = .;
- .dynamic (NOLOAD) : { *(.dynamic) }
. = ALIGN(4);
+ __bss_start = ABSOLUTE(.);
+ .bss (NOLOAD) : { *(.bss) }
+ __bss_size = SIZEOF(.bss);
- __u_boot_cmd_start = .;
- .u_boot_cmd : { *(.u_boot_cmd) }
. = ALIGN(4);
- __u_boot_cmd_end = .;
-
__rel_dyn_start = .;
.rel.dyn : { *(.rel.dyn) }
__rel_dyn_end = .;
- . = ALIGN(4);
- __bss_start = ABSOLUTE(.);
- .bss (NOLOAD) : { *(.bss) }
- __bss_size = SIZEOF(.bss);
+ /DISCARD/ : { *(.dynstr*) }
+ /DISCARD/ : { *(.dynamic*) }
+ /DISCARD/ : { *(.plt*) }
+ /DISCARD/ : { *(.interp*) }
+ /DISCARD/ : { *(.gnu*) }
/* 16bit realmode trampoline code */
.realmode 0x7c0 : AT ( LOADADDR(.rel.dyn) + SIZEOF(.rel.dyn) ) { KEEP(*(.realmode)) }