summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLadislav Michl <ladis@linux-mips.org>2018-05-21 16:36:31 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2018-05-24 20:23:22 +0200
commit3017b0f2cfacb21489bc4fb2c46b47d0051a2fa5 (patch)
tree29dc5343b31fc4125159dfffe03b5b13a0bdb196
parenteb99516c6bcb3543aea2bfc2f362e92ace9e8c37 (diff)
downloadptxdist-3017b0f2cfacb21489bc4fb2c46b47d0051a2fa5.tar.gz
ptxdist-3017b0f2cfacb21489bc4fb2c46b47d0051a2fa5.tar.xz
at91bootstrap: Remove notes section
Wrapper blacklist is no longer enough to prevent creating huge binaries with Oselas toolchain 2018.02, so patch Makefile to explicitely remove unwanted sections. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--patches/Bootstrap-v1.16/0004-Remove-note-sections.patch402
-rw-r--r--patches/Bootstrap-v1.16/series1
2 files changed, 403 insertions, 0 deletions
diff --git a/patches/Bootstrap-v1.16/0004-Remove-note-sections.patch b/patches/Bootstrap-v1.16/0004-Remove-note-sections.patch
new file mode 100644
index 000000000..cc2cd3933
--- /dev/null
+++ b/patches/Bootstrap-v1.16/0004-Remove-note-sections.patch
@@ -0,0 +1,402 @@
+From: Ladislav Michl <ladis@linux-mips.org>
+Subject: [PATCH] Remove notes sections when producing binary
+
+Some linkers are producing notes section which causes objcopy creating over
+2MiB binary. Fix this by removing whole section - this is what kernel does:
+https://lkml.org/lkml/2011/12/15/162
+
+Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
+---
+ board/at91cap9adk/dataflash/Makefile | 4 +++-
+ board/at91cap9adk/norflash/Makefile | 4 +++-
+ board/at91cap9stk/nandflash/Makefile | 4 +++-
+ board/at91sam9260ek/dataflash/Makefile | 4 +++-
+ board/at91sam9260ek/nandflash/Makefile | 4 +++-
+ board/at91sam9261ek/dataflash/Makefile | 4 +++-
+ board/at91sam9261ek/nandflash/Makefile | 4 +++-
+ board/at91sam9263ek/dataflash/Makefile | 4 +++-
+ board/at91sam9263ek/nandflash/Makefile | 4 +++-
+ board/at91sam9g10ek/dataflash/Makefile | 4 +++-
+ board/at91sam9g10ek/nandflash/Makefile | 4 +++-
+ board/at91sam9g20ek/dataflash/Makefile | 4 +++-
+ board/at91sam9g20ek/nandflash/Makefile | 4 +++-
+ board/at91sam9g45ekes/nandflash/Makefile | 4 +++-
+ board/at91sam9m10ekes/dataflash/Makefile | 4 +++-
+ board/at91sam9m10ekes/nandflash/Makefile | 4 +++-
+ board/at91sam9m10g45ek/dataflash/Makefile | 4 +++-
+ board/at91sam9m10g45ek/nandflash/Makefile | 4 +++-
+ board/at91sam9rlek/dataflash/Makefile | 4 +++-
+ board/at91sam9rlek/nandflash/Makefile | 4 +++-
+ board/at91sam9xeek/dataflash/Makefile | 4 +++-
+ board/at91sam9xeek/nandflash/Makefile | 4 +++-
+ lib/Makefile | 4 +++-
+ 23 files changed, 69 insertions(+), 23 deletions(-)
+
+--- a/board/at91cap9adk/dataflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91cap9adk/dataflash/Makefile 2018-05-21 15:46:47.965572041 +0200
+@@ -65,10 +65,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+
+--- a/board/at91cap9adk/norflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91cap9adk/norflash/Makefile 2018-05-21 15:46:47.965572041 +0200
+@@ -65,10 +65,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+
+--- a/board/at91cap9stk/nandflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91cap9stk/nandflash/Makefile 2018-05-21 15:46:47.985572522 +0200
+@@ -69,10 +69,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+
+--- a/board/at91sam9260ek/dataflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91sam9260ek/dataflash/Makefile 2018-05-21 15:46:47.965572041 +0200
+@@ -68,10 +68,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+
+--- a/board/at91sam9260ek/nandflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91sam9260ek/nandflash/Makefile 2018-05-21 15:46:47.965572041 +0200
+@@ -69,10 +69,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+
+--- a/board/at91sam9261ek/dataflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91sam9261ek/dataflash/Makefile 2018-05-21 15:46:47.975572282 +0200
+@@ -69,10 +69,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+
+--- a/board/at91sam9261ek/nandflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91sam9261ek/nandflash/Makefile 2018-05-21 15:46:47.975572282 +0200
+@@ -68,10 +68,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+
+--- a/board/at91sam9263ek/dataflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91sam9263ek/dataflash/Makefile 2018-05-21 15:46:47.985572522 +0200
+@@ -65,10 +65,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+
+--- a/board/at91sam9263ek/nandflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91sam9263ek/nandflash/Makefile 2018-05-21 15:46:47.985572522 +0200
+@@ -64,10 +64,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+
+--- a/board/at91sam9g10ek/dataflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91sam9g10ek/dataflash/Makefile 2018-05-21 15:46:47.975572282 +0200
+@@ -69,10 +69,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+
+--- a/board/at91sam9g10ek/nandflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91sam9g10ek/nandflash/Makefile 2018-05-21 15:46:47.975572282 +0200
+@@ -68,10 +68,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+
+--- a/board/at91sam9g20ek/dataflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91sam9g20ek/dataflash/Makefile 2018-05-21 15:46:47.975572282 +0200
+@@ -68,10 +68,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+
+--- a/board/at91sam9g20ek/nandflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91sam9g20ek/nandflash/Makefile 2018-05-21 15:46:47.975572282 +0200
+@@ -68,10 +68,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+
+--- a/board/at91sam9g45ekes/nandflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91sam9g45ekes/nandflash/Makefile 2018-05-21 15:46:47.975572282 +0200
+@@ -69,10 +69,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+
+--- a/board/at91sam9m10ekes/dataflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91sam9m10ekes/dataflash/Makefile 2018-05-21 15:46:47.985572522 +0200
+@@ -69,10 +69,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+
+--- a/board/at91sam9m10ekes/nandflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91sam9m10ekes/nandflash/Makefile 2018-05-21 15:46:47.985572522 +0200
+@@ -69,10 +69,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+
+--- a/board/at91sam9m10g45ek/dataflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91sam9m10g45ek/dataflash/Makefile 2018-05-21 15:46:47.985572522 +0200
+@@ -69,10 +69,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+
+--- a/board/at91sam9m10g45ek/nandflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91sam9m10g45ek/nandflash/Makefile 2018-05-21 15:46:47.985572522 +0200
+@@ -69,10 +69,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+
+--- a/board/at91sam9rlek/dataflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91sam9rlek/dataflash/Makefile 2018-05-21 15:46:47.975572282 +0200
+@@ -68,10 +68,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+ $(BOARD).o: $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c
+--- a/board/at91sam9rlek/nandflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91sam9rlek/nandflash/Makefile 2018-05-21 15:46:47.965572041 +0200
+@@ -69,10 +69,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+
+--- a/board/at91sam9xeek/dataflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91sam9xeek/dataflash/Makefile 2018-05-21 15:46:47.975572282 +0200
+@@ -72,10 +72,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+ $(BOARD).o: $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c
+--- a/board/at91sam9xeek/nandflash/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/board/at91sam9xeek/nandflash/Makefile 2018-05-21 15:46:47.975572282 +0200
+@@ -72,10 +72,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+
+--- a/lib/Makefile 2018-05-21 15:48:07.887504700 +0200
++++ b/lib/Makefile 2018-05-21 15:53:48.685832495 +0200
+@@ -68,10 +68,12 @@
+
+ all: $(BOOT_NAME)
+
++REMOVE_SECTIONS=-R .note -R .comment -R .note.gnu.build-id
++
+ ifeq ($(TOOLCHAIN), gcc)
+ $(BOOT_NAME): $(OBJS)
+ $(LD) $(LDFLAGS) -n -o $(BOOT_NAME).elf $(OBJS)
+- $(OBJCOPY) --strip-debug --strip-unneeded $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
++ $(OBJCOPY) --strip-debug --strip-unneeded $(REMOVE_SECTIONS) $(BOOT_NAME).elf -O binary $(BOOT_NAME).bin
+ endif
+
+ $(BOARD).o: $(BOOTSTRAP_PATH)/board/$(BOARD)/$(BOARD).c
diff --git a/patches/Bootstrap-v1.16/series b/patches/Bootstrap-v1.16/series
index 6a1114f44..82fdb3ca3 100644
--- a/patches/Bootstrap-v1.16/series
+++ b/patches/Bootstrap-v1.16/series
@@ -3,4 +3,5 @@
0001-crt0_gnu.S-fix-image-size.patch
0002-elf32-littlearm.lds-fix-overlap-linker-error.patch
0003-Fix-build-with-EABI-toolchain.patch
+0004-Remove-note-sections.patch
# 0771a94d6e5f085e4c18dcea3102d267 - git-ptx-patches magic