Skip to contentSkip to conversation

kernel: Assembly: need add prefix for h8300 architecture.

PATCH In review Chen Gang 2 participants 8 messages Aug 26, 2013 – Aug 27, 2013 Kbuild

lore
Share & tools
lore

Chen Gang

author
#0 lore raw

PATCH 1/1 kernel: Assembly: need add prefix for h8300 architecture.

Need add related prefix for h8300, or can not pass compiling by the latest linker.

The related error (allmodconfig for h8300):

/usr/local/bin/h8300-gchen-elf-ld: h8300 architecture of input file usr/initramfs_data.o' is incompatible with h8300h output /usr/local/bin/h8300-gchen-elf-ld: h8300 architecture of input file kernel/modsign_certificate.o' is incompatible with h8300h output

The cross-compiler's information:

[root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-ld -v
GNU ld (GNU Binutils) 2.22
[root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-as -v
GNU assembler version 2.22 (h8300-gchen-elf) using BFD version (GNU Binutils) 2.22

  [root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-gcc -v
  Using built-in specs.
  COLLECT_GCC=/usr/local/bin/h8300-gchen-elf-gcc
  COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/h8300-gchen-elf/4.8.0/lto-wrapper
  Target: h8300-gchen-elf
  Configured with: ../gcc-4.8.0/configure --target=h8300-gchen-elf --without-header --disable-nls --enable-language=c --disable-threads --disable-shared --enable-werror=no
  Thread model: single
  gcc version 4.8.0 (GCC) 
---
 kernel/modsign_certificate.S |    7 +++++++
 usr/initramfs_data.S         |    7 +++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
kernel/modsign_certificate.S +7 -0
index 4a9a86d..d24acac 100644
@@ -1,5 +1,12 @@
 #include <linux/export.h>
 
+#if defined(CONFIG_CPU_H8300H)
+	.h8300h
+#endif
+#if defined(CONFIG_CPU_H8S)
+	.h8300s
+#endif
+
 #define GLOBAL(name)	\
 	.globl VMLINUX_SYMBOL(name);	\
 	VMLINUX_SYMBOL(name):
usr/initramfs_data.S +7 -0
index c14322d..6a6c106 100644
@@ -24,6 +24,13 @@
 #include <linux/stringify.h>
 #include <asm-generic/vmlinux.lds.h>
 
+#if defined(CONFIG_CPU_H8300H)
+	.h8300h
+#endif
+#if defined(CONFIG_CPU_H8S)
+	.h8300s
+#endif
+
 .section .init.ramfs,"a"
 __irf_start:
 .incbin __stringify(INITRAMFS_IMAGE)
Signature · 1 line
1.7.7.6
author
#1 lore raw

If this implementation is correct, the implementation still can be improved (at least, it is not quite well to hard code the architecture related code in "kernel/" and "usr/" sub-directory).

But it seems, I have no right to add or move files, so welcome any members help do it.

And welcome any additional suggestions or completions.

Thanks.

Quoted 67 lines · Chen Gang

Need add related prefix for h8300, or can not pass compiling by the latest linker.

The related error (allmodconfig for h8300):

/usr/local/bin/h8300-gchen-elf-ld: h8300 architecture of input file usr/initramfs_data.o' is incompatible with h8300h output /usr/local/bin/h8300-gchen-elf-ld: h8300 architecture of input file kernel/modsign_certificate.o' is incompatible with h8300h output

The cross-compiler's information:

[root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-ld -v
GNU ld (GNU Binutils) 2.22
[root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-as -v
GNU assembler version 2.22 (h8300-gchen-elf) using BFD version (GNU Binutils) 2.22

  [root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-gcc -v
  Using built-in specs.
  COLLECT_GCC=/usr/local/bin/h8300-gchen-elf-gcc
  COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/h8300-gchen-elf/4.8.0/lto-wrapper
  Target: h8300-gchen-elf
  Configured with: ../gcc-4.8.0/configure --target=h8300-gchen-elf --without-header --disable-nls --enable-language=c --disable-threads --disable-shared --enable-werror=no
  Thread model: single
  gcc version 4.8.0 (GCC) 
---
 kernel/modsign_certificate.S |    7 +++++++
 usr/initramfs_data.S         |    7 +++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
kernel/modsign_certificate.S +7 -0
index 4a9a86d..d24acac 100644
@@ -1,5 +1,12 @@
 #include <linux/export.h>
 
+#if defined(CONFIG_CPU_H8300H)
+	.h8300h
+#endif
+#if defined(CONFIG_CPU_H8S)
+	.h8300s
+#endif
+
 #define GLOBAL(name)	\
 	.globl VMLINUX_SYMBOL(name);	\
 	VMLINUX_SYMBOL(name):
usr/initramfs_data.S +7 -0
index c14322d..6a6c106 100644
@@ -24,6 +24,13 @@
 #include <linux/stringify.h>
 #include <asm-generic/vmlinux.lds.h>
 
+#if defined(CONFIG_CPU_H8300H)
+	.h8300h
+#endif
+#if defined(CONFIG_CPU_H8S)
+	.h8300s
+#endif
+
 .section .init.ramfs,"a"
 __irf_start:
 .incbin __stringify(INITRAMFS_IMAGE)
Signature · 1 line
Chen Gang
author
#2 lore raw
Quoted 8 lines · Chen Gang

If this implementation is correct, the implementation still can be improved (at least, it is not quite well to hard code the architecture related code in "kernel/" and "usr/" sub-directory).

But it seems, I have no right to add or move files, so welcome any members help do it.

Sorry, what I said above ("...have no right...") is not quite precise:

it is only my current feelings, maybe misunderstand something. also maybe can find better fixing ways more than "add or move files".

Thanks.

Quoted 74 lines

And welcome any additional suggestions or completions.

Thanks.

Quoted 67 lines · Chen Gang

Need add related prefix for h8300, or can not pass compiling by the latest linker.

The related error (allmodconfig for h8300):

/usr/local/bin/h8300-gchen-elf-ld: h8300 architecture of input file usr/initramfs_data.o' is incompatible with h8300h output /usr/local/bin/h8300-gchen-elf-ld: h8300 architecture of input file kernel/modsign_certificate.o' is incompatible with h8300h output

The cross-compiler's information:

[root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-ld -v
GNU ld (GNU Binutils) 2.22
[root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-as -v
GNU assembler version 2.22 (h8300-gchen-elf) using BFD version (GNU Binutils) 2.22

  [root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-gcc -v
  Using built-in specs.
  COLLECT_GCC=/usr/local/bin/h8300-gchen-elf-gcc
  COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/h8300-gchen-elf/4.8.0/lto-wrapper
  Target: h8300-gchen-elf
  Configured with: ../gcc-4.8.0/configure --target=h8300-gchen-elf --without-header --disable-nls --enable-language=c --disable-threads --disable-shared --enable-werror=no
  Thread model: single
  gcc version 4.8.0 (GCC) 
---
 kernel/modsign_certificate.S |    7 +++++++
 usr/initramfs_data.S         |    7 +++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
kernel/modsign_certificate.S +7 -0
index 4a9a86d..d24acac 100644
@@ -1,5 +1,12 @@
 #include <linux/export.h>
 
+#if defined(CONFIG_CPU_H8300H)
+	.h8300h
+#endif
+#if defined(CONFIG_CPU_H8S)
+	.h8300s
+#endif
+
 #define GLOBAL(name)	\
 	.globl VMLINUX_SYMBOL(name);	\
 	VMLINUX_SYMBOL(name):
usr/initramfs_data.S +7 -0
index c14322d..6a6c106 100644
@@ -24,6 +24,13 @@
 #include <linux/stringify.h>
 #include <asm-generic/vmlinux.lds.h>
 
+#if defined(CONFIG_CPU_H8300H)
+	.h8300h
+#endif
+#if defined(CONFIG_CPU_H8S)
+	.h8300s
+#endif
+
 .section .init.ramfs,"a"
 __irf_start:
 .incbin __stringify(INITRAMFS_IMAGE)
Signature · 1 line
Chen Gang
author
#3 lore raw

After check binutils-2.22 source code, can pass "-no-warn-mismatch" to 'ld' to avoid this error.

I will send patch v2 for it.

:-)

Quoted 94 lines · Chen Gang
Quoted 8 lines · Chen Gang

If this implementation is correct, the implementation still can be improved (at least, it is not quite well to hard code the architecture related code in "kernel/" and "usr/" sub-directory).

But it seems, I have no right to add or move files, so welcome any members help do it.

Sorry, what I said above ("...have no right...") is not quite precise:

it is only my current feelings, maybe misunderstand something. also maybe can find better fixing ways more than "add or move files".

Thanks.

Quoted 74 lines

And welcome any additional suggestions or completions.

Thanks.

Quoted 67 lines · Chen Gang

Need add related prefix for h8300, or can not pass compiling by the latest linker.

The related error (allmodconfig for h8300):

/usr/local/bin/h8300-gchen-elf-ld: h8300 architecture of input file usr/initramfs_data.o' is incompatible with h8300h output /usr/local/bin/h8300-gchen-elf-ld: h8300 architecture of input file kernel/modsign_certificate.o' is incompatible with h8300h output

The cross-compiler's information:

[root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-ld -v
GNU ld (GNU Binutils) 2.22
[root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-as -v
GNU assembler version 2.22 (h8300-gchen-elf) using BFD version (GNU Binutils) 2.22

  [root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-gcc -v
  Using built-in specs.
  COLLECT_GCC=/usr/local/bin/h8300-gchen-elf-gcc
  COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/h8300-gchen-elf/4.8.0/lto-wrapper
  Target: h8300-gchen-elf
  Configured with: ../gcc-4.8.0/configure --target=h8300-gchen-elf --without-header --disable-nls --enable-language=c --disable-threads --disable-shared --enable-werror=no
  Thread model: single
  gcc version 4.8.0 (GCC) 
---
 kernel/modsign_certificate.S |    7 +++++++
 usr/initramfs_data.S         |    7 +++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
kernel/modsign_certificate.S +7 -0
index 4a9a86d..d24acac 100644
@@ -1,5 +1,12 @@
 #include <linux/export.h>
 
+#if defined(CONFIG_CPU_H8300H)
+	.h8300h
+#endif
+#if defined(CONFIG_CPU_H8S)
+	.h8300s
+#endif
+
 #define GLOBAL(name)	\
 	.globl VMLINUX_SYMBOL(name);	\
 	VMLINUX_SYMBOL(name):
usr/initramfs_data.S +7 -0
index c14322d..6a6c106 100644
@@ -24,6 +24,13 @@
 #include <linux/stringify.h>
 #include <asm-generic/vmlinux.lds.h>
 
+#if defined(CONFIG_CPU_H8300H)
+	.h8300h
+#endif
+#if defined(CONFIG_CPU_H8S)
+	.h8300s
+#endif
+
 .section .init.ramfs,"a"
 __irf_start:
 .incbin __stringify(INITRAMFS_IMAGE)
Signature · 1 line
Chen Gang
author
#4 lore raw

PATCH v2 1/1 h8300: Makefile: add "-no-warn-mismatch" to linker to avoid linking error.

Need add "-no-warn-mismatch" to avoid the linking error, or assembly files which are outside of the "arch/h8300" can not pass compiling.

The related error (allmodconfig for h8300):

/usr/local/bin/h8300-gchen-elf-ld: h8300 architecture of input file usr/initramfs_data.o' is incompatible with h8300h output /usr/local/bin/h8300-gchen-elf-ld: h8300 architecture of input file kernel/modsign_certificate.o' is incompatible with h8300h output

The cross-compiler's information:

[root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-ld -v
GNU ld (GNU Binutils) 2.22
[root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-as -v
GNU assembler version 2.22 (h8300-gchen-elf) using BFD version (GNU Binutils) 2.22

  [root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-gcc -v
  Using built-in specs.
  COLLECT_GCC=/usr/local/bin/h8300-gchen-elf-gcc
  COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/h8300-gchen-elf/4.8.0/lto-wrapper
  Target: h8300-gchen-elf
  Configured with: ../gcc-4.8.0/configure --target=h8300-gchen-elf --without-header --disable-nls --enable-language=c --disable-threads --disable-shared --enable-werror=no
  Thread model: single
  gcc version 4.8.0 (GCC)
---
 arch/h8300/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/h8300/Makefile +1 -1
index a556447..3ad1369 100644
@@ -26,7 +26,7 @@ model-$(CONFIG_ROMKERNEL)	:= rom
 MODEL := $(model-y)
 
 cflags-$(CONFIG_CPU_H8300H)	:= -mh
-ldflags-$(CONFIG_CPU_H8300H)	:= -mh8300helf
+ldflags-$(CONFIG_CPU_H8300H)	:= -mh8300helf -no-warn-mismatch
 cflags-$(CONFIG_CPU_H8S)	:= -ms
 ldflags-$(CONFIG_CPU_H8S)	:= -mh8300self
 
Signature · 1 line
1.7.7.6
#5 lore raw
In reply to Chen Gang
Quoted 8 lines · Chen Gang

If this implementation is correct, the implementation still can be improved (at least, it is not quite well to hard code the architecture related code in "kernel/" and "usr/" sub-directory).

But it seems, I have no right to add or move files, so welcome any members help do it.

And welcome any additional suggestions or completions.

Hmm, how about something like:

#ifdef CONFIG_ARCH_ASM_INCBIN_NEEDS_PREFIX
#include <asm/incbin_prefix.h>
ASM_INCBIN_PREFIX
#endif /* ARCH_ASM_INCBIN_NEEDS_PREFIX */

Then h8300 can define ARCH_ASM_INCBIN_NEEDS_PREFIX in Kconfig and define ASM_INCBIN_PREFIX in arch/h8300/include/asm/incbin_prefix.h?

Cheers,
Rusty.

Quoted 72 lines · Chen Gang
Quoted 67 lines

Need add related prefix for h8300, or can not pass compiling by the latest linker.

The related error (allmodconfig for h8300):

/usr/local/bin/h8300-gchen-elf-ld: h8300 architecture of input file usr/initramfs_data.o' is incompatible with h8300h output /usr/local/bin/h8300-gchen-elf-ld: h8300 architecture of input file kernel/modsign_certificate.o' is incompatible with h8300h output

The cross-compiler's information:

[root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-ld -v
GNU ld (GNU Binutils) 2.22
[root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-as -v
GNU assembler version 2.22 (h8300-gchen-elf) using BFD version (GNU Binutils) 2.22

  [root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-gcc -v
  Using built-in specs.
  COLLECT_GCC=/usr/local/bin/h8300-gchen-elf-gcc
  COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/h8300-gchen-elf/4.8.0/lto-wrapper
  Target: h8300-gchen-elf
  Configured with: ../gcc-4.8.0/configure --target=h8300-gchen-elf --without-header --disable-nls --enable-language=c --disable-threads --disable-shared --enable-werror=no
  Thread model: single
  gcc version 4.8.0 (GCC) 
---
 kernel/modsign_certificate.S |    7 +++++++
 usr/initramfs_data.S         |    7 +++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
kernel/modsign_certificate.S +7 -0
index 4a9a86d..d24acac 100644
@@ -1,5 +1,12 @@
 #include <linux/export.h>
 
+#if defined(CONFIG_CPU_H8300H)
+	.h8300h
+#endif
+#if defined(CONFIG_CPU_H8S)
+	.h8300s
+#endif
+
 #define GLOBAL(name)	\
 	.globl VMLINUX_SYMBOL(name);	\
 	VMLINUX_SYMBOL(name):
usr/initramfs_data.S +7 -0
index c14322d..6a6c106 100644
@@ -24,6 +24,13 @@
 #include <linux/stringify.h>
 #include <asm-generic/vmlinux.lds.h>
 
+#if defined(CONFIG_CPU_H8300H)
+	.h8300h
+#endif
+#if defined(CONFIG_CPU_H8S)
+	.h8300s
+#endif
+
 .section .init.ramfs,"a"
 __irf_start:
 .incbin __stringify(INITRAMFS_IMAGE)
Signature · 1 line
Chen Gang
author
#6 lore raw
Quoted 12 lines · Rusty Russell
Quoted 8 lines · Chen Gang

If this implementation is correct, the implementation still can be improved (at least, it is not quite well to hard code the architecture related code in "kernel/" and "usr/" sub-directory).

But it seems, I have no right to add or move files, so welcome any members help do it.

And welcome any additional suggestions or completions.

Hmm, how about something like:

Quoted 8 lines

#ifdef CONFIG_ARCH_ASM_INCBIN_NEEDS_PREFIX
#include <asm/incbin_prefix.h>
ASM_INCBIN_PREFIX
#endif /* ARCH_ASM_INCBIN_NEEDS_PREFIX */

Then h8300 can define ARCH_ASM_INCBIN_NEEDS_PREFIX in Kconfig and define ASM_INCBIN_PREFIX in arch/h8300/include/asm/incbin_prefix.h?

Thank you for your reply firstly, I think your way is OK (valuable to continue think of the details implementation).

And excuse me, I continued replying multiple times for this thread (I am just continue improving it).

Current status:

after check the binutils-2.22 source code, we know if use "-no-warn-mismatch" for 'ld', it can avoid this issue.

and also for another 'ld' issue (which I occurs but not send mail), need use "-accept-unknown-input-arch" for 'ld':
"Relocatable linking with relocations from format elf32-h8300 (firmware/keyspan/mpr.fw.gen.o) to format elf32-h8300 (firmware/built-in.o) is not supported"

... maybe find more issues during compiling with 'allmodconfig'.

My opinion:

if h8300 is still one of important architecture, we need try to "let our binary match 'ld'" else just use skipping parameters is OK.

In my current feeling, h8300 is not one of important architecture, so I choose 2nd.

Welcome additional suggestion or completions.

Thanks.

Quoted 77 lines

Cheers,
Rusty.

Quoted 72 lines · Chen Gang
Quoted 67 lines

Need add related prefix for h8300, or can not pass compiling by the latest linker.

The related error (allmodconfig for h8300):

/usr/local/bin/h8300-gchen-elf-ld: h8300 architecture of input file usr/initramfs_data.o' is incompatible with h8300h output /usr/local/bin/h8300-gchen-elf-ld: h8300 architecture of input file kernel/modsign_certificate.o' is incompatible with h8300h output

The cross-compiler's information:

[root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-ld -v
GNU ld (GNU Binutils) 2.22
[root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-as -v
GNU assembler version 2.22 (h8300-gchen-elf) using BFD version (GNU Binutils) 2.22

  [root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-gcc -v
  Using built-in specs.
  COLLECT_GCC=/usr/local/bin/h8300-gchen-elf-gcc
  COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/h8300-gchen-elf/4.8.0/lto-wrapper
  Target: h8300-gchen-elf
  Configured with: ../gcc-4.8.0/configure --target=h8300-gchen-elf --without-header --disable-nls --enable-language=c --disable-threads --disable-shared --enable-werror=no
  Thread model: single
  gcc version 4.8.0 (GCC) 
---
 kernel/modsign_certificate.S |    7 +++++++
 usr/initramfs_data.S         |    7 +++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
kernel/modsign_certificate.S +7 -0
index 4a9a86d..d24acac 100644
@@ -1,5 +1,12 @@
 #include <linux/export.h>
 
+#if defined(CONFIG_CPU_H8300H)
+	.h8300h
+#endif
+#if defined(CONFIG_CPU_H8S)
+	.h8300s
+#endif
+
 #define GLOBAL(name)	\
 	.globl VMLINUX_SYMBOL(name);	\
 	VMLINUX_SYMBOL(name):
usr/initramfs_data.S +7 -0
index c14322d..6a6c106 100644
@@ -24,6 +24,13 @@
 #include <linux/stringify.h>
 #include <asm-generic/vmlinux.lds.h>
 
+#if defined(CONFIG_CPU_H8300H)
+	.h8300h
+#endif
+#if defined(CONFIG_CPU_H8S)
+	.h8300s
+#endif
+
 .section .init.ramfs,"a"
 __irf_start:
 .incbin __stringify(INITRAMFS_IMAGE)
Signature · 1 line
Chen Gang
Signature · 1 line
Chen Gang
author
#7 lore raw
Quoted 18 lines · Chen Gang
Quoted 17 lines · Rusty Russell
Quoted 8 lines · Chen Gang

If this implementation is correct, the implementation still can be improved (at least, it is not quite well to hard code the architecture related code in "kernel/" and "usr/" sub-directory).

But it seems, I have no right to add or move files, so welcome any members help do it.

And welcome any additional suggestions or completions.

Hmm, how about something like:

#ifdef CONFIG_ARCH_ASM_INCBIN_NEEDS_PREFIX
#include <asm/incbin_prefix.h>
ASM_INCBIN_PREFIX
#endif /* ARCH_ASM_INCBIN_NEEDS_PREFIX */

Quoted 7 lines
Quoted 3 lines

Then h8300 can define ARCH_ASM_INCBIN_NEEDS_PREFIX in Kconfig and define ASM_INCBIN_PREFIX in arch/h8300/include/asm/incbin_prefix.h?

Thank you for your reply firstly, I think your way is OK (valuable to continue think of the details implementation).

The final result is: we have to use this way (mark 'h8300h' explicitly) to fix this issue. (build-in.o requires "h8300h", but the default value of the ".S" files are "h8300").

"-no-warn-mismatch" and "-accept-unknown-input-arch" have no effect with the same issue under firmware sub-directory (after reading 'ld' code, we know there are additional stricter checking for it).

After let 'h8300' pass allmodconfig, I will send patch v3 (may need some days for waiting gcc issues).

Welcome any additional suggestions or completions (especially for modifying the firmware files, I have no experience for it).

Thanks.

Quoted 106 lines

And excuse me, I continued replying multiple times for this thread (I am just continue improving it).

Current status:

after check the binutils-2.22 source code, we know if use "-no-warn-mismatch" for 'ld', it can avoid this issue.

and also for another 'ld' issue (which I occurs but not send mail), need use "-accept-unknown-input-arch" for 'ld':
"Relocatable linking with relocations from format elf32-h8300 (firmware/keyspan/mpr.fw.gen.o) to format elf32-h8300 (firmware/built-in.o) is not supported"

... maybe find more issues during compiling with 'allmodconfig'.

My opinion:

if h8300 is still one of important architecture, we need try to "let our binary match 'ld'" else just use skipping parameters is OK.

In my current feeling, h8300 is not one of important architecture, so I choose 2nd.

Welcome additional suggestion or completions.

Thanks.

Quoted 77 lines

Cheers,
Rusty.

Quoted 72 lines · Chen Gang
Quoted 67 lines

Need add related prefix for h8300, or can not pass compiling by the latest linker.

The related error (allmodconfig for h8300):

/usr/local/bin/h8300-gchen-elf-ld: h8300 architecture of input file usr/initramfs_data.o' is incompatible with h8300h output /usr/local/bin/h8300-gchen-elf-ld: h8300 architecture of input file kernel/modsign_certificate.o' is incompatible with h8300h output

The cross-compiler's information:

[root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-ld -v
GNU ld (GNU Binutils) 2.22
[root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-as -v
GNU assembler version 2.22 (h8300-gchen-elf) using BFD version (GNU Binutils) 2.22

  [root@dhcp122 linux-next]# /usr/local/bin/h8300-gchen-elf-gcc -v
  Using built-in specs.
  COLLECT_GCC=/usr/local/bin/h8300-gchen-elf-gcc
  COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/h8300-gchen-elf/4.8.0/lto-wrapper
  Target: h8300-gchen-elf
  Configured with: ../gcc-4.8.0/configure --target=h8300-gchen-elf --without-header --disable-nls --enable-language=c --disable-threads --disable-shared --enable-werror=no
  Thread model: single
  gcc version 4.8.0 (GCC) 
---
 kernel/modsign_certificate.S |    7 +++++++
 usr/initramfs_data.S         |    7 +++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
kernel/modsign_certificate.S +7 -0
index 4a9a86d..d24acac 100644
@@ -1,5 +1,12 @@
 #include <linux/export.h>
 
+#if defined(CONFIG_CPU_H8300H)
+	.h8300h
+#endif
+#if defined(CONFIG_CPU_H8S)
+	.h8300s
+#endif
+
 #define GLOBAL(name)	\
 	.globl VMLINUX_SYMBOL(name);	\
 	VMLINUX_SYMBOL(name):
usr/initramfs_data.S +7 -0
index c14322d..6a6c106 100644
@@ -24,6 +24,13 @@
 #include <linux/stringify.h>
 #include <asm-generic/vmlinux.lds.h>
 
+#if defined(CONFIG_CPU_H8300H)
+	.h8300h
+#endif
+#if defined(CONFIG_CPU_H8S)
+	.h8300s
+#endif
+
 .section .init.ramfs,"a"
 __irf_start:
 .incbin __stringify(INITRAMFS_IMAGE)
Signature · 1 line
Chen Gang
Signature · 1 line
Chen Gang