mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: vlobanov <vlobanov@speakeasy.net>
To: Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [TRIVIAL PATCH] /init/version.c
Date: Wed, 3 Nov 2004 13:19:41 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0411031317020.20083@shell2.speakeasy.net> (raw)
In-Reply-To: <200411032311.21820.vda@port.imtp.ilyichevsk.odessa.ua>

Gotcha. Thanks.

I'll redo it correctly a bit later, with
	const char msg[]; and extern char msg[];
instead of
	const char * msg; and extern char * msg;

-Vadim Lobanov

On Wed, 3 Nov 2004, Denis Vlasenko wrote:

> On Wednesday 03 November 2004 18:34, vlobanov wrote:
> > It seems to compile just fine. Here are the relevant snippets:
> >
> >   UPD     include/asm-i386/asm_offsets.h
> >   CC      init/main.o
> >   CHK     include/linux/compile.h
> >   UPD     include/linux/compile.h
> >   CC      init/version.o
> >   CC      init/do_mounts.o
> >
> > ...and...
> >
> >   CC      fs/proc/proc_tty.o
> >   CC      fs/proc/proc_misc.o
> >   CC      fs/proc/kcore.o
> >
> > Why did you believe it would not compile? (Just so I can be extra
> > careful about this kind of code in the future.)
>
> I was wrong. It compiles but won't work right:
>
> a.c:
> char msg[] = "boo";
>
> b.c:
> #include <stdio.h>
> extern char *msg;
> int main() {
> 	puts(msg);
> 	return 0;
> }
>
> # gcc b.c a.c
> # ./a.out
> Segmentation fault
>
> --
> vda
>
>

      reply	other threads:[~2004-11-03 21:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-03  8:04 vlobanov
2004-11-03  8:29 ` Jan Engelhardt
2004-11-03 10:29   ` Denis Vlasenko
2004-11-03 16:34     ` vlobanov
2004-11-03 21:11       ` Denis Vlasenko
2004-11-03 21:19         ` vlobanov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0411031317020.20083@shell2.speakeasy.net \
    --to=vlobanov@speakeasy.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vda@port.imtp.ilyichevsk.odessa.ua \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®