mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Initcall depends
Date: Tue, 18 Jun 2002 10:17:10 +1000	[thread overview]
Message-ID: <E17K6gI-0001Ga-00@wagner.rustcorp.com.au> (raw)
In-Reply-To: Your message of "Mon, 17 Jun 2002 17:43:11 EST." <Pine.LNX.4.44.0206171658470.22308-100000@chaos.physics.uiowa.edu>

In message <Pine.LNX.4.44.0206171658470.22308-100000@chaos.physics.uiowa.edu> y
ou write:
> Parts of a solution could be (based on yours above).
> 
> o Define KBUILD_OBJECT during the build, which contains the
>   name of the module the file we're building will/would end up.
> 
> o Use that to rename the __initcall_whatever to
>   __initcall__module__whatever.
> 
> o Make a symlink tree pointing to the objects that will be linked in
>   (Basically $(obj-y))
> 
> o Go through the symlink tree and for all objects which export objects
>   and have __initcalls, record that relation.

Hmm... how about "put export symbols in __ksymtab in object file even
if CONFIG_MODULE=n", just discard them in the final link.

Then build up table from that (we're looking at the objects anyway).

> o For all __initcall__moduleA__ in the objects to be linked into 
>   vmlinux, find the object that defines it in the symlink tree (its name
>   will be moduleA.o).
> 
> o Find the unresolved symbols in that object moduleA.o.
> 
> o For each unresolved symbol in moduleA.o, if you find the symbol in the 
>   previously recorded pairs of (exported symbols, __initcall__moduleB), 
>   move __initcall_moduleA behind __initcall_moduleB.
> 
> Probably some issues come up when actually trying to do this, but it 
> sounds doable at least in principle.

I'll have to think some more and see if I can come up with something
along these lines.

> 
> Then again, there's also the possibility of completing initramsfs, making
> it mandatory, compiling things always as modules and leaving it to
> "depmod" in initramfs to do the right thing.

If that ever happens... 8)
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

  reply	other threads:[~2002-06-18  0:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-17  0:28 Rusty Russell
2002-06-17  1:17 ` Kai Germaschewski
2002-06-17 21:43   ` Rusty Russell
2002-06-17 22:43     ` Kai Germaschewski
2002-06-18  0:17       ` Rusty Russell [this message]
2002-06-18 10:55         ` Ingo Oeser
2002-07-22  8:46 Rusty Russell

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=E17K6gI-0001Ga-00@wagner.rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=kai@tp1.ruhr-uni-bochum.de \
    --cc=linux-kernel@vger.kernel.org \
    /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®