From: Ladislav Michl <ladis@linux-mips.org>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 2/2] at91bootstrap: Remove notes section
Date: Mon, 21 May 2018 16:36:31 +0200 [thread overview]
Message-ID: <20180521143631.GB20729@lenoch> (raw)
In-Reply-To: <20180521143536.GA20729@lenoch>
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>
---
.../0004-Remove-note-sections.patch | 402 ++++++++++++++++++
patches/Bootstrap-v1.16/series | 1 +
2 files changed, 403 insertions(+)
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
--
2.17.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
prev parent reply other threads:[~2018-05-21 14:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-21 14:35 [ptxdist] [PATCH 1/2] at91bootstrap: Use generic compile rule Ladislav Michl
2018-05-21 14:36 ` Ladislav Michl [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180521143631.GB20729@lenoch \
--to=ladis@linux-mips.org \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox