From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: jan.kratochvil@redhat.com
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] STT_GNU_IFUNC support
Date: Sun, 14 Feb 2010 21:43:00 -0000 [thread overview]
Message-ID: <201002142142.o1ELgUYd007120@glazunov.sibelius.xs4all.nl> (raw)
In-Reply-To: <20100214203512.GA838@host0.dyn.jankratochvil.net> (message from Jan Kratochvil on Sun, 14 Feb 2010 21:35:12 +0100)
> Date: Sun, 14 Feb 2010 21:35:12 +0100
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
>
> STT_GNU_IFUNC is defined in OS-specific range:
>
> #define STT_LOOS 10 /* OS-specific semantics */
> #define STT_GNU_IFUNC 10 /* Symbol is an indirect code object */
> #define STT_HIOS 12 /* OS-specific semantics */
>
> ...
>
> Due to the function descriptors similarity I had to hook it into the OSABI
> framework which does not support any inheritance. Single OSABI is chosen.
> gnu-ifunc is only OS-dependent (GNU) and not arch dependent, though.
> Therefore gnu-ifunc had to be hooked into all the OS-ARCH combinations where
> the GNU OS gets installed as OSABI (=> *-linux-tdep.c).
While the symbol may be in the OS-specific range it is actually more
toolchain dependent than OS-dependent. Unless I'm missing something,
all OS'es that use binutils as their toolchain will support
STT_GNU_IFUNC. In particular, I expect the various BSD's to
eventually support this too, and I found a Google groups discussion
that said that while Sun^H^H^Oracle has no immediate plans to support
this extension, they may eventually do and will reserve the slot
occupied by STT_GNU_IFUNC in the STT_LOOS-STT_HIOS range.
This has happened before with GNU extensions. OpenBSD/sh supports
some GNU-specific ELF relocations and I personally added support for
PT_GNU_EH_FRAME to OpenBSD to make DWARF-based exception handling work
on several OpenBSD platforms.
So I think you should move the gnu-ifunc support code out of
linux-tdep.c into a more generic file. And perhaps we should consider
enabling support for it on all supported ELF platforms. Given that
Sun is aware of STT_GNU_IFUNC, I don't think there is a serious risk
of another OS vendor using the value occupied by STT_GNU_IFUNC for a
different purpose.
next prev parent reply other threads:[~2010-02-14 21:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-14 20:35 Jan Kratochvil
2010-02-14 21:43 ` Mark Kettenis [this message]
2010-02-14 21:59 ` Jan Kratochvil
2010-02-15 18:40 ` Daniel Jacobowitz
2010-02-15 18:49 ` Jan Kratochvil
2010-02-17 12:34 ` Pedro Alves
2010-02-17 14:19 ` Jan Kratochvil
2010-02-17 14:46 ` Daniel Jacobowitz
2010-02-17 17:45 ` Jan Kratochvil
2010-02-17 14:52 ` Pedro Alves
2010-02-17 17:33 ` Jan Kratochvil
2010-02-17 17:55 ` Pedro Alves
2010-02-17 18:12 ` Jan Kratochvil
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=201002142142.o1ELgUYd007120@glazunov.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
/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