mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-07-28 22:03:44 +09:00
7530bb2175
Fixes commit fac4790491
("arc: Eliminate unused code and data with GCC's garbage collector"),
see [1].
Since in case of ARCv2 .ivt only contains addrresses of
interrupt/exception handlers linker doesn't understand that this section
actually make a lot of sense and decides to get rid of it if we use
"--gc-sections".
And KEEP does exactly this, see [2].
[1] http://git.denx.de/?p=u-boot.git;a=commit;h=fac4790491f69b29755d92db2cad508849573ff7
[2] https://sourceware.org/binutils/docs/ld/Input-Section-Keep.html#Input-Section-Keep
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
63 lines
887 B
Plaintext
63 lines
887 B
Plaintext
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
|
|
*/
|
|
|
|
#include <config.h>
|
|
|
|
OUTPUT_FORMAT("elf32-littlearc", "elf32-littlearc", "elf32-littlearc")
|
|
OUTPUT_ARCH(arc)
|
|
ENTRY(_start)
|
|
SECTIONS
|
|
{
|
|
. = CONFIG_SYS_TEXT_BASE;
|
|
__image_copy_start = .;
|
|
__text_start = .;
|
|
.text : {
|
|
arch/arc/lib/start.o (.text*)
|
|
*(.text*)
|
|
}
|
|
__text_end = .;
|
|
|
|
. = ALIGN(1024);
|
|
__ivt_start = .;
|
|
.ivt :
|
|
{
|
|
KEEP(*(.ivt))
|
|
}
|
|
__ivt_end = .;
|
|
|
|
. = ALIGN(4);
|
|
.rodata : {
|
|
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))
|
|
}
|
|
|
|
. = ALIGN(4);
|
|
.data : {
|
|
*(.data*)
|
|
}
|
|
|
|
. = ALIGN(4);
|
|
.u_boot_list : {
|
|
KEEP(*(SORT(.u_boot_list*)));
|
|
}
|
|
|
|
. = ALIGN(4);
|
|
__rel_dyn_start = .;
|
|
.rela.dyn : {
|
|
*(.rela.dyn)
|
|
}
|
|
__rel_dyn_end = .;
|
|
|
|
. = ALIGN(4);
|
|
__bss_start = .;
|
|
.bss : {
|
|
*(.bss*)
|
|
}
|
|
__bss_end = .;
|
|
|
|
. = ALIGN(4);
|
|
__image_copy_end = .;
|
|
__init_end = .;
|
|
}
|