All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: linux-arch@vger.kernel.org, Matthew Wilcox <matthew@wil.cx>,
	David Woodhouse <dwmw2@infradead.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Rusty Russell <rusty@rustcorp.com.au>
Subject: RFC: killing ksyms.c
Date: Mon, 11 Aug 2008 16:06:43 +0200	[thread overview]
Message-ID: <200808111606.44103.arnd@arndb.de> (raw)

I saw this conversation on IRC when I came back to my screen, and
managed to dig out an older patch of mine:

[19:03:13] <willy> at some point we really need to forbid that
[19:03:28] <willy> bit hard at this point with things like memcpy()
[19:04:36] <willy> could do it with a script of some kind and
           either a whitelist of filenames (arch/*/kernel/ksyms.c
           can export anything) or of functions (anywhere can
           EXPORT_SYMBOL(memcpy)).
[Sun Aug 10 2008] [19:07:35] <viro> I suspect that we really want
           to teach *.S how to do exports
[Sun Aug 10 2008] [19:07:58] <viro> and kill ksyms.c
[Sun Aug 10 2008] [19:12:47] <dwmw2_gone> if we do the -fwhole-program
           --combine thing we'll make it hard anyway

I compile-tested this on powerpc, 32 and 64 bit, and it should be usable as
an example for other architectures.
The idea is to provide an EXPORT_SYMBOL macro for assembly that
behaves in the same way as the C version, and then export every
symbol from the file that defines it.

I'm not sure if the macro I used is actually correct or portable across
all supported architectures, so I hope to get some insight about this
from linux-arch. It does not do genksyms versioned symbol generation
from assembly, but that should be fine since they tend to be really
stable.

	Arnd <><

             reply	other threads:[~2008-08-11 14:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-11 14:06 Arnd Bergmann [this message]
2008-08-11 14:17 ` [RFC 2/3] powerpc: export all symbols from the definition file Arnd Bergmann
2008-08-11 14:17   ` Arnd Bergmann
2008-08-11 14:53   ` Geert Uytterhoeven
2008-08-11 14:53     ` Geert Uytterhoeven
2008-08-11 15:27     ` Arnd Bergmann
2008-08-11 15:27       ` Arnd Bergmann
2008-08-11 14:18 ` [RFC 1/3] add support for exporting symbols from .S files Arnd Bergmann
2008-08-11 14:18   ` Arnd Bergmann
2008-08-11 14:56   ` David Woodhouse
2008-08-11 14:56     ` David Woodhouse
2008-08-12  2:03   ` Rusty Russell
2008-08-12  2:03     ` Rusty Russell
2008-08-12  6:43   ` Stephen Rothwell
2008-08-12  6:43     ` Stephen Rothwell
2008-08-12 13:58     ` Arnd Bergmann
2008-08-12 13:58       ` Arnd Bergmann
2008-08-11 14:25 ` [RFC 3/3] powerpc: remove ppc_ksyms.c Arnd Bergmann
2008-08-11 14:25   ` Arnd Bergmann
2008-08-11 15:03 ` RFC: killing ksyms.c Adrian Bunk

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=200808111606.44103.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=dwmw2@infradead.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=rusty@rustcorp.com.au \
    --cc=viro@zeniv.linux.org.uk \
    /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 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.