Skip to contentSkip to conversation

FAILED: patch "[PATCH] riscv: Remove duplicate objcopy flag" failed to apply to 5.15-stable tree

PATCH [email protected] 1 participant 1 message Oct 15, 2023

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x 505b02957e74f0c5c4655647ccb04bdc945d18f6
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2023101509-important-machine-b165@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..

Possible dependencies:

505b02957e74 ("riscv: Remove duplicate objcopy flag")
26e7aacb83df ("riscv: Allow to downgrade paging mode from the command line") 559d1e45a16d ("riscv: Use --emit-relocs in order to move .rela.dyn in init") c2dea0bc5339 ("riscv: Check relocations at compile time")
39b33072941f ("riscv: Introduce CONFIG_RELOCATABLE")
69a90d2fe107 ("riscv: Move .rela.dyn outside of init to avoid empty relocations") f3af3b0039fe ("Merge patch series "riscv: improve link and support ARCH_WANT_LD_ORPHAN_WARN"")

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 505b02957e74f0c5c4655647ccb04bdc945d18f6 Mon Sep 17 00:00:00 2001
From: Song Shuai <[email protected]>
Date: Thu, 14 Sep 2023 17:13:34 +0800
Subject: [PATCH] riscv: Remove duplicate objcopy flag

There are two duplicate -O binary flags when objcopying from vmlinux to Image/xipImage.

RISC-V set -O binary flag in both OBJCOPYFLAGS in the top-level riscv Makefile and OBJCOPYFLAGS_* in the boot/Makefile, and the objcopy cmd in Kbuild would join them together.

The -O binary flag is only needed for objcopying Image, so remove the OBJCOPYFLAGS in the top-level riscv Makefile.

Fixes c0fbcd991860 ("RISC-V: Build flat and compressed kernel images")
arch/riscv/Makefile +0 -1
index 1329e060c548..b43a6bb7e4dc 100644
@@ -6,7 +6,6 @@
 # for more details.
 #
 
-OBJCOPYFLAGS    := -O binary
 LDFLAGS_vmlinux := -z norelro
 ifeq ($(CONFIG_RELOCATABLE),y)
 	LDFLAGS_vmlinux += -shared -Bsymbolic -z notext --emit-relocs