blob: 44568f8cf854607be9a6ad2663c73e599f4cc7ce [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001# SPDX-License-Identifier: GPL-2.0+
Daniel Schwierzeck17def7d2014-11-21 23:51:33 +01002
Daniel Schwierzeck17def7d2014-11-21 23:51:33 +01003libs-y += arch/arc/cpu/$(CPU)/
4libs-y += arch/arc/lib/
Alexey Brodkin1371d272014-12-29 15:42:57 +03005
6# MetaWare debugger doesn't support PIE (position-independent executable)
7# so the only way to load U-Boot in MDB is to fake it by:
8# 1. Reset PIE flag in ELF header
9# 2. Strip all debug information from elf
10ifdef CONFIG_SYS_LITTLE_ENDIAN
11 EXEC_TYPE_OFFSET=16
12else
13 EXEC_TYPE_OFFSET=17
14endif
15
16mdbtrick: u-boot
17 $(Q)printf '\x02' | dd of=u-boot bs=1 seek=$(EXEC_TYPE_OFFSET) count=1 \
18 conv=notrunc &> /dev/null
19 $(Q)$(CROSS_COMPILE)strip -g u-boot