From: Jakub Jelinek <jakub@redhat.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Andrew Morton <akpm@zip.com.au>, Josh McKinney <forming@home.com>,
linux-kernel@vger.kernel.org,
Jeff Garzik <jgarzik@mandrakesoft.com>
Subject: Re: Fwd: binutils in debian unstable is broken.
Date: Wed, 5 Dec 2001 04:49:49 -0500 [thread overview]
Message-ID: <20011205044949.T4087@devserv.devel.redhat.com> (raw)
In-Reply-To: <3C0DB3D6.9C86B865@zip.com.au> <E16BXeV-0005Im-00@the-village.bc.nu>
In-Reply-To: <E16BXeV-0005Im-00@the-village.bc.nu>; from alan@lxorguk.ukuu.org.uk on Wed, Dec 05, 2001 at 08:43:39AM +0000
On Wed, Dec 05, 2001 at 08:43:39AM +0000, Alan Cox wrote:
> > The problem appears to be that the linker is now actually doing what
> > we asked it to do, so the `remove_foo' entry in that table now points
> > at a function which isn't going to be linked into the kernel. Oh dear.
>
> The ideal it seems would be for binutils to support passing a stub function
> to use in such cases. That would keep the kernel stuff working nicely and
> allow us to do panic("__exit code called"); if anyone actually did manage
> to call one.
In binutils? This sounds more like kernel should do it...
If all .text.exit functions were not static, it would be pretty easy to do,
but I guess they are usually static. In that case, I think it would take
about 1 day hacking an libelf program, which would rewrite all object files
which are going to be linked into vmlinux, which would add a new SHN_UND symbol to
each .symtab/.strtab (say __devexit_called) and change all relocs against
symbols in .text.exit sections to this symbol instead.
Maybe even it would take even less time, it is not that hard.
Jakub
next prev parent reply other threads:[~2001-12-05 9:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-05 5:05 Fwd: binutils in debian unstable is broken Josh McKinney
2001-12-05 5:20 ` Daniel T. Chen
2001-12-05 5:42 ` Andrew Morton
2001-12-05 6:41 ` Andrew Morton
2001-12-05 9:37 ` eddantes
2001-12-05 10:58 ` Mike Fedyk
2001-12-05 8:43 ` Alan Cox
2001-12-05 9:49 ` Jakub Jelinek [this message]
2001-12-05 13:34 ` Eric Lammerts
2001-12-05 14:18 ` Jeff Garzik
2001-12-06 15:09 ` Kai Germaschewski
2001-12-05 14:38 ` David Woodhouse
-- strict thread matches above, loose matches on Subject: below --
2001-12-05 5:19 Frédéric L. W. Meunier
2001-12-05 5:25 ` Daniel T. Chen
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=20011205044949.T4087@devserv.devel.redhat.com \
--to=jakub@redhat.com \
--cc=akpm@zip.com.au \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=forming@home.com \
--cc=jgarzik@mandrakesoft.com \
--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