2008-11-07 18:11:31

by Markus Trippelsdorf

[permalink] [raw]
Subject: [arch/x86/vdso/vdso32-syms.lds] Error 1

All of a sudden I get the following error when I build the kernel:

CC arch/x86/vdso/vma.o
LDS arch/x86/vdso/vdso.lds
AS arch/x86/vdso/vdso-note.o
CC arch/x86/vdso/vclock_gettime.o
CC arch/x86/vdso/vgetcpu.o
CC arch/x86/vdso/vvar.o
VDSO arch/x86/vdso/vdso.so.dbg
OBJCOPY arch/x86/vdso/vdso.so
AS arch/x86/vdso/vdso.o
LDS arch/x86/vdso/vdso32/vdso32.lds
AS arch/x86/vdso/vdso32/note.o
AS arch/x86/vdso/vdso32/int80.o
VDSO arch/x86/vdso/vdso32-int80.so.dbg
OBJCOPY arch/x86/vdso/vdso32-int80.so
AS arch/x86/vdso/vdso32/syscall.o
VDSO arch/x86/vdso/vdso32-syscall.so.dbg
OBJCOPY arch/x86/vdso/vdso32-syscall.so
AS arch/x86/vdso/vdso32/sysenter.o
VDSO arch/x86/vdso/vdso32-sysenter.so.dbg
OBJCOPY arch/x86/vdso/vdso32-sysenter.so
AS arch/x86/vdso/vdso32.o
CC arch/x86/vdso/vdso32-setup.o
VDSOSYM arch/x86/vdso/vdso-syms.lds
VDSOSYM arch/x86/vdso/vdso32-int80-syms.lds
VDSOSYM arch/x86/vdso/vdso32-syscall-syms.lds
VDSOSYM arch/x86/vdso/vdso32-sysenter-syms.lds
VDSOSYM arch/x86/vdso/vdso32-syms.lds
--- - 2008-11-07 18:51:36.392997346 +0100
+++ arch/x86/vdso/vdso32-int80-syms.lds 2008-11-07 18:51:36.283820343 +0100
@@ -3,5 +3,3 @@
VDSO32_sigreturn = 0x0400;
VDSO32_vsyscall = 0x0420;
VDSO32_vsyscall_eh_frame_size = 0x040;
-VDSO32_vsyscall = 0x0420;
-VDSO32_vsyscall_eh_frame_size = 0x040;
make[1]: *** [arch/x86/vdso/vdso32-syms.lds] Error 1
make: *** [arch/x86/vdso] Error 2

When I edit arch/x86/vdso/Makefile as follows,

diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
index 4d6ef0a..8d93123 100644
--- a/arch/x86/vdso/Makefile
+++ b/arch/x86/vdso/Makefile
@@ -107,7 +107,7 @@ define cmd_vdso32sym
else sed /VDSO32_SYSENTER_RETURN/d $(@D)/.tmp_$(@F) | \
diff -u - $H; fi &&) : ;\
then mv -f $(@D)/.tmp_$(@F) $@; \
- else rm -f $(@D)/.tmp_$(@F); exit 1; \
+ else mv -f $(@D)/.tmp_$(@F) $@; \
fi
endef

the kernel builds and runs just fine.

A least one other person has hit the same problem already:
http://bugzilla.kernel.org/show_bug.cgi?id=11739

Any hints?

--
Markus


2008-11-07 18:52:57

by H. Peter Anvin

[permalink] [raw]
Subject: Re: [arch/x86/vdso/vdso32-syms.lds] Error 1

Markus Trippelsdorf wrote:
> --- - 2008-11-07 18:51:36.392997346 +0100
> +++ arch/x86/vdso/vdso32-int80-syms.lds 2008-11-07 18:51:36.283820343 +0100
> @@ -3,5 +3,3 @@
> VDSO32_sigreturn = 0x0400;
> VDSO32_vsyscall = 0x0420;
> VDSO32_vsyscall_eh_frame_size = 0x040;
> -VDSO32_vsyscall = 0x0420;
> -VDSO32_vsyscall_eh_frame_size = 0x040;
> make[1]: *** [arch/x86/vdso/vdso32-syms.lds] Error 1
> make: *** [arch/x86/vdso] Error 2
>

Could you please tar up your arch/x86/vdso directory and send me?

Also, what version of binutils are you running?

-hpa

2008-11-07 19:02:31

by H. Peter Anvin

[permalink] [raw]
Subject: Re: [arch/x86/vdso/vdso32-syms.lds] Error 1

Also, if you could execute the following commands and include the output:

nm arch/x86/vdso/vdso32-sysenter.so.dbg
nm arch/x86/vdso/vdso32-int80.so.dbg

My guess at this point is a bug in nm.

-hpa

2008-11-07 19:03:29

by Markus Trippelsdorf

[permalink] [raw]
Subject: Re: [arch/x86/vdso/vdso32-syms.lds] Error 1

On Fri, Nov 07, 2008 at 10:52:22AM -0800, H. Peter Anvin wrote:
> Markus Trippelsdorf wrote:
> > --- - 2008-11-07 18:51:36.392997346 +0100
> > +++ arch/x86/vdso/vdso32-int80-syms.lds 2008-11-07 18:51:36.283820343 +0100
> > @@ -3,5 +3,3 @@
> > VDSO32_sigreturn = 0x0400;
> > VDSO32_vsyscall = 0x0420;
> > VDSO32_vsyscall_eh_frame_size = 0x040;
> > -VDSO32_vsyscall = 0x0420;
> > -VDSO32_vsyscall_eh_frame_size = 0x040;
> > make[1]: *** [arch/x86/vdso/vdso32-syms.lds] Error 1
> > make: *** [arch/x86/vdso] Error 2
> >
>
> Could you please tar up your arch/x86/vdso directory and send me?

Will do so.

> Also, what version of binutils are you running?

GNU ld (Linux/GNU Binutils) 2.19.50.0.1.20081007
--
Markus

2008-11-07 19:07:11

by Markus Trippelsdorf

[permalink] [raw]
Subject: Re: [arch/x86/vdso/vdso32-syms.lds] Error 1

On Fri, Nov 07, 2008 at 10:57:24AM -0800, H. Peter Anvin wrote:
> Also, if you could execute the following commands and include the output:
>
> nm arch/x86/vdso/vdso32-sysenter.so.dbg
> nm arch/x86/vdso/vdso32-int80.so.dbg
>
> My guess at this point is a bug in nm.
>
markus@gentoox2 linux % nm arch/x86/vdso/vdso32-sysenter.so.dbg
00000000 A LINUX_2.5
00000000 a VDSO32_PRELINK
00000430 t VDSO32_SYSENTER_RETURN
00000410 t VDSO32_rt_sigreturn
00000400 t VDSO32_sigreturn
00000420 t VDSO32_vsyscall
00000040 a VDSO32_vsyscall_eh_frame_size
00000308 a _DYNAMIC
00000380 a _GLOBAL_OFFSET_TABLE_
00000410 T __kernel_rt_sigreturn
00000400 T __kernel_sigreturn
00000420 T __kernel_vsyscall
markus@gentoox2 linux % nm arch/x86/vdso/vdso32-int80.so.dbg
00000000 A LINUX_2.5
00000000 a VDSO32_PRELINK
00000410 t VDSO32_rt_sigreturn
00000400 t VDSO32_sigreturn
00000420 t VDSO32_vsyscall
00000040 a VDSO32_vsyscall_eh_frame_size
000002f4 a _DYNAMIC
00000380 a _GLOBAL_OFFSET_TABLE_
00000410 T __kernel_rt_sigreturn
00000400 T __kernel_sigreturn
00000420 T __kernel_vsyscall

--
Markus

2008-11-12 18:57:28

by Roland McGrath

[permalink] [raw]
Subject: Re: [arch/x86/vdso/vdso32-syms.lds] Error 1

Sorry for the delay, I've been offline.

> All of a sudden I get the following error when I build the kernel:

Suddenly when? What changed to make this start happening?
Is it recent kernel sources? If so, can you git-bisect to
which change did it? If not, did something else change in
your build environment that made this problem appear?
Does it come or go with some .config change?

> --- - 2008-11-07 18:51:36.392997346 +0100
> +++ arch/x86/vdso/vdso32-int80-syms.lds 2008-11-07 18:51:36.283820343 +0100
> @@ -3,5 +3,3 @@
> VDSO32_sigreturn = 0x0400;
> VDSO32_vsyscall = 0x0420;
> VDSO32_vsyscall_eh_frame_size = 0x040;
> -VDSO32_vsyscall = 0x0420;
> -VDSO32_vsyscall_eh_frame_size = 0x040;
> make[1]: *** [arch/x86/vdso/vdso32-syms.lds] Error 1
> make: *** [arch/x86/vdso] Error 2

That sure looks odd. It looks like sort -u failed to uniquify those lines.

Can you try something like this:

> - else rm -f $(@D)/.tmp_$(@F); exit 1; \
> + else cat >&2 $(@D)/.tmp_$(@F); exit 1; \

and run make V=1 to see the full output on the failure?

> When I edit arch/x86/vdso/Makefile as follows,
>
> diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile
> index 4d6ef0a..8d93123 100644
> --- a/arch/x86/vdso/Makefile
> +++ b/arch/x86/vdso/Makefile
> @@ -107,7 +107,7 @@ define cmd_vdso32sym
> else sed /VDSO32_SYSENTER_RETURN/d $(@D)/.tmp_$(@F) | \
> diff -u - $H; fi &&) : ;\
> then mv -f $(@D)/.tmp_$(@F) $@; \
> - else rm -f $(@D)/.tmp_$(@F); exit 1; \
> + else mv -f $(@D)/.tmp_$(@F) $@; \
> fi
> endef

This is ignoring the wrongly failing check, not fixing it.

> A least one other person has hit the same problem already:
> http://bugzilla.kernel.org/show_bug.cgi?id=11739

That report doesn't have a lot of information and doesn't show output that
looks the same as yours. I'm not sure it's the same issue at all.


Thanks,
Roland

2008-11-12 21:35:30

by Markus Trippelsdorf

[permalink] [raw]
Subject: Re: [arch/x86/vdso/vdso32-syms.lds] Error 1

On Wed, Nov 12, 2008 at 10:56:17AM -0800, Roland McGrath wrote:
> Sorry for the delay, I've been offline.
>
> > All of a sudden I get the following error when I build the kernel:
>
> Suddenly when? What changed to make this start happening?
> Is it recent kernel sources? If so, can you git-bisect to
> which change did it? If not, did something else change in
> your build environment that made this problem appear?
> Does it come or go with some .config change?
>
> > --- - 2008-11-07 18:51:36.392997346 +0100
> > +++ arch/x86/vdso/vdso32-int80-syms.lds 2008-11-07 18:51:36.283820343 +0100
> > @@ -3,5 +3,3 @@
> > VDSO32_sigreturn = 0x0400;
> > VDSO32_vsyscall = 0x0420;
> > VDSO32_vsyscall_eh_frame_size = 0x040;
> > -VDSO32_vsyscall = 0x0420;
> > -VDSO32_vsyscall_eh_frame_size = 0x040;
> > make[1]: *** [arch/x86/vdso/vdso32-syms.lds] Error 1
> > make: *** [arch/x86/vdso] Error 2
>
> That sure looks odd. It looks like sort -u failed to uniquify those lines.
>
> Can you try something like this:
>
> > - else rm -f $(@D)/.tmp_$(@F); exit 1; \
> > + else cat >&2 $(@D)/.tmp_$(@F); exit 1; \
>
> and run make V=1 to see the full output on the failure?

Thanks for your reply.

Something odd is going on with my system:

% sort -u arch/x86/vdso/vdso32-int80-syms.lds arch/x86/vdso/vdso32-syscall-syms.lds arch/x86/vdso/vdso32-sysenter-syms.lds
VDSO32_PRELINK = 0x0;
VDSO32_rt_sigreturn = 0x0410;
VDSO32_sigreturn = 0x0400;
VDSO32_SYSENTER_RETURN = 0x0430;
VDSO32_vsyscall = 0x0420;
VDSO32_vsyscall_eh_frame_size = 0x040;

% LC_ALL=C sort -u arch/x86/vdso/vdso32-int80-syms.lds arch/x86/vdso/vdso32-syscall-syms.lds arch/x86/vdso/vdso32-sysenter-syms.lds
VDSO32_PRELINK = 0x0;
VDSO32_SYSENTER_RETURN = 0x0430;
VDSO32_rt_sigreturn = 0x0410;
VDSO32_sigreturn = 0x0400;
VDSO32_vsyscall = 0x0420;
VDSO32_vsyscall_eh_frame_size = 0x040;
VDSO32_vsyscall = 0x0420;
VDSO32_vsyscall_eh_frame_size = 0x040;

I will try to figure out what causes this behaviour, but it is not
kernel related I guess. So I apologize for the noise.

--
Markus

2008-11-13 10:15:22

by Markus Trippelsdorf

[permalink] [raw]
Subject: Re: [arch/x86/vdso/vdso32-syms.lds] Error 1

On Wed, Nov 12, 2008 at 10:34:59PM +0100, Markus Trippelsdorf wrote:
> On Wed, Nov 12, 2008 at 10:56:17AM -0800, Roland McGrath wrote:
> > Sorry for the delay, I've been offline.
> >
> > > All of a sudden I get the following error when I build the kernel:
> >
> > Suddenly when? What changed to make this start happening?
> > Is it recent kernel sources? If so, can you git-bisect to
> > which change did it? If not, did something else change in
> > your build environment that made this problem appear?
> > Does it come or go with some .config change?
> >
> > > --- - 2008-11-07 18:51:36.392997346 +0100
> > > +++ arch/x86/vdso/vdso32-int80-syms.lds 2008-11-07 18:51:36.283820343 +0100
> > > @@ -3,5 +3,3 @@
> > > VDSO32_sigreturn = 0x0400;
> > > VDSO32_vsyscall = 0x0420;
> > > VDSO32_vsyscall_eh_frame_size = 0x040;
> > > -VDSO32_vsyscall = 0x0420;
> > > -VDSO32_vsyscall_eh_frame_size = 0x040;
> > > make[1]: *** [arch/x86/vdso/vdso32-syms.lds] Error 1
> > > make: *** [arch/x86/vdso] Error 2
> >
> > That sure looks odd. It looks like sort -u failed to uniquify those lines.
> >
> > Can you try something like this:
> >
> > > - else rm -f $(@D)/.tmp_$(@F); exit 1; \
> > > + else cat >&2 $(@D)/.tmp_$(@F); exit 1; \
> >
> > and run make V=1 to see the full output on the failure?
>
> Something odd is going on with my system:

> I will try to figure out what causes this behaviour, but it is not
> kernel related I guess. So I apologize for the noise.

It turned out that my version of glibc, which was compiled with a
gcc-4.4.0 snapshot, was the cause of the problem.

However simply compiling glibc again with gcc-4.3.2 did not work,
because glibc uses "LC_ALL=C sort -u" in many Makefiles. So I had to find
an old binary version of glibc, install that version in a chroot
environment and finally compile glibc again with a sane compiler in that
chroot.

--
Markus