9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] Building new kernel.
Date: Tue, 22 Jul 2008 14:19:49 -0400	[thread overview]
Message-ID: <dc783463b845c1e7832fa5cacf19b73a@quanstro.net> (raw)
In-Reply-To: <0b6ee1c89e58c4e41f8810c5ba0c1cae@quanstro.net>

> this would be expected due to the pull which sets the mtimes of
> new files to be older than the .8s.  try "mk clean" before proceeding.

i should explain that type signatures are 32-bit
signatures in .$O files that define the type of
external symbols.  the c compiler sets the type
signature to zero unless the -T flag is given.
if both signatures are not zero, the linker
checks to see that they match.

thus if you try to link a.c with decl
	extern int fu;
with b.c
	long fu
it will work perfectly if the -T flag is not
given (since there is a deep assumption
in plan 9 that int == long).  but i the
-T flag is given, it will fail with a type
signature error.

- erik

----
	minooka; cat a.c
	long fu;
	minooka; cat b.c
	#include <u.h>
	#include <libc.h>

	extern int fu;

	void
	main(void)
	{
		print("%d\n", fu);
	}

	minooka; 8c a.c && 8c b.c && 8l a.8 b.8 && 8.out
	0

	minooka; 8c -T a.c && 8c b.c && 8l a.8 b.8 && 8.out
	0

	minooka; 8c a.c && 8c -T b.c && 8l a.8 b.8 && 8.out
	0

	minooka; 8c -T a.c && 8c -T b.c && 8l a.8 b.8 && 8.out
	main: incompatible type signatures 5ef20f47(a.8) and 4151d5bd(b.8) for fu




  reply	other threads:[~2008-07-22 18:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-22 16:01 Robert Hibberdine
2008-07-22 16:04 ` erik quanstrom
2008-07-22 17:34   ` Robert Hibberdine
2008-07-22 18:03     ` erik quanstrom
2008-07-22 18:19       ` erik quanstrom [this message]
2008-07-22 18:48         ` Charles Forsyth
2008-07-22 18:49           ` erik quanstrom
2008-07-22 19:35             ` Charles Forsyth
2008-07-22 19:38               ` erik quanstrom
2008-07-22 19:16       ` Robert Hibberdine
2008-07-22 20:01         ` Jerome Ibanes
2008-07-22 20:13           ` erik quanstrom
2008-07-22 20:35             ` Jerome Ibanes
2008-07-22 20:40               ` erik quanstrom
2008-07-23  1:19                 ` Jerome Ibanes
2008-07-22 20:51               ` Jerome Ibanes
2008-07-22 21:05                 ` [9fans] Sam on 9pm or plan9port Benjamin Huntsman
2008-07-22 22:24                   ` Edward Hirgelt
2008-07-22 22:27                     ` Benjamin Huntsman
2008-07-22 22:57                       ` Skip Tavakkolian
2008-07-22 23:16                       ` Steve Simon
2008-07-22 16:06 ` [9fans] Building new kernel a
2008-07-22 16:26   ` Robert Hibberdine
2008-07-23  1:28 ` Jerome Ibanes
2008-07-23  1:26   ` erik quanstrom
2008-07-23  3:15     ` Russ Cox
2008-07-23 19:52   ` Robert Hibberdine

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=dc783463b845c1e7832fa5cacf19b73a@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /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;
as well as URLs for NNTP newsgroup(s).