aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-01-20 17:15:32 +0000
committerPeter Maydell <peter.maydell@linaro.org>2017-01-20 17:15:32 +0000
commitdb593e708b675fa728411252b61b7e7487f0521c (patch)
tree899a7ebaecbb647af584a05a5c35dfce184fd141
parentbf5faf03a3f45d4fd81e09b80d76c0f55cddbba0 (diff)
Makefile: Add -Wl,--build-id=none to CFLAGS
Some ARM toolchains emit the .note.gnu.build-id section, which by default ends up at the start of the binary where the vector table should be. Use -Wl,--build-id=none in the CFLAGS to suppress the build-id section entirely so the binary starts with the vector table as it should. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 09d5eb4..478391b 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ endif
DEBUG=-g
-CFLAGS=-mcpu=cortex-m3 -mthumb -ffreestanding -nostdlib -nostartfiles -nodefaultlibs $(DEBUG) -Wall -Wextra -Werror
+CFLAGS=-mcpu=cortex-m3 -mthumb -ffreestanding -nostdlib -nostartfiles -nodefaultlibs $(DEBUG) -Wall -Wextra -Werror -Wl,--build-id=none
LDFLAGS=-static
CFLAGS+=-Os