mirror of
https://github.com/PartialVolume/shredos.x86_64.git
synced 2026-02-20 09:35:26 +00:00
Update to buildroot 2023.08.2, updated nwipe to v0.35, added ChromeOS and Microsoft Surface drivers, fibre channel drivers.
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
From 0f75b03c008eacb9818af3a56dc088e72a623d17 Mon Sep 17 00:00:00 2001
|
||||
From: Marco Felsch <m.felsch@pengutronix.de>
|
||||
Date: Wed, 9 Nov 2022 12:59:09 +0100
|
||||
Subject: [PATCH] feat(build): add support for new binutils versions
|
||||
|
||||
Users of GNU ld (BPF) from binutils 2.39+ will observe multiple instaces
|
||||
of a new warning when linking the bl*.elf in the form:
|
||||
|
||||
ld.bfd: warning: stm32mp1_helper.o: missing .note.GNU-stack section implies executable stack
|
||||
ld.bfd: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
|
||||
ld.bfd: warning: bl2.elf has a LOAD segment with RWX permissions
|
||||
ld.bfd: warning: bl32.elf has a LOAD segment with RWX permissions
|
||||
|
||||
These new warnings are enbaled by default to secure elf binaries:
|
||||
- https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
|
||||
- https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=0d38576a34ec64a1b4500c9277a8e9d0f07e6774
|
||||
|
||||
Fix it in a similar way to what the Linux kernel does, see:
|
||||
https://lore.kernel.org/all/20220810222442.2296651-1-ndesaulniers@google.com/
|
||||
|
||||
Following the reasoning there, we set "-z noexecstack" for all linkers
|
||||
(although LLVM's LLD defaults to it) and optional add
|
||||
--no-warn-rwx-segments since this a ld.bfd related.
|
||||
|
||||
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
|
||||
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
|
||||
Change-Id: I9430f5fa5036ca88da46cd3b945754d62616b617
|
||||
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
|
||||
Upstream: https://github.com/ARM-software/arm-trusted-firmware/commit/1f49db5f25cdd4e43825c9bcc0575070b80f628c
|
||||
---
|
||||
Makefile | 7 ++++++-
|
||||
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 1ddb7b844..470956b19 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -416,6 +416,8 @@ endif
|
||||
|
||||
GCC_V_OUTPUT := $(shell $(CC) -v 2>&1)
|
||||
|
||||
+TF_LDFLAGS += -z noexecstack
|
||||
+
|
||||
# LD = armlink
|
||||
ifneq ($(findstring armlink,$(notdir $(LD))),)
|
||||
TF_LDFLAGS += --diag_error=warning --lto_level=O1
|
||||
@@ -442,7 +444,10 @@ TF_LDFLAGS += $(subst --,-Xlinker --,$(TF_LDFLAGS_$(ARCH)))
|
||||
|
||||
# LD = gcc-ld (ld) or llvm-ld (ld.lld) or other
|
||||
else
|
||||
-TF_LDFLAGS += --fatal-warnings -O1
|
||||
+# With ld.bfd version 2.39 and newer new warnings are added. Skip those since we
|
||||
+# are not loaded by a elf loader.
|
||||
+TF_LDFLAGS += $(call ld_option, --no-warn-rwx-segments)
|
||||
+TF_LDFLAGS += -O1
|
||||
TF_LDFLAGS += --gc-sections
|
||||
# ld.lld doesn't recognize the errata flags,
|
||||
# therefore don't add those in that case
|
||||
--
|
||||
2.30.2
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
From b2a94de52ae4a940a87d569815b19d3fa92dd32a Mon Sep 17 00:00:00 2001
|
||||
From: Tom Hochstein <tom.hochstein@nxp.com>
|
||||
Date: Mon, 16 May 2022 13:45:16 -0500
|
||||
Subject: [PATCH] LF-7968-01 fix(Makefile): Suppress array-bounds error
|
||||
|
||||
The array-bounds error is triggered now in cases where it was silent
|
||||
before, causing errors like:
|
||||
|
||||
```
|
||||
plat/imx/imx8m/hab.c: In function 'imx_hab_handler':
|
||||
plat/imx/imx8m/hab.c:64:57: error: array subscript 0 is outside array bounds of 'uint32_t[0]' {aka 'unsigned int[]'} [-Werror=array-bounds]
|
||||
64 | #define HAB_RVT_CHECK_TARGET_ARM64 ((unsigned long)*(uint32_t *)(HAB_RVT_BASE + 0x18))
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
```
|
||||
|
||||
The error is a false-positive and is entered as a bug [1]. The problem
|
||||
is fixed partially in GCC 12 and fully in GCC 13 [2].
|
||||
|
||||
The partial fix does not work here because the constant addresses used
|
||||
are less than the 4kB boundary chosen for the partial fix, so suppress
|
||||
the error until GCC is upgraded to 13.
|
||||
|
||||
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578
|
||||
[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578#c39
|
||||
|
||||
Upstream-Status: Inappropriate [other]
|
||||
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
|
||||
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
|
||||
Reviewed-by: Ye Li <ye.li@nxp.com>
|
||||
Signed-off-by: Brandon Maier <brandon.maier@collins.com>
|
||||
Upstream: https://github.com/nxp-imx/imx-atf/commit/058bf0f104115037d03e277f079825ef3659c5b9
|
||||
---
|
||||
Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index c87c3ae08..2d6b90f47 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -346,7 +346,7 @@ WARNINGS += -Wshift-overflow -Wshift-sign-overflow \
|
||||
endif
|
||||
|
||||
ifneq (${E},0)
|
||||
-ERRORS := -Werror
|
||||
+ERRORS := -Werror -Wno-error=array-bounds
|
||||
endif
|
||||
|
||||
CPPFLAGS = ${DEFINES} ${INCLUDES} ${MBEDTLS_INC} -nostdinc \
|
||||
--
|
||||
2.41.0
|
||||
|
||||
Reference in New Issue
Block a user