Skip to content

Commit

Permalink
riscv: Remove duplicate objcopy flag
Browse files Browse the repository at this point in the history
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: c0fbcd9 ("RISC-V: Build flat and compressed kernel images")
Signed-off-by: Song Shuai <songshuaishuai@tinylab.org>
Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
  • Loading branch information
Song Shuai authored and Björn Töpel committed Oct 12, 2023
1 parent 9750295 commit ba00a10
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion arch/riscv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ba00a10

Please sign in to comment.