diff mbox series

[-fixes] riscv: Remove duplicate objcopy flag

Message ID 20230914091334.1458542-1-songshuaishuai@tinylab.org (mailing list archive)
State Accepted
Commit 505b02957e74f0c5c4655647ccb04bdc945d18f6
Headers show
Series [-fixes] riscv: Remove duplicate objcopy flag | expand

Checks

Context Check Description
conchuod/cover_letter success Single patches do not need cover letters
conchuod/tree_selection success Guessed tree name to be fixes at HEAD 8eb8fe67e2c8
conchuod/fixes_present success Fixes tag present in non-next series
conchuod/maintainers_pattern success MAINTAINERS pattern errors before the patch: 5 and now 5
conchuod/verify_signedoff success Signed-off-by tag matches author and committer
conchuod/kdoc success Errors and warnings before: 0 this patch: 0
conchuod/build_rv64_clang_allmodconfig success Errors and warnings before: 9 this patch: 9
conchuod/module_param success Was 0 now: 0
conchuod/build_rv64_gcc_allmodconfig success Errors and warnings before: 9 this patch: 9
conchuod/build_rv32_defconfig success Build OK
conchuod/dtb_warn_rv64 success Errors and warnings before: 25 this patch: 25
conchuod/header_inline success No static functions without inline keyword in header files
conchuod/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
conchuod/build_rv64_nommu_k210_defconfig success Build OK
conchuod/verify_fixes success Fixes tag looks correct
conchuod/build_rv64_nommu_virt_defconfig success Build OK
conchuod/vmtest-for-next-PR success PR summary
conchuod/patch-1-test-1 success .github/scripts/patches/build_rv32_defconfig.sh
conchuod/patch-1-test-2 success .github/scripts/patches/build_rv64_clang_allmodconfig.sh
conchuod/patch-1-test-3 success .github/scripts/patches/build_rv64_gcc_allmodconfig.sh
conchuod/patch-1-test-4 success .github/scripts/patches/build_rv64_nommu_k210_defconfig.sh
conchuod/patch-1-test-5 success .github/scripts/patches/build_rv64_nommu_virt_defconfig.sh
conchuod/patch-1-test-6 success .github/scripts/patches/checkpatch.sh
conchuod/patch-1-test-7 success .github/scripts/patches/dtb_warn_rv64.sh
conchuod/patch-1-test-8 success .github/scripts/patches/header_inline.sh
conchuod/patch-1-test-9 success .github/scripts/patches/kdoc.sh
conchuod/patch-1-test-10 success .github/scripts/patches/maintainers_patterns.sh
conchuod/patch-1-test-11 success .github/scripts/patches/module_param.sh
conchuod/patch-1-test-12 success .github/scripts/patches/verify_fixes.sh
conchuod/patch-1-test-13 success .github/scripts/patches/verify_signedoff.sh

Commit Message

Song Shuai Sept. 14, 2023, 9:13 a.m. UTC
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")
Signed-off-by: Song Shuai <songshuaishuai@tinylab.org>
---
 arch/riscv/Makefile | 1 -
 1 file changed, 1 deletion(-)

Comments

Palmer Dabbelt Sept. 20, 2023, 9:52 a.m. UTC | #1
On Thu, 14 Sep 2023 02:13:34 PDT (-0700), songshuaishuai@tinylab.org wrote:
> 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")
> Signed-off-by: Song Shuai <songshuaishuai@tinylab.org>
> ---
>  arch/riscv/Makefile | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
> index 1329e060c548..b43a6bb7e4dc 100644
> --- a/arch/riscv/Makefile
> +++ b/arch/riscv/Makefile
> @@ -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

Does this result in any incorrect behavior?  It looks fine to me, but if 
there's no regression I'll put in on -next instead of -fixes.

Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Song Shuai Sept. 20, 2023, 10:04 a.m. UTC | #2
在 2023/9/20 17:52, Palmer Dabbelt 写道:
> On Thu, 14 Sep 2023 02:13:34 PDT (-0700), songshuaishuai@tinylab.org wrote:
>> 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")
>> Signed-off-by: Song Shuai <songshuaishuai@tinylab.org>
>> ---
>>  arch/riscv/Makefile | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
>> index 1329e060c548..b43a6bb7e4dc 100644
>> --- a/arch/riscv/Makefile
>> +++ b/arch/riscv/Makefile
>> @@ -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
> 
> Does this result in any incorrect behavior?  It looks fine to me, but if
Nop, objcopy works as it's expected. You can put this patch on -next.

> there's no regression I'll put in on -next instead of -fixes.
> 
> Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
>
patchwork-bot+linux-riscv@kernel.org Oct. 12, 2023, 8:40 p.m. UTC | #3
Hello:

This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <palmer@rivosinc.com>:

On Thu, 14 Sep 2023 17:13:34 +0800 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [-fixes] riscv: Remove duplicate objcopy flag
    https://git.kernel.org/riscv/c/505b02957e74

You are awesome, thank you!
diff mbox series

Patch

diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index 1329e060c548..b43a6bb7e4dc 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -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