* [Suggestion] sh64: kernel: about the warning: "unexpected non-allocatable section".
@ 2013-07-30 2:15 Chen Gang
2013-07-30 6:09 ` Chen Gang
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Chen Gang @ 2013-07-30 2:15 UTC (permalink / raw)
To: linux-sh
Hello Maintainers:
When I build sh64 with allmodconfig (without "EXTRA_CFLAGS=-W"), it
report the warnings below:
LD arch/sh/kernel/cpu/sh5/built-in.o
WARNING: arch/sh/kernel/cpu/sh5/built-in.o (.cranges): unexpected non-allocatable section.
Did you forget to use "ax"/"aw" in a .S file?
Note that for example <linux/init.h> contains
section definitions for use in .S files.
Can it cause real world issue ?
Welcome any members suggestions or completions.
Thanks.
--
Chen Gang.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Suggestion] sh64: kernel: about the warning: "unexpected non-allocatable section".
2013-07-30 2:15 [Suggestion] sh64: kernel: about the warning: "unexpected non-allocatable section" Chen Gang
@ 2013-07-30 6:09 ` Chen Gang
2013-07-30 6:11 ` Chen Gang
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Chen Gang @ 2013-07-30 6:09 UTC (permalink / raw)
To: linux-sh
For sh, it will report error below:
[root@dhcp122 linux-next]# make ARCH=sh CROSS_COMPILE=sh-linux-gnu-
CC scripts/mod/empty.o
as: unrecognized option '-little'
make[2]: *** [scripts/mod/empty.o] Error 2
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
The related binutils information:
[root@dhcp122 build-binutils-or32]# rpm -qf /usr/bin/sh-linux-gnu-ld
binutils-sh-linux-gnu-2.23.51.0.3-1.fc17.x86_64
[root@dhcp122 build-binutils-or32]# rpm -qf /usr/bin/sh-linux-gnu-as
binutils-sh-linux-gnu-2.23.51.0.3-1.fc17.x86_64
Is it the binutils's issue ? is the warnings below is the binutils's
issue too? (now, I am downloading related tool chain source code of SH,
and will try again).
Thanks.
On 07/30/2013 10:15 AM, Chen Gang wrote:
> Hello Maintainers:
>
> When I build sh64 with allmodconfig (without "EXTRA_CFLAGS=-W"), it
> report the warnings below:
>
> LD arch/sh/kernel/cpu/sh5/built-in.o
> WARNING: arch/sh/kernel/cpu/sh5/built-in.o (.cranges): unexpected non-allocatable section.
> Did you forget to use "ax"/"aw" in a .S file?
> Note that for example <linux/init.h> contains
> section definitions for use in .S files.
>
> Can it cause real world issue ?
>
> Welcome any members suggestions or completions.
>
>
> Thanks.
> --
> Chen Gang.
>
--
Chen Gang
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Suggestion] sh64: kernel: about the warning: "unexpected non-allocatable section".
2013-07-30 2:15 [Suggestion] sh64: kernel: about the warning: "unexpected non-allocatable section" Chen Gang
2013-07-30 6:09 ` Chen Gang
@ 2013-07-30 6:11 ` Chen Gang
2013-07-31 7:38 ` Chen Gang
2013-08-01 5:58 ` Chen Gang
3 siblings, 0 replies; 5+ messages in thread
From: Chen Gang @ 2013-07-30 6:11 UTC (permalink / raw)
To: linux-sh
On 07/30/2013 02:09 PM, Chen Gang wrote:
>
> For sh, it will report error below:
>
> [root@dhcp122 linux-next]# make ARCH=sh CROSS_COMPILE=sh-linux-gnu-
> CC scripts/mod/empty.o
> as: unrecognized option '-little'
> make[2]: *** [scripts/mod/empty.o] Error 2
> make[1]: *** [scripts/mod] Error 2
> make: *** [scripts] Error 2
>
> The related binutils information:
>
> [root@dhcp122 build-binutils-or32]# rpm -qf /usr/bin/sh-linux-gnu-ld
> binutils-sh-linux-gnu-2.23.51.0.3-1.fc17.x86_64
> [root@dhcp122 build-binutils-or32]# rpm -qf /usr/bin/sh-linux-gnu-as
> binutils-sh-linux-gnu-2.23.51.0.3-1.fc17.x86_64
>
OH, sorry, for sh64, the related information is
[root@dhcp122 build-binutils-or32]# rpm -qf /usr/bin/sh64-linux-gnu-as
binutils-sh64-linux-gnu-2.23.51.0.3-1.fc17.x86_64
>
> Is it the binutils's issue ? is the warnings below is the binutils's
> issue too? (now, I am downloading related tool chain source code of SH,
> and will try again).
>
>
> Thanks.
>
> On 07/30/2013 10:15 AM, Chen Gang wrote:
>> Hello Maintainers:
>>
>> When I build sh64 with allmodconfig (without "EXTRA_CFLAGS=-W"), it
>> report the warnings below:
>>
>> LD arch/sh/kernel/cpu/sh5/built-in.o
>> WARNING: arch/sh/kernel/cpu/sh5/built-in.o (.cranges): unexpected non-allocatable section.
>> Did you forget to use "ax"/"aw" in a .S file?
>> Note that for example <linux/init.h> contains
>> section definitions for use in .S files.
>>
>> Can it cause real world issue ?
>>
>> Welcome any members suggestions or completions.
>>
>>
>> Thanks.
>> --
>> Chen Gang.
>>
>
>
--
Chen Gang
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Suggestion] sh64: kernel: about the warning: "unexpected non-allocatable section".
2013-07-30 2:15 [Suggestion] sh64: kernel: about the warning: "unexpected non-allocatable section" Chen Gang
2013-07-30 6:09 ` Chen Gang
2013-07-30 6:11 ` Chen Gang
@ 2013-07-31 7:38 ` Chen Gang
2013-08-01 5:58 ` Chen Gang
3 siblings, 0 replies; 5+ messages in thread
From: Chen Gang @ 2013-07-31 7:38 UTC (permalink / raw)
To: linux-sh
On 07/30/2013 02:11 PM, Chen Gang wrote:
> On 07/30/2013 02:09 PM, Chen Gang wrote:
>>
>> For sh, it will report error below:
>>
>> [root@dhcp122 linux-next]# make ARCH=sh CROSS_COMPILE=sh-linux-gnu-
>> CC scripts/mod/empty.o
>> as: unrecognized option '-little'
>> make[2]: *** [scripts/mod/empty.o] Error 2
>> make[1]: *** [scripts/mod] Error 2
>> make: *** [scripts] Error 2
>>
>> The related binutils information:
>>
>> [root@dhcp122 build-binutils-or32]# rpm -qf /usr/bin/sh-linux-gnu-ld
>> binutils-sh-linux-gnu-2.23.51.0.3-1.fc17.x86_64
>> [root@dhcp122 build-binutils-or32]# rpm -qf /usr/bin/sh-linux-gnu-as
>> binutils-sh-linux-gnu-2.23.51.0.3-1.fc17.x86_64
>>
>
It is really the original sh-linux-gnu- compiler's issue (not only for
allmodconfig, but also for sh own config files).
With my new build cross-compiler, It can work for sh architecture own
config files, but can not work with allmodconfig (I will analyze it).
The cross-tools which I build is:
[root@dhcp122 linux-next]# sh3-gchen-linux-gnu-ld -v
GNU ld (crosstool-NG hg+unknown-20130731.103227) 2.22
[root@dhcp122 linux-next]# sh3-gchen-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=sh3-gchen-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/gchen/x-tools/sh3-gchen-linux-gnu/bin/../libexec/gcc/sh3-gchen-linux-gnu/4.8.0/lto-wrapper
Target: sh3-gchen-linux-gnu
Configured with: /root/src/toolchain_sh/crosstool-ng-2685dfa9de14/.build/src/gcc-4.8.0/configure --build=x86_64-build_unknown-linux-gnu --host=x86_64-build_unknown-linux-gnu --target=sh3-gchen-linux-gnu --prefix=/root/src/toolchain_sh/crosstool-ng-2685dfa9de14/.build/sh3-gchen-linux-gnu/buildtools --with-local-prefix=/home/gchen/x-tools/sh3-gchen-linux-gnu/sh3-gchen-linux-gnu/sysroot --disable-libmudflap --with-sysroot=/home/gchen/x-tools/sh3-gchen-linux-gnu/sh3-gchen-linux-gnu/sysroot --enable-shared --with-pkgversion='crosstool-NG hg+unknown-20130731.103227' --enable-__cxa_atexit --with-gmp=/root/src/toolchain_sh/crosstool-ng-2685dfa9de14/.build/sh3-gchen-linux-gnu/buildtools --with-mpfr=/root/src/toolchain_sh/crosstool-ng-2685dfa9de14/.build/sh3-gchen-linux-gnu/buildtools --with-mpc=/root/src/toolchain_sh/crosstool-ng-2685dfa9de14/.build/sh3-gchen-linux-gnu/buildtools --with-isl=/root/src/toolchain_sh/crosstool-ng-2685dfa9de14/.build/sh3-gchen-linux-gnu/buildtools --with-c
loog=/roo
t/src/toolchain_sh/crosstool-ng-2685dfa9de14/.build/sh3-gchen-linux-gnu/buildtools --with-libelf=/root/src/toolchain_sh/crosstool-ng-2685dfa9de14/.build/sh3-gchen-linux-gnu/buildtools --enable-lto --enable-target-optspace --disable-libgomp --disable-libmudflap --disable-nls --disable-multilib --enable-languages=c
Thread model: posix
gcc version 4.8.0 (crosstool-NG hg+unknown-20130731.103227)
Next, I will make a confirmation for sh64 compiler whether is OK or not.
Welcome any members' suggestions or completions.
Thanks.
> OH, sorry, for sh64, the related information is
>
> [root@dhcp122 build-binutils-or32]# rpm -qf /usr/bin/sh64-linux-gnu-as
> binutils-sh64-linux-gnu-2.23.51.0.3-1.fc17.x86_64
>
>
>>
>> Is it the binutils's issue ? is the warnings below is the binutils's
>> issue too? (now, I am downloading related tool chain source code of SH,
>> and will try again).
>>
>>
>> Thanks.
>>
>> On 07/30/2013 10:15 AM, Chen Gang wrote:
>>> Hello Maintainers:
>>>
>>> When I build sh64 with allmodconfig (without "EXTRA_CFLAGS=-W"), it
>>> report the warnings below:
>>>
>>> LD arch/sh/kernel/cpu/sh5/built-in.o
>>> WARNING: arch/sh/kernel/cpu/sh5/built-in.o (.cranges): unexpected non-allocatable section.
>>> Did you forget to use "ax"/"aw" in a .S file?
>>> Note that for example <linux/init.h> contains
>>> section definitions for use in .S files.
>>>
>>> Can it cause real world issue ?
>>>
>>> Welcome any members suggestions or completions.
>>>
>>>
>>> Thanks.
>>> --
>>> Chen Gang.
>>>
>>
>>
>
>
--
Chen Gang
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Suggestion] sh64: kernel: about the warning: "unexpected non-allocatable section".
2013-07-30 2:15 [Suggestion] sh64: kernel: about the warning: "unexpected non-allocatable section" Chen Gang
` (2 preceding siblings ...)
2013-07-31 7:38 ` Chen Gang
@ 2013-08-01 5:58 ` Chen Gang
3 siblings, 0 replies; 5+ messages in thread
From: Chen Gang @ 2013-08-01 5:58 UTC (permalink / raw)
To: linux-sh
On 07/31/2013 03:38 PM, Chen Gang wrote:
> On 07/30/2013 02:11 PM, Chen Gang wrote:
>> On 07/30/2013 02:09 PM, Chen Gang wrote:
>>>
>>> For sh, it will report error below:
>>>
>>> [root@dhcp122 linux-next]# make ARCH=sh CROSS_COMPILE=sh-linux-gnu-
>>> CC scripts/mod/empty.o
>>> as: unrecognized option '-little'
>>> make[2]: *** [scripts/mod/empty.o] Error 2
>>> make[1]: *** [scripts/mod] Error 2
>>> make: *** [scripts] Error 2
>>>
>>> The related binutils information:
>>>
>>> [root@dhcp122 build-binutils-or32]# rpm -qf /usr/bin/sh-linux-gnu-ld
>>> binutils-sh-linux-gnu-2.23.51.0.3-1.fc17.x86_64
>>> [root@dhcp122 build-binutils-or32]# rpm -qf /usr/bin/sh-linux-gnu-as
>>> binutils-sh-linux-gnu-2.23.51.0.3-1.fc17.x86_64
>>>
>>
>
> It is really the original sh-linux-gnu- compiler's issue (not only for
> allmodconfig, but also for sh own config files).
>
> With my new build cross-compiler, It can work for sh architecture own
> config files, but can not work with allmodconfig (I will analyze it).
>
after delete "-m32" in "scripts/recordmcount.pl", it will be OK.
The related patch which I have sent:
----------------------------patch begin----------------------------------
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 858966a..679218b 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -262,7 +262,6 @@ if ($arch eq "x86_64") {
# force flags for this arch
$ld .= " -m shlelf_linux";
$objcopy .= " -O elf32-sh-linux";
- $cc .= " -m32";
} elsif ($arch eq "powerpc") {
$local_regex = "^[0-9a-fA-F]+\\s+t\\s+(\\.?\\S+)";
--
1.7.7.6
----------------------------patch end------------------------------------
...
>
> Next, I will make a confirmation for sh64 compiler whether is OK or not.
>
> Welcome any members' suggestions or completions.
>
> Thanks.
>
...
>>>
>>> On 07/30/2013 10:15 AM, Chen Gang wrote:
>>>> Hello Maintainers:
>>>>
>>>> When I build sh64 with allmodconfig (without "EXTRA_CFLAGS=-W"), it
>>>> report the warnings below:
>>>>
>>>> LD arch/sh/kernel/cpu/sh5/built-in.o
>>>> WARNING: arch/sh/kernel/cpu/sh5/built-in.o (.cranges): unexpected non-allocatable section.
>>>> Did you forget to use "ax"/"aw" in a .S file?
>>>> Note that for example <linux/init.h> contains
>>>> section definitions for use in .S files.
>>>>
>>>> Can it cause real world issue ?
>>>>
>>>> Welcome any members suggestions or completions.
>>>>
>>>>
I have built sh64 cross compiler, it also reports the related warning.
It is not cross compiler's issue, need permit ".cranges' section for
sh64 architecture in "scripts/mod/modpost.c".
The related patch which I have sent:
----------------------------patch begin----------------------------------
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 6216434..8247979 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -821,6 +821,7 @@ static const char *section_white_list[] {
".comment*",
".debug*",
+ ".cranges", /* sh64 */
".zdebug*", /* Compressed debug sections. */
".GCC-command-line", /* mn10300 */
".GCC.command.line", /* record-gcc-switches, non mn10300 */
--
1.7.7.6
----------------------------patch end------------------------------------
>>>> Thanks.
>>>> --
>>>> Chen Gang.
>>>>
>>>
>>>
>>
>>
>
>
Thanks.
--
Chen Gang
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-08-01 5:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-30 2:15 [Suggestion] sh64: kernel: about the warning: "unexpected non-allocatable section" Chen Gang
2013-07-30 6:09 ` Chen Gang
2013-07-30 6:11 ` Chen Gang
2013-07-31 7:38 ` Chen Gang
2013-08-01 5:58 ` Chen Gang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox