From: Marco Gerards <metgerards@student.han.nl>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Generating init and fini functions
Date: Wed, 09 Nov 2005 12:10:38 +0100 [thread overview]
Message-ID: <8764r2vzyp.fsf@student.han.nl> (raw)
In-Reply-To: <7e77098236cf144d2d2aa39833380e21@penguinppc.org> (Hollis Blanchard's message of "Wed, 9 Nov 2005 00:02:32 -0600")
Hollis Blanchard <hollis@penguinppc.org> writes:
> On Nov 8, 2005, at 5:18 PM, Marco Gerards wrote:
>>
>> At the moment I am working on things that irritate me while I am
>> working on GRUB. One thing is writing a duplicate _init and _fini
>> function (duplicate because it already is added in GRUB_MOD_INIT).
>> And another thing that irritates me is that I have to add a init line
>> to grub-emu.
>>
>> Here is a patch that solves that. First I removed all the init and
>> fini functions and let GRUB_MOD_INIT and GRUB_MOD_FINI generate these
>> functions. I have added a script that creates a header file with all
>> the function prototypes for these generated functions. And finally I
>> have added a script that can generate a C file with the functions
>> `grub_init_all' and `grub_fini_all'.
>
> This is good. :)
>
> The way Linux does this, avoiding shell scripting, is by inserting
> function pointers into a special ELF section, and that section is
> looped over using linker symbols defining the beginning and end.
Right, but this is not for modules, but for the cases that modules are
not used. And this matches the way how other scripts in GRUB 2 work.
--
Marco
next prev parent reply other threads:[~2005-11-09 11:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-08 23:18 Generating init and fini functions Marco Gerards
2005-11-09 6:02 ` Hollis Blanchard
2005-11-09 11:10 ` Marco Gerards [this message]
2005-11-09 7:42 ` Tomáš Ebenlendr
2005-11-09 9:38 ` Marco Gerards
2005-11-09 18:55 ` Timothy Baldwin
2005-11-09 19:17 ` Marco Gerards
2005-11-13 15:49 ` Marco Gerards
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=8764r2vzyp.fsf@student.han.nl \
--to=metgerards@student.han.nl \
--cc=grub-devel@gnu.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 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.