* Linker error with latest tree on EM64T
@ 2006-07-13 10:56 Marcel Holtmann
2006-07-13 10:59 ` Arjan van de Ven
0 siblings, 1 reply; 8+ messages in thread
From: Marcel Holtmann @ 2006-07-13 10:56 UTC (permalink / raw)
To: linux-kernel
Hi,
when trying to build the latest tree on an EM64T Dual-Core, I am getting
this error:
LD .tmp_vmlinux1
init/built-in.o: In function `try_name':
do_mounts.c:(.text+0x51d): undefined reference to `__stack_chk_fail'
init/built-in.o: In function `name_to_dev_t':
(.text+0x797): undefined reference to `__stack_chk_fail'
init/built-in.o: In function `mount_block_root':
(.init.text+0x823): undefined reference to `__stack_chk_fail'
init/built-in.o: In function `md_run_setup':
(.init.text+0x1131): undefined reference to `__stack_chk_fail'
init/built-in.o: In function `do_header':
initramfs.c:(.init.text+0x24a4): undefined reference to `__stack_chk_fail'
arch/x86_64/kernel/built-in.o:(.text+0x2f52): more undefined references to `__st
ack_chk_fail' follow
make: *** [.tmp_vmlinux1] Error 1
Does anybody have an idea?
Regards
Marcel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Linker error with latest tree on EM64T
2006-07-13 10:56 Linker error with latest tree on EM64T Marcel Holtmann
@ 2006-07-13 10:59 ` Arjan van de Ven
2006-07-13 11:58 ` Marcel Holtmann
0 siblings, 1 reply; 8+ messages in thread
From: Arjan van de Ven @ 2006-07-13 10:59 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: jakub, linux-kernel
On Thu, 2006-07-13 at 12:56 +0200, Marcel Holtmann wrote:
> Hi,
>
> when trying to build the latest tree on an EM64T Dual-Core, I am getting
> this error:
>
> LD .tmp_vmlinux1
> init/built-in.o: In function `try_name':
> do_mounts.c:(.text+0x51d): undefined reference to `__stack_chk_fail'
> init/built-in.o: In function `name_to_dev_t':
> (.text+0x797): undefined reference to `__stack_chk_fail'
> init/built-in.o: In function `mount_block_root':
> (.init.text+0x823): undefined reference to `__stack_chk_fail'
> init/built-in.o: In function `md_run_setup':
> (.init.text+0x1131): undefined reference to `__stack_chk_fail'
> init/built-in.o: In function `do_header':
> initramfs.c:(.init.text+0x24a4): undefined reference to `__stack_chk_fail'
> arch/x86_64/kernel/built-in.o:(.text+0x2f52): more undefined references to `__st
> ack_chk_fail' follow
> make: *** [.tmp_vmlinux1] Error 1
you are using ubuntu which has a compiler that adds -fstack-protector
implicitly to the compiler options, yet you don't have a kernel that
provides this infrastructure ;)
(I have code for that but it's not merged yet, it's pending one gcc
patch to get merged upstream)
in the mean time.. I'm pretty sure Sam sent a patch to Linus that adds
-fno-stack-protector...
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Linker error with latest tree on EM64T
2006-07-13 10:59 ` Arjan van de Ven
@ 2006-07-13 11:58 ` Marcel Holtmann
2006-07-13 13:26 ` Sam Ravnborg
0 siblings, 1 reply; 8+ messages in thread
From: Marcel Holtmann @ 2006-07-13 11:58 UTC (permalink / raw)
To: Arjan van de Ven; +Cc: jakub, linux-kernel
Hi Arjan,
> > when trying to build the latest tree on an EM64T Dual-Core, I am getting
> > this error:
> >
> > LD .tmp_vmlinux1
> > init/built-in.o: In function `try_name':
> > do_mounts.c:(.text+0x51d): undefined reference to `__stack_chk_fail'
> > init/built-in.o: In function `name_to_dev_t':
> > (.text+0x797): undefined reference to `__stack_chk_fail'
> > init/built-in.o: In function `mount_block_root':
> > (.init.text+0x823): undefined reference to `__stack_chk_fail'
> > init/built-in.o: In function `md_run_setup':
> > (.init.text+0x1131): undefined reference to `__stack_chk_fail'
> > init/built-in.o: In function `do_header':
> > initramfs.c:(.init.text+0x24a4): undefined reference to `__stack_chk_fail'
> > arch/x86_64/kernel/built-in.o:(.text+0x2f52): more undefined references to `__st
> > ack_chk_fail' follow
> > make: *** [.tmp_vmlinux1] Error 1
>
> you are using ubuntu which has a compiler that adds -fstack-protector
> implicitly to the compiler options, yet you don't have a kernel that
> provides this infrastructure ;)
> (I have code for that but it's not merged yet, it's pending one gcc
> patch to get merged upstream)
> in the mean time.. I'm pretty sure Sam sent a patch to Linus that adds
> -fno-stack-protector...
I couldn't find such a patch in Sam's repository, but the following
worked for me:
diff --git a/Makefile b/Makefile
index 7c010f3..b4a2a80 100644
--- a/Makefile
+++ b/Makefile
@@ -308,7 +308,7 @@ LINUXINCLUDE := -Iinclude \
CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE)
CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
- -fno-strict-aliasing -fno-common
+ -fno-strict-aliasing -fno-common -fno-stack-protector
# Force gcc to behave correct even for buggy distributions
CFLAGS += $(call cc-option, -fno-stack-protector-all \
-fno-stack-protector)
Thanks for the quick answer.
Regards
Marcel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: Linker error with latest tree on EM64T
2006-07-13 11:58 ` Marcel Holtmann
@ 2006-07-13 13:26 ` Sam Ravnborg
2006-07-13 13:30 ` Marcel Holtmann
0 siblings, 1 reply; 8+ messages in thread
From: Sam Ravnborg @ 2006-07-13 13:26 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: Arjan van de Ven, jakub, linux-kernel
On Thu, Jul 13, 2006 at 01:58:02PM +0200, Marcel Holtmann wrote:
> >
> > you are using ubuntu which has a compiler that adds -fstack-protector
> > implicitly to the compiler options, yet you don't have a kernel that
> > provides this infrastructure ;)
So go bug ubuntu...
> I couldn't find such a patch in Sam's repository
>From -linus:
# Force gcc to behave correct even for buggy distributions
CFLAGS += $(call cc-option, -fno-stack-protector-all \
-fno-stack-protector)
Sam
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Linker error with latest tree on EM64T
2006-07-13 13:26 ` Sam Ravnborg
@ 2006-07-13 13:30 ` Marcel Holtmann
2006-07-13 16:10 ` Sam Ravnborg
0 siblings, 1 reply; 8+ messages in thread
From: Marcel Holtmann @ 2006-07-13 13:30 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Arjan van de Ven, jakub, linux-kernel
Hi Sam,
> > > you are using ubuntu which has a compiler that adds -fstack-protector
> > > implicitly to the compiler options, yet you don't have a kernel that
> > > provides this infrastructure ;)
> So go bug ubuntu...
yeah, yeah.
> > I couldn't find such a patch in Sam's repository
> From -linus:
> # Force gcc to behave correct even for buggy distributions
> CFLAGS += $(call cc-option, -fno-stack-protector-all \
> -fno-stack-protector)
I used the latest tree from Linus and I see this in the Makefile, but it
is not working.
Regards
Marcel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Linker error with latest tree on EM64T
2006-07-13 13:30 ` Marcel Holtmann
@ 2006-07-13 16:10 ` Sam Ravnborg
2006-07-13 16:17 ` Marcel Holtmann
0 siblings, 1 reply; 8+ messages in thread
From: Sam Ravnborg @ 2006-07-13 16:10 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: Arjan van de Ven, jakub, linux-kernel
Hi Marcel.
> > From -linus:
> > # Force gcc to behave correct even for buggy distributions
> > CFLAGS += $(call cc-option, -fno-stack-protector-all \
> > -fno-stack-protector)
>
> I used the latest tree from Linus and I see this in the Makefile, but it
> is not working.
Unexpected - let's see if we can nail it down then.
Can you please try to edit the line above to include only one of the -f
options and see if that helps. make V=1 may help to identify if the flag
are picked up or not.
Also could you try executing:
if gcc -fno-stack-protector-all -S -o /dev/null -xc /dev/null; then \
echo "y"; else echo "n"; fi
And see if this gives a "y" or a "n".
Try with -fno-stack-protector-all and with -fno-stack-protector.
Sam
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Linker error with latest tree on EM64T
2006-07-13 16:10 ` Sam Ravnborg
@ 2006-07-13 16:17 ` Marcel Holtmann
2006-07-13 18:29 ` Sam Ravnborg
0 siblings, 1 reply; 8+ messages in thread
From: Marcel Holtmann @ 2006-07-13 16:17 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Arjan van de Ven, jakub, linux-kernel
Hi Sam,
> > > From -linus:
> > > # Force gcc to behave correct even for buggy distributions
> > > CFLAGS += $(call cc-option, -fno-stack-protector-all \
> > > -fno-stack-protector)
> >
> > I used the latest tree from Linus and I see this in the Makefile, but it
> > is not working.
> Unexpected - let's see if we can nail it down then.
> Can you please try to edit the line above to include only one of the -f
> options and see if that helps. make V=1 may help to identify if the flag
> are picked up or not.
see my previous email. This patch fixed it for me:
diff --git a/Makefile b/Makefile
index 7c010f3..b4a2a80 100644
--- a/Makefile
+++ b/Makefile
@@ -308,7 +308,7 @@ LINUXINCLUDE := -Iinclude \
CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE)
CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
- -fno-strict-aliasing -fno-common
+ -fno-strict-aliasing -fno-common -fno-stack-protector
# Force gcc to behave correct even for buggy distributions
CFLAGS += $(call cc-option, -fno-stack-protector-all \
-fno-stack-protector)
> Also could you try executing:
> if gcc -fno-stack-protector-all -S -o /dev/null -xc /dev/null; then \
> echo "y"; else echo "n"; fi
> And see if this gives a "y" or a "n".
> Try with -fno-stack-protector-all and with -fno-stack-protector.
With -fno-stack-protector I get a "y" and with -fno-stack-protector-all
I get an error:
cc1: error: unrecognized command line option "-fno-stack-protector-all"
Regards
Marcel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: Linker error with latest tree on EM64T
2006-07-13 16:17 ` Marcel Holtmann
@ 2006-07-13 18:29 ` Sam Ravnborg
0 siblings, 0 replies; 8+ messages in thread
From: Sam Ravnborg @ 2006-07-13 18:29 UTC (permalink / raw)
To: Marcel Holtmann; +Cc: Arjan van de Ven, jakub, linux-kernel
On Thu, Jul 13, 2006 at 06:17:06PM +0200, Marcel Holtmann wrote:
>
> see my previous email. This patch fixed it for me:
>
> diff --git a/Makefile b/Makefile
> index 7c010f3..b4a2a80 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -308,7 +308,7 @@ LINUXINCLUDE := -Iinclude \
> CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE)
>
> CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
> - -fno-strict-aliasing -fno-common
> + -fno-strict-aliasing -fno-common -fno-stack-protector
> # Force gcc to behave correct even for buggy distributions
> CFLAGS += $(call cc-option, -fno-stack-protector-all \
> -fno-stack-protector)
>
> > Also could you try executing:
> > if gcc -fno-stack-protector-all -S -o /dev/null -xc /dev/null; then \
> > echo "y"; else echo "n"; fi
> > And see if this gives a "y" or a "n".
> > Try with -fno-stack-protector-all and with -fno-stack-protector.
>
> With -fno-stack-protector I get a "y" and with -fno-stack-protector-all
> I get an error:
>
> cc1: error: unrecognized command line option "-fno-stack-protector-all"
OK. I changed it to apply only -fno-stack-protector (not the -all
version).
Sam
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-07-13 18:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-13 10:56 Linker error with latest tree on EM64T Marcel Holtmann
2006-07-13 10:59 ` Arjan van de Ven
2006-07-13 11:58 ` Marcel Holtmann
2006-07-13 13:26 ` Sam Ravnborg
2006-07-13 13:30 ` Marcel Holtmann
2006-07-13 16:10 ` Sam Ravnborg
2006-07-13 16:17 ` Marcel Holtmann
2006-07-13 18:29 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox