* Problems with allyesconfig kernel build
@ 2007-10-23 4:02 Stephen Rothwell
2007-10-23 4:07 ` Stephen Rothwell
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Stephen Rothwell @ 2007-10-23 4:02 UTC (permalink / raw)
To: ppc-dev; +Cc: Andrew Morton, amodra
[-- Attachment #1: Type: text/plain, Size: 2837 bytes --]
This was first noted with the -mm tree, but has now migrated into Linus'
tree. An allyesconfig build dies in the link stage like this:
/usr/bin/ld: arch/powerpc/kernel/head_64.o(.text+0x80c8): sibling call optimization to `.text.init.refok' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `.text.init.refok' extern
/usr/bin/ld: arch/powerpc/kernel/head_64.o(.text+0x8160): sibling call optimization to `.text.init.refok' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `.text.init.refok' extern
/usr/bin/ld: arch/powerpc/kernel/head_64.o(.text+0x81c4): sibling call optimization to `.text.init.refok' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `.text.init.refok' extern
/usr/bin/ld: final link failed: Bad value
We already compile with -mminimal-toc and adding
-fno-optimize-sibling-call did not help.
Intuiting the obvious, I changed all the _INIT_STATIC and _INIT_GLOBAL
uses in head_64.S back to _STATIC and _GLOBAL (which just moves the code
from .text.init.refok to .text). Now the linker segfaults instead. :-)
/bin/sh: line 1: 5260 Segmentation fault ld -m elf64ppc -Bstatic --emit-relocs --build-id -o .tmp_vmlinux1 -T arch/powerpc/kernel/vmlinux.lds arch/powerpc/kernel/head_64.o arch/powerpc/kernel/entry_64.o arch/powerpc/kernel/fpu.o init/built-in.o --start-group usr/built-in.o arch/powerpc/kernel/built-in.o arch/powerpc/mm/built-in.o arch/powerpc/lib/built-in.o arch/powerpc/sysdev/built-in.o arch/powerpc/platforms/built-in.o arch/powerpc/xmon/built-in.o kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o security/built-in.o crypto/built-in.o block/built-in.o lib/lib.a lib/built-in.o drivers/built-in.o sound/built-in.o arch/powerpc/oprofile/built-in.o net/built-in.o --end-group
make[1]: *** [.tmp_vmlinux1] Error 139
$ ld --version
GNU ld (GNU Binutils for Debian) 2.18
I take this as an improvement :-)
We link .text.init.refok immediately after .text, but with
allyesconfig, .text ends up very large.
The --emit-relocs is a product of something else I am working on. So I
took that out and now get a whole lot more messages like:
/usr/bin/ld: net/built-in.o(.fixup+0x4): sibling call optimization to `.text' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `.text' extern
/usr/bin/ld: net/built-in.o(.fixup+0xc): sibling call optimization to `.text' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `.text' extern
Anyone have any ideas?
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problems with allyesconfig kernel build
2007-10-23 4:02 Problems with allyesconfig kernel build Stephen Rothwell
@ 2007-10-23 4:07 ` Stephen Rothwell
2007-10-23 4:18 ` Andrew Morton
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2007-10-23 4:07 UTC (permalink / raw)
To: ppc-dev; +Cc: Andrew Morton, amodra
[-- Attachment #1: Type: text/plain, Size: 624 bytes --]
On Tue, 23 Oct 2007 14:02:31 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> We link .text.init.refok immediately after .text, but with
> allyesconfig, .text ends up very large.
Just to give you some idea of what "very large" means, this is an
allyesconfig built vmlinux from August:
$ ls -l vmlinux
-rwxr-xr-x 1 sfr sfr 378704409 2007-08-21 13:44 vmlinux
$ size vmlinux
text data bss dec hex filename
41368641 9142448 3491272 54002361 33802b9 vmlinux
:-)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problems with allyesconfig kernel build
2007-10-23 4:02 Problems with allyesconfig kernel build Stephen Rothwell
2007-10-23 4:07 ` Stephen Rothwell
@ 2007-10-23 4:18 ` Andrew Morton
2007-10-23 4:47 ` Stephen Rothwell
2007-10-23 9:09 ` Segher Boessenkool
2007-10-23 10:19 ` Alan Modra
3 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2007-10-23 4:18 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: ppc-dev, amodra
On Tue, 23 Oct 2007 14:02:31 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> This was first noted with the -mm tree, but has now migrated into Linus'
> tree.
Yeah, sorry, I didn't know what to do about that. I'm not even sure which
patch caused it.
> An allyesconfig build dies in the link stage like this:
>
> /usr/bin/ld: arch/powerpc/kernel/head_64.o(.text+0x80c8): sibling call optimization to `.text.init.refok' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `.text.init.refok' extern
> /usr/bin/ld: arch/powerpc/kernel/head_64.o(.text+0x8160): sibling call optimization to `.text.init.refok' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `.text.init.refok' extern
> /usr/bin/ld: arch/powerpc/kernel/head_64.o(.text+0x81c4): sibling call optimization to `.text.init.refok' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `.text.init.refok' extern
> /usr/bin/ld: final link failed: Bad value
>
> We already compile with -mminimal-toc and adding
> -fno-optimize-sibling-call did not help.
>
> Intuiting the obvious, I changed all the _INIT_STATIC and _INIT_GLOBAL
> uses in head_64.S back to _STATIC and _GLOBAL (which just moves the code
> from .text.init.refok to .text). Now the linker segfaults instead. :-)
>
> /bin/sh: line 1: 5260 Segmentation fault ld -m elf64ppc -Bstatic --emit-relocs --build-id -o .tmp_vmlinux1 -T arch/powerpc/kernel/vmlinux.lds arch/powerpc/kernel/head_64.o arch/powerpc/kernel/entry_64.o arch/powerpc/kernel/fpu.o init/built-in.o --start-group usr/built-in.o arch/powerpc/kernel/built-in.o arch/powerpc/mm/built-in.o arch/powerpc/lib/built-in.o arch/powerpc/sysdev/built-in.o arch/powerpc/platforms/built-in.o arch/powerpc/xmon/built-in.o kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o security/built-in.o crypto/built-in.o block/built-in.o lib/lib.a lib/built-in.o drivers/built-in.o sound/built-in.o arch/powerpc/oprofile/built-in.o net/built-in.o --end-group
> make[1]: *** [.tmp_vmlinux1] Error 139
>
> $ ld --version
> GNU ld (GNU Binutils for Debian) 2.18
>
> I take this as an improvement :-)
>
> We link .text.init.refok immediately after .text, but with
> allyesconfig, .text ends up very large.
>
> The --emit-relocs is a product of something else I am working on. So I
> took that out and now get a whole lot more messages like:
>
> /usr/bin/ld: net/built-in.o(.fixup+0x4): sibling call optimization to `.text' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `.text' extern
> /usr/bin/ld: net/built-in.o(.fixup+0xc): sibling call optimization to `.text' does not allow automatic multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or make `.text' extern
>
> Anyone have any ideas?
I still don't know ;)
What did we do which caused all this to start happening?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problems with allyesconfig kernel build
2007-10-23 4:18 ` Andrew Morton
@ 2007-10-23 4:47 ` Stephen Rothwell
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Rothwell @ 2007-10-23 4:47 UTC (permalink / raw)
To: Andrew Morton; +Cc: ppc-dev, amodra
[-- Attachment #1: Type: text/plain, Size: 596 bytes --]
On Mon, 22 Oct 2007 21:18:36 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Tue, 23 Oct 2007 14:02:31 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> > This was first noted with the -mm tree, but has now migrated into Linus'
> > tree.
>
> Yeah, sorry, I didn't know what to do about that. I'm not even sure which
> patch caused it.
Not your fault.
> What did we do which caused all this to start happening?
We just grew too big, probably :-(
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problems with allyesconfig kernel build
2007-10-23 4:02 Problems with allyesconfig kernel build Stephen Rothwell
2007-10-23 4:07 ` Stephen Rothwell
2007-10-23 4:18 ` Andrew Morton
@ 2007-10-23 9:09 ` Segher Boessenkool
2007-10-23 10:19 ` Alan Modra
3 siblings, 0 replies; 6+ messages in thread
From: Segher Boessenkool @ 2007-10-23 9:09 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: ppc-dev, Andrew Morton, amodra
> This was first noted with the -mm tree, but has now migrated into
> Linus'
> tree. An allyesconfig build dies in the link stage like this:
>
> /usr/bin/ld: arch/powerpc/kernel/head_64.o(.text+0x80c8): sibling call
> optimization to `.text.init.refok' does not allow automatic multiple
> TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or
> make `.text.init.refok' extern
> /usr/bin/ld: arch/powerpc/kernel/head_64.o(.text+0x8160): sibling call
> optimization to `.text.init.refok' does not allow automatic multiple
> TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or
> make `.text.init.refok' extern
> /usr/bin/ld: arch/powerpc/kernel/head_64.o(.text+0x81c4): sibling call
> optimization to `.text.init.refok' does not allow automatic multiple
> TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or
> make `.text.init.refok' extern
> /usr/bin/ld: final link failed: Bad value
I just tried, and it works fine for me.
> Intuiting the obvious, I changed all the _INIT_STATIC and _INIT_GLOBAL
> uses in head_64.S back to _STATIC and _GLOBAL (which just moves the
> code
> from .text.init.refok to .text). Now the linker segfaults instead.
> :-)
Tried that, too, and no segfault, everything happy.
> $ ld --version
> GNU ld (GNU Binutils for Debian) 2.18
I'm using CVS HEAD of binutils. Could you try that, with the same
GCC version you are currently using? Just to narrow things down...
Segher
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Problems with allyesconfig kernel build
2007-10-23 4:02 Problems with allyesconfig kernel build Stephen Rothwell
` (2 preceding siblings ...)
2007-10-23 9:09 ` Segher Boessenkool
@ 2007-10-23 10:19 ` Alan Modra
3 siblings, 0 replies; 6+ messages in thread
From: Alan Modra @ 2007-10-23 10:19 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: ppc-dev, Andrew Morton
On Tue, Oct 23, 2007 at 02:02:31PM +1000, Stephen Rothwell wrote:
> Anyone have any ideas?
The segfault with --emit-relocs and complaints about .fixup are linker
bugs. I'm about the commit fixes for both of these problems.
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-10-23 10:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-23 4:02 Problems with allyesconfig kernel build Stephen Rothwell
2007-10-23 4:07 ` Stephen Rothwell
2007-10-23 4:18 ` Andrew Morton
2007-10-23 4:47 ` Stephen Rothwell
2007-10-23 9:09 ` Segher Boessenkool
2007-10-23 10:19 ` Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).