binman: Correct symbol calculation with non-zero image base
authorSimon Glass <sjg@chromium.org>
Mon, 21 Oct 2019 03:31:34 +0000 (21:31 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Sat, 2 Nov 2019 10:00:51 +0000 (18:00 +0800)
commit15c981cc8adc26501e3a19ca7fb35705870ef597
tree5d39925a3562f18535c3bd6e6674b93fcc3fd05e
parent895ae8726dea182c8512fc6154bd0f9a6a06657b
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>
tools/binman/elf.py
tools/binman/test/u_boot_binman_syms.lds