u-boot-brain/tools/binman/test/u_boot_binman_syms.lds
Simon Glass 15c981cc8a binman: Correct symbol calculation with non-zero image base
At present binman adds the image base address to the symbol value before
it writes it to the binary. This is not correct since the symbol value
itself (e.g. image position) has no relationship to the image base.

Fix this and update the tests to cover this case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-11-02 18:00:51 +08:00

31 lines
434 B
Plaintext

/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (c) 2016 Google, Inc
*/
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
ENTRY(_start)
SECTIONS
{
. = 0x00000010;
_start = .;
. = ALIGN(4);
.text :
{
__image_copy_start = .;
*(.text*)
}
. = ALIGN(4);
.binman_sym_table : {
__binman_sym_start = .;
KEEP(*(SORT(.binman_sym*)));
__binman_sym_end = .;
}
.interp : { *(.interp*) }
}