diff options
author | Geoff Levand <geoff@infradead.org> | 2015-03-18 23:04:03 +0000 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2015-03-19 11:17:36 +0900 |
commit | e42fc55e10fbbcc1762b9aabd5c7c102ca1042bf (patch) | |
tree | 48a3bd93d08426c3d70d805cfc3d069ad73f9f2c /purgatory | |
parent | 236e30b2b4dcb3e78c5f5219b66d90c7e9c464fd (diff) | |
download | kexec-tools-e42fc55e10fbbcc1762b9aabd5c7c102ca1042bf.tar.gz |
purgatory: Add no-zero-initialized-in-bss flag
It seems some toolchains will put zero-initialized variables like purgatory's
sha256_regions into the BSS section. These symbols cannot be processed by
machine_apply_elf_rel() and lead to build errors. To avoid this problem add
the compiler flag no-zero-initialized-in-bss to the purgatory CFLAGS.
Fixes build errors like these:
Symbol: sha256_regions is in a bss section cannot set
Reported here:
http://lists.infradead.org/pipermail/kexec/2014-November/013052.html
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/Makefile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/purgatory/Makefile b/purgatory/Makefile index 19457029..1c7d2c00 100644 --- a/purgatory/Makefile +++ b/purgatory/Makefile @@ -47,7 +47,8 @@ purgatory/sha256.o: $(srcdir)/util_lib/sha256.c $(PURGATORY): CC=$(TARGET_CC) $(PURGATORY): CFLAGS+=$(PURGATORY_EXTRA_CFLAGS) \ $($(ARCH)_PURGATORY_EXTRA_CFLAGS) \ - -Os -fno-builtin -ffreestanding + -Os -fno-builtin -ffreestanding \ + -fno-zero-initialized-in-bss $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \ -I$(srcdir)/purgatory/include \ |