Skip to contentSkip to conversation

arch/sh: vmlinux.scr

PATCH In review Romain Naour 4 participants 9 messages Mar 15, 2020 – Mar 29, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 arch/sh: vmlinux.scr

Since the patch [1], building the kernel using a toolchain built with Binutils 2.33.1 prevent booting a sh4 system under Qemu. Apply the patch provided by Alan Modra [2] that fix alignment of rodata.

[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;hëd2263ba9a9124d93bbc0ece63d7e0fae89b40e
[2] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html

---
 arch/sh/boot/compressed/vmlinux.scr | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sh/boot/compressed/vmlinux.scr +1 -1
index 862d74808236..dd292b4b9082 100644
@@ -1,6 +1,6 @@
 SECTIONS
 {
-  .rodata..compressed : {
+  .rodata..compressed : ALIGN(8) {
 	input_len = .;
 	LONG(input_data_end - input_data) input_data = .;
 	*(.data)
Signature · 1 line
2.24.1
maintainer Acked-by on v1 1/2
#1 lore raw
Quoted 9 lines · Romain Naour

Since the patch [1], building the kernel using a toolchain built with Binutils 2.33.1 prevent booting a sh4 system under Qemu. Apply the patch provided by Alan Modra [2] that fix alignment of rodata.

[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;hëd2263ba9a9124d93bbc0ece63d7e0fae89b40e
[2] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html

Quoted 18 lines
---
 arch/sh/boot/compressed/vmlinux.scr | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sh/boot/compressed/vmlinux.scr +1 -1
index 862d74808236..dd292b4b9082 100644
@@ -1,6 +1,6 @@
 SECTIONS
 {
-  .rodata..compressed : {
+  .rodata..compressed : ALIGN(8) {
 	input_len = .;
 	LONG(input_data_end - input_data) input_data = .;
 	*(.data)
Signature · 1 line
2.24.1
#2 lore raw

PATCH 2/2 include/asm-generic: vmlinux.lds.h

Since the patch [1], building the kernel using a toolchain built with Binutils 2.33.1 prevent booting a sh4 system under Qemu. Apply the patch provided by Alan Modra [2] that fix alignment of rodata.

[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;hëd2263ba9a9124d93bbc0ece63d7e0fae89b40e
[2] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html

---
 include/asm-generic/vmlinux.lds.h | 1 +
 1 file changed, 1 insertion(+)
include/asm-generic/vmlinux.lds.h +1 -0
index e00f41aa8ec4..d46d34b58c96 100644
@@ -374,6 +374,7 @@
  */
 #ifndef RO_AFTER_INIT_DATA
 #define RO_AFTER_INIT_DATA						\
+	. = ALIGN(8);							\
 	__start_ro_after_init = .;					\
 	*(.data..ro_after_init)						\
 	JUMP_TABLE_DATA							\
Signature · 1 line
2.24.1
#3 lore raw

Re: [PATCH 2/2] include/asm-generic: vmlinux.lds.h

CC arnd, linux-arch

Quoted 27 lines · Romain Naour

Since the patch [1], building the kernel using a toolchain built with Binutils 2.33.1 prevent booting a sh4 system under Qemu. Apply the patch provided by Alan Modra [2] that fix alignment of rodata.

[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ebd2263ba9a9124d93bbc0ece63d7e0fae89b40e
[2] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html

---
 include/asm-generic/vmlinux.lds.h | 1 +
 1 file changed, 1 insertion(+)
include/asm-generic/vmlinux.lds.h +1 -1
index e00f41aa8ec4..d46d34b58c96 100644
@@ -374,6 +374,7 @@
  */
 #ifndef RO_AFTER_INIT_DATA
 #define RO_AFTER_INIT_DATA                                             \
+       . = ALIGN(8);                                                   \
        __start_ro_after_init = .;                                      \
        *(.data..ro_after_init)                                         \
        JUMP_TABLE_DATA                                                 \
--

2.24.1

Tested-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] include/asm-generic: vmlinux.lds.h

In reply to Romain Naour
Quoted 19 lines · Romain Naour

Since the patch [1], building the kernel using a toolchain built with Binutils 2.33.1 prevent booting a sh4 system under Qemu. Apply the patch provided by Alan Modra [2] that fix alignment of rodata.

[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;hëd2263ba9a9124d93bbc0ece63d7e0fae89b40e
[2] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html

---
 include/asm-generic/vmlinux.lds.h | 1 +
 1 file changed, 1 insertion(+)
include/asm-generic/vmlinux.lds.h +0 -0
index e00f41aa8ec4..d46d34b58c96 100644

include/asm-generic/vmlinux.lds.h line 380

Quoted 7 lines
include/asm-generic/vmlinux.lds.h +1 -0
@@ -374,6 +374,7 @@
  */
 #ifndef RO_AFTER_INIT_DATA
 #define RO_AFTER_INIT_DATA						\
+	. = ALIGN(8);							\
 	__start_ro_after_init = .;					\
 	*(.data..ro_after_init)						\
 	JUMP_TABLE_DATA							\

This patch and the previous one:

Worked for me with a current musl-cross-make toolchain.

It would be nice if we could get this into 5.6.

Rob

maintainer Acked-by on v1 2/2
#5 lore raw

Re: [PATCH 2/2] include/asm-generic: vmlinux.lds.h

In reply to Romain Naour
Quoted 9 lines · Romain Naour

Since the patch [1], building the kernel using a toolchain built with Binutils 2.33.1 prevent booting a sh4 system under Qemu. Apply the patch provided by Alan Modra [2] that fix alignment of rodata.

[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;hëd2263ba9a9124d93bbc0ece63d7e0fae89b40e
[2] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html

Quoted 18 lines
---
 include/asm-generic/vmlinux.lds.h | 1 +
 1 file changed, 1 insertion(+)
include/asm-generic/vmlinux.lds.h +1 -0
index e00f41aa8ec4..d46d34b58c96 100644
@@ -374,6 +374,7 @@
  */
 #ifndef RO_AFTER_INIT_DATA
 #define RO_AFTER_INIT_DATA						\
+	. = ALIGN(8);							\
 	__start_ro_after_init = .;					\
 	*(.data..ro_after_init)						\
 	JUMP_TABLE_DATA							\
Signature · 1 line
2.24.1
Acked-by on v1 2/2
#6 lore raw

Re: [PATCH 2/2] include/asm-generic: vmlinux.lds.h

In reply to Romain Naour
Quoted 5 lines · Rich Felker
Quoted 4 lines · Romain Naour

Since the patch [1], building the kernel using a toolchain built with Binutils 2.33.1 prevent booting a sh4 system under Qemu. Apply the patch provided by Alan Modra [2] that fix alignment of rodata.

Quoted 7 lines
Quoted 5 lines

[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;hëd2263ba9a9124d93bbc0ece63d7e0fae89b40e
[2] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html

Is there any way to get this into sunday's release?

#7 lore raw

Re: [PATCH 2/2] include/asm-generic: vmlinux.lds.h

In reply to Romain Naour

CC arnd

Quoted 9 lines · Rob Landley
Quoted 8 lines · Rich Felker
Quoted 7 lines · Romain Naour

Since the patch [1], building the kernel using a toolchain built with Binutils 2.33.1 prevent booting a sh4 system under Qemu. Apply the patch provided by Alan Modra [2] that fix alignment of rodata.

[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;hëd2263ba9a9124d93bbc0ece63d7e0fae89b40e
[2] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Is there any way to get this into sunday's release?

Not if the maintainer isn't in CC.

Quoted 1 line

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Acked-by Rich Felker Tested-by Acked-by Rich Felker Tested-by on v1 2/2
#8 lore raw

Re: [PATCH 2/2] include/asm-generic: vmlinux.lds.h

In reply to Romain Naour

Binutils 2.33.1 needs explicit alignment directives or sh kernel won't boot.

https://www.spinics.net/lists/linux-sh/msg56835.html
https://www.spinics.net/lists/linux-sh/msg56836.html

Patches attached, acked by arch maintainer and tested by me.

Quoted 19 lines · Geert Uytterhoeven

CC arnd

Quoted 9 lines · Rob Landley
Quoted 8 lines · Rich Felker
Quoted 7 lines · Romain Naour

Since the patch [1], building the kernel using a toolchain built with Binutils 2.33.1 prevent booting a sh4 system under Qemu. Apply the patch provided by Alan Modra [2] that fix alignment of rodata.

[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ebd2263ba9a9124d93bbc0ece63d7e0fae89b40e
[2] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Is there any way to get this into sunday's release?

Quoted 8 lines

Not if the maintainer isn't in CC.

Quoted 1 line

Gr{oetje,eeting}s,

Geert

[Puppy eyes intensify.]

Rob

From:   Romain Naour <[email protected]>
To:     [email protected]

Cc: Romain Naour <[email protected]>,
Alan Modra <[email protected]>
Subject: [PATCH 1/2] arch/sh: vmlinux.scr
Date: Sun, 15 Mar 2020 18:51:07 +0100
Message-Id: <[email protected]>

Since the patch [1], building the kernel using a toolchain built with Binutils 2.33.1 prevent booting a sh4 system under Qemu. Apply the patch provided by Alan Modra [2] that fix alignment of rodata.

[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ebd2263ba9a9124d93bbc0ece63d7e0fae89b40e
[2] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html

---
 arch/sh/boot/compressed/vmlinux.scr | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sh/boot/compressed/vmlinux.scr +1 -1
index 862d74808236..dd292b4b9082 100644
@@ -1,6 +1,6 @@
 SECTIONS
 {
-  .rodata..compressed : {
+  .rodata..compressed : ALIGN(8) {
 	input_len = .;
 	LONG(input_data_end - input_data) input_data = .;
 	*(.data)
Signature · 1 line
2.24.1
From:   Romain Naour <[email protected]>
To:     [email protected]

Cc: Romain Naour <[email protected]>,
Alan Modra <[email protected]>
Subject: [PATCH 2/2] include/asm-generic: vmlinux.lds.h
Date: Sun, 15 Mar 2020 18:51:08 +0100
Message-Id: <[email protected]>

Since the patch [1], building the kernel using a toolchain built with Binutils 2.33.1 prevent booting a sh4 system under Qemu. Apply the patch provided by Alan Modra [2] that fix alignment of rodata.

[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ebd2263ba9a9124d93bbc0ece63d7e0fae89b40e
[2] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html

---
 include/asm-generic/vmlinux.lds.h | 1 +
 1 file changed, 1 insertion(+)
include/asm-generic/vmlinux.lds.h +1 -0
index e00f41aa8ec4..d46d34b58c96 100644
@@ -374,6 +374,7 @@
  */
 #ifndef RO_AFTER_INIT_DATA
 #define RO_AFTER_INIT_DATA						\
+	. = ALIGN(8);							\
 	__start_ro_after_init = .;					\
 	*(.data..ro_after_init)						\
 	JUMP_TABLE_DATA							\
Signature · 1 line
2.24.1