summaryrefslogtreecommitdiff
path: root/purgatory
diff options
context:
space:
mode:
authorGeoff Levand <geoff@infradead.org>2015-03-18 23:04:03 +0000
committerSimon Horman <horms@verge.net.au>2015-03-19 11:18:14 +0900
commitf9f98fd811fef94f4f794e1980246e94d3ab2097 (patch)
tree2c8c83e25a3d8584b28ccb9f2b444dff0dbea6f4 /purgatory
parent835620406833168b2d0104e57779ef0a31101225 (diff)
downloadkexec-tools-f9f98fd811fef94f4f794e1980246e94d3ab2097.tar.gz
purgatory: Generate map file
To aid in debugging purgatory and its relocation generate a linker map file when purgatory is built. Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'purgatory')
-rw-r--r--purgatory/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/purgatory/Makefile b/purgatory/Makefile
index 6b17e71..2d6b2c0 100644
--- a/purgatory/Makefile
+++ b/purgatory/Makefile
@@ -12,6 +12,7 @@ PURGATORY_SRCS =
PURGATORY_SRCS += purgatory/purgatory.c
PURGATORY_SRCS += purgatory/printf.c
PURGATORY_SRCS += purgatory/string.c
+PURGATORY_MAP = purgatory/purgatory.map
dist += purgatory/Makefile $(PURGATORY_SRCS) \
purgatory/include/purgatory.h purgatory/include/string.h
@@ -59,7 +60,8 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
-I$(shell $(CC) -print-file-name=include)
$(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\
-Wl,--no-undefined -nostartfiles -nostdlib \
- -nodefaultlibs -e purgatory_start -r
+ -nodefaultlibs -e purgatory_start -r \
+ -Wl,-Map=$(PURGATORY_MAP)
$(PURGATORY): $(PURGATORY_OBJS)
$(MKDIR) -p $(@D)