All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] 4.13.0 kernel build error on Alpha
@ 2017-09-10 22:34 Bob Tracy
  2017-09-11  2:59 ` Matt Turner
  0 siblings, 1 reply; 6+ messages in thread
From: Bob Tracy @ 2017-09-10 22:34 UTC (permalink / raw)
  To: debian-alpha; +Cc: linux-alpha, mcree, mattst88, deller, macro

Here we go again :-(.  Tool versions as follows:

gcc version 7.2.0 (Debian 7.2.0-3)
GNU ld (GNU Binutils for Debian) 2.29 (binutils 2.29-9)

Note evidence of the ".alphalib" section patch first tried with the 4.9
kernel source.  It has worked well up through 4.12.  I didn't try
building any of the 4.13 release candidates because of all the compiler
updates that came through during that time.

  MODPOST vmlinux.o
WARNING: EXPORT symbol "callback_setenv" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "strrchr" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "__divl" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "__divqu" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "__memsetw" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "strchr" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "__reml" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "strcat" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "__copy_user" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "__remq" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "clear_page" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "strncpy" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "memmove" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "__remqu" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "memchr" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "__memset" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "copy_page" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "__divlu" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "strlen" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "strncat" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "callback_save_env" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "memset" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: "saved_config" [vmlinux] is COMMON symbol
WARNING: EXPORT symbol "__clear_user" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "callback_getenv" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "__divq" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "strcpy" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "___memset" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "__remlu" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "csum_ipv6_magic" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: EXPORT symbol "__constant_c_memset" [vmlinux] version generation failed, symbol will not be versioned.
WARNING: modpost: Found 24 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
arch/alpha/lib/memmove.o: In function `memmove':
(.alphalib+0x2c): relocation truncated to fit: BRSGP against symbol `memcpy' defined in .text section in arch/alpha/lib/memcpy.o
Makefile:1000: recipe for target 'vmlinux' failed
make: *** [vmlinux] Error 1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] 4.13.0 kernel build error on Alpha
  2017-09-10 22:34 [BUG] 4.13.0 kernel build error on Alpha Bob Tracy
@ 2017-09-11  2:59 ` Matt Turner
  2017-09-11  3:16   ` Bob Tracy
  0 siblings, 1 reply; 6+ messages in thread
From: Matt Turner @ 2017-09-11  2:59 UTC (permalink / raw)
  To: Bob Tracy
  Cc: Debian Alpha Mailing List, linux-alpha, Michael Cree,
	Helge Deller, Maciej W. Rozycki

On Sun, Sep 10, 2017 at 3:34 PM, Bob Tracy <rct@gherkin.frus.com> wrote:
> Here we go again :-(.  Tool versions as follows:
>
> gcc version 7.2.0 (Debian 7.2.0-3)
> GNU ld (GNU Binutils for Debian) 2.29 (binutils 2.29-9)
>
> Note evidence of the ".alphalib" section patch first tried with the 4.9
> kernel source.  It has worked well up through 4.12.  I didn't try
> building any of the 4.13 release candidates because of all the compiler
> updates that came through during that time.
>
>   MODPOST vmlinux.o
> WARNING: EXPORT symbol "callback_setenv" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "strrchr" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "__divl" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "__divqu" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "__memsetw" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "strchr" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "__reml" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "strcat" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "__copy_user" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "__remq" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "clear_page" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "strncpy" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "memmove" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "__remqu" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "memchr" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "__memset" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "copy_page" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "__divlu" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "strlen" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "strncat" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "callback_save_env" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "memset" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: "saved_config" [vmlinux] is COMMON symbol
> WARNING: EXPORT symbol "__clear_user" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "callback_getenv" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "__divq" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "strcpy" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "___memset" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "__remlu" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "csum_ipv6_magic" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: EXPORT symbol "__constant_c_memset" [vmlinux] version generation failed, symbol will not be versioned.
> WARNING: modpost: Found 24 section mismatch(es).
> To see full details build your kernel with:
> 'make CONFIG_DEBUG_SECTION_MISMATCH=y'

All of this is fixed by

commit 873f9b5bcbf27f6e89e1879714abe4532cacf5d7
Author: Ben Hutchings <ben@decadent.org.uk>
Date:   Wed Jul 19 01:01:16 2017 +0100

    alpha: Restore symbol versions for symbols exported from assembly


> arch/alpha/lib/memmove.o: In function `memmove':
> (.alphalib+0x2c): relocation truncated to fit: BRSGP against symbol `memcpy' defined in .text section in arch/alpha/lib/memcpy.o
> Makefile:1000: recipe for target 'vmlinux' failed
> make: *** [vmlinux] Error 1

I have not yet seen this.

The kernel seemed to be in good shape after my two pull requests were
merged. (commit dd689a68bc3 for 4.13 and commit 6caffe21dde for
4.13-rc1)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] 4.13.0 kernel build error on Alpha
  2017-09-11  2:59 ` Matt Turner
@ 2017-09-11  3:16   ` Bob Tracy
  2017-09-11  3:23     ` Bob Tracy
  0 siblings, 1 reply; 6+ messages in thread
From: Bob Tracy @ 2017-09-11  3:16 UTC (permalink / raw)
  To: Matt Turner
  Cc: Debian Alpha Mailing List, linux-alpha, Michael Cree,
	Helge Deller, Maciej W. Rozycki

On Sun, Sep 10, 2017 at 07:59:40PM -0700, Matt Turner wrote:
> On Sun, Sep 10, 2017 at 3:34 PM, Bob Tracy <rct@gherkin.frus.com> wrote:
> > Here we go again :-(.  Tool versions as follows:
> >
> > gcc version 7.2.0 (Debian 7.2.0-3)
> > GNU ld (GNU Binutils for Debian) 2.29 (binutils 2.29-9)
> >
> > Note evidence of the ".alphalib" section patch first tried with the 4.9
> > kernel source.  It has worked well up through 4.12.  I didn't try
> > building any of the 4.13 release candidates because of all the compiler
> > updates that came through during that time.
> >
> >   MODPOST vmlinux.o
> > WARNING: EXPORT symbol "callback_setenv" [vmlinux] version generation failed, symbol will not be versioned.
> > (...)
> > WARNING: modpost: Found 24 section mismatch(es).
> > To see full details build your kernel with:
> > 'make CONFIG_DEBUG_SECTION_MISMATCH=y'
> 
> All of this is fixed by
> 
> commit 873f9b5bcbf27f6e89e1879714abe4532cacf5d7
> Author: Ben Hutchings <ben@decadent.org.uk>
> Date:   Wed Jul 19 01:01:16 2017 +0100
> 
>     alpha: Restore symbol versions for symbols exported from assembly

I guess that commit hasn't made it into Linus' tree :-(.  If the patch
is short, please forward if you would be so kind.  Many thanks in
advance.

> > arch/alpha/lib/memmove.o: In function `memmove':
> > (.alphalib+0x2c): relocation truncated to fit: BRSGP against symbol `memcpy' defined in .text section in arch/alpha/lib/memcpy.o
> > Makefile:1000: recipe for target 'vmlinux' failed
> > make: *** [vmlinux] Error 1
> 
> I have not yet seen this.

I *think* what I want to do is the equivalent of the ".S" file
'.text --> .section .alphalib,"ax"' substitution for the affected ".c"
files in "arch/alpha/lib".  At the risk of baring my ignorance to the
world, is there a straightforward way of accomplishing that?  The
"objdump" tool confirms it's not a strict renaming of one section
to another: the ".text" section still exists in the compiled ".S"
files that were patched.

--Bob

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] 4.13.0 kernel build error on Alpha
  2017-09-11  3:16   ` Bob Tracy
@ 2017-09-11  3:23     ` Bob Tracy
  2017-09-11  6:02       ` Michael Cree
  0 siblings, 1 reply; 6+ messages in thread
From: Bob Tracy @ 2017-09-11  3:23 UTC (permalink / raw)
  To: Matt Turner
  Cc: Debian Alpha Mailing List, linux-alpha, Michael Cree,
	Helge Deller, Maciej W. Rozycki

On Sun, Sep 10, 2017 at 10:16:41PM -0500, Bob Tracy wrote:
> On Sun, Sep 10, 2017 at 07:59:40PM -0700, Matt Turner wrote:
> > On Sun, Sep 10, 2017 at 3:34 PM, Bob Tracy <rct@gherkin.frus.com> wrote:
> > > Here we go again :-(.  Tool versions as follows:
> > > (...)
> > >
> > >   MODPOST vmlinux.o
> > > WARNING: EXPORT symbol "callback_setenv" [vmlinux] version generation failed, symbol will not be versioned.
> > > (...)
> > > WARNING: modpost: Found 24 section mismatch(es).
> > > To see full details build your kernel with:
> > > 'make CONFIG_DEBUG_SECTION_MISMATCH=y'
> > 
> > All of this is fixed by
> > 
> > commit 873f9b5bcbf27f6e89e1879714abe4532cacf5d7
> > Author: Ben Hutchings <ben@decadent.org.uk>
> > Date:   Wed Jul 19 01:01:16 2017 +0100
> > 
> >     alpha: Restore symbol versions for symbols exported from assembly
> 
> I guess that commit hasn't made it into Linus' tree :-(.  If the patch
> is short, please forward if you would be so kind.  Many thanks in
> advance.

Never mind.  Linus pulled it five days ago as I type this.  The fixes
obviously didn't make it in time for 4.13-final, but should be in 4.14.

--Bob

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] 4.13.0 kernel build error on Alpha
  2017-09-11  3:23     ` Bob Tracy
@ 2017-09-11  6:02       ` Michael Cree
  2017-09-12  4:06         ` Bob Tracy
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Cree @ 2017-09-11  6:02 UTC (permalink / raw)
  To: Bob Tracy
  Cc: Matt Turner, Debian Alpha Mailing List, linux-alpha,
	Helge Deller, Maciej W. Rozycki

On Sun, Sep 10, 2017 at 10:23:40PM -0500, Bob Tracy wrote:
> On Sun, Sep 10, 2017 at 10:16:41PM -0500, Bob Tracy wrote:
> > On Sun, Sep 10, 2017 at 07:59:40PM -0700, Matt Turner wrote:
> > > On Sun, Sep 10, 2017 at 3:34 PM, Bob Tracy <rct@gherkin.frus.com> wrote:
> > > > Here we go again :-(.  Tool versions as follows:
> > > > (...)
> > > >
> > > >   MODPOST vmlinux.o
> > > > WARNING: EXPORT symbol "callback_setenv" [vmlinux] version generation failed, symbol will not be versioned.
> > > > (...)
> > > > WARNING: modpost: Found 24 section mismatch(es).
> > > > To see full details build your kernel with:
> > > > 'make CONFIG_DEBUG_SECTION_MISMATCH=y'
> > > 
> > > All of this is fixed by
> > > 
> > > commit 873f9b5bcbf27f6e89e1879714abe4532cacf5d7
> > > Author: Ben Hutchings <ben@decadent.org.uk>
> > > Date:   Wed Jul 19 01:01:16 2017 +0100
> > > 
> > >     alpha: Restore symbol versions for symbols exported from assembly
> > 
> > I guess that commit hasn't made it into Linus' tree :-(.  If the patch
> > is short, please forward if you would be so kind.  Many thanks in
> > advance.
> 
> Never mind.  Linus pulled it five days ago as I type this.  The fixes
> obviously didn't make it in time for 4.13-final, but should be in 4.14.

4.13 final builds fine for me when building for a DP264 alpha config.

But I do recommend you revert 6cd9dc3e75078ef646076fa63adfb9b85ced0b66
(mm/compaction.c: fix zoneindex in kcompactd()) in your build of the
kernel for Alpha as it causes random segfaults in user space.
Unfortunately no one took any notice when I reported this some time
ago.

Cheers
Michael.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [BUG] 4.13.0 kernel build error on Alpha
  2017-09-11  6:02       ` Michael Cree
@ 2017-09-12  4:06         ` Bob Tracy
  0 siblings, 0 replies; 6+ messages in thread
From: Bob Tracy @ 2017-09-12  4:06 UTC (permalink / raw)
  To: Michael Cree, Matt Turner, Debian Alpha Mailing List,
	linux-alpha, Helge Deller, Maciej W. Rozycki

Yesterday, I thought what I wanted to do was the ".c" file equivalent of
the '.section .alphalib,"ax"' substitution we made to the ".S" files.
I'm getting a good kernel build with the following patch:


====--CUT HERE--====
--- linux/arch/alpha/lib/memcpy.c.orig	2016-10-20 01:11:37.000000000 -0500
+++ linux/arch/alpha/lib/memcpy.c	2017-09-11 22:38:41.634495379 -0500
@@ -149,7 +149,7 @@
 	DO_REST_ALIGNED_DN(d,s,n);
 }
 
-void * memcpy(void * dest, const void *src, size_t n)
+__attribute__((section(".alphalib"))) void * memcpy(void * dest, const void *src, size_t n)
 {
 	if (!(((unsigned long) dest ^ (unsigned long) src) & 7)) {
 		__memcpy_aligned_up ((unsigned long) dest, (unsigned long) src,
====--TUC EREH--====

The GNU C documentation concerning the "section" attribute as applied to
functions implies I should have been able to specify
	__attribute__((section(".alphalib,\"ax\"")))
but the compiler didn't like the comma and argument following the
section name.

I'm guessing I'll probably end up having to do this same fixup for the
rest of the ".c" files in the "arch/alpha/lib" directory at some point,
but I'll cross that bridge when I come to it.

--Bob

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-12  4:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-10 22:34 [BUG] 4.13.0 kernel build error on Alpha Bob Tracy
2017-09-11  2:59 ` Matt Turner
2017-09-11  3:16   ` Bob Tracy
2017-09-11  3:23     ` Bob Tracy
2017-09-11  6:02       ` Michael Cree
2017-09-12  4:06         ` Bob Tracy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.