samsung-crownlte: fix 'ld: read-only segment has dynamic relocations' kernel build error (MR 4004)

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Przemysław Romanik 2023-04-09 17:26:16 +02:00 committed by Oliver Smith
parent 073e6edbac
commit ea980f84f9
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
3 changed files with 21 additions and 1 deletions

View file

@ -0,0 +1,17 @@
Fixes "ld: read-only segment has dynamic relocations" error caused by "main/binutils: add -z text by default":
https://gitlab.alpinelinux.org/alpine/aports/-/commit/a737d101cad8c0acf782d9a0ec38cf8d3432b6ff
https://gitlab.alpinelinux.org/alpine/aports/-/commit/098309ba27bbb71f3723aa2e6e180776e0396b86
diff --git a/Makefile b/Makefile
index 4ee2a6394ec3..3fbced2573d1 100644
--- a/Makefile
+++ b/Makefile
@@ -969,6 +969,8 @@ ifeq ($(CONFIG_STRIP_ASM_SYMS),y)
LDFLAGS_vmlinux += $(call ld-option, -X,)
endif
+LDFLAGS_vmlinux += -z notext
+
ifneq ($(SEC_BUILD_CONF_USE_FINGERPRINT_TZ), false)
ifeq ($(CONFIG_SENSORS_FINGERPRINT), y)
ifneq ($(CONFIG_SEC_FACTORY), y)

View file

@ -0,0 +1 @@
../../.shared-patches/linux/fix-read-only-segment-has-dynamic-relocations-error.patch

View file

@ -3,7 +3,7 @@
pkgname=linux-samsung-crownlte
pkgver=4.9.218
pkgrel=2
pkgrel=3
pkgdesc="Samsung Galaxy Note 9 kernel fork"
arch="aarch64"
_carch="arm64"
@ -34,6 +34,7 @@ source="
03-decon_dsi-UNBLANK-missed.patch
04-wifi-firmware-path.patch
05-decon_core-disable-decon_release.patch
06-fix-read-only-segment-has-dynamic-relocations-error.patch
"
builddir="$srcdir/$_repository-$_commit"
_outdir="out"
@ -68,4 +69,5 @@ a19967220faac402dd6fc2424f89cc236f367047d069a2234ca391e44a47fe04e3aff9562dd0be6f
24eb8701d77ad6cfc98a153341874d753a67930a369b1a08d8d51682a5d1014971e106bda93b7180bcacdf7032bb952fdca02f68886ea27c761eab8fefdb03fa 03-decon_dsi-UNBLANK-missed.patch
596235334147a430d0104d01647e57aeac71b7a9e484daf4ad8fca9cd1cf23e040fbf2c00dea7fb2a096e741eb1dde71471585a59d71d47dcdb1336e5c16efad 04-wifi-firmware-path.patch
3bae3abd47766eba42ebe1ca758f0d9e1f8a926132d98705985b493fb99115af863700cc76cfaf3a8b812fcae86b52b7c6807dc8fbade95f98c1e965c5e3dddc 05-decon_core-disable-decon_release.patch
763b7bb86f7b0d381771c292f531f81e33826438e7d3e866e3b295295415366a68f55a0b9ed6afd1a2a1ffc4204537cbc14a55af8b500e2c087cc4ef7f25b059 06-fix-read-only-segment-has-dynamic-relocations-error.patch
"