This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: GCC function multi-versioning behaviour on Linux vs. macOS
- From: Xi Ruoyao <ryxi at stu dot xidian dot edu dot cn>
- To: kim dot walisch at gmail dot com
- Cc: ryxi at stu dot xidian dot edu dot cn, gcc-help at gcc dot gnu dot org
- Date: Mon, 27 Feb 2017 22:57:00 +0800
- Subject: Re: GCC function multi-versioning behaviour on Linux vs. macOS
- Authentication-results: sourceware.org; auth=none
- References: <CAE_DJ13VGYeKueOqaWwwpAfsXDooEv9_Ybop-KeUBArMa8bxHQ@mail.gmail.com>
On 2017-02-27 14:22 +0100, Kim Walisch wrote:
> Is this a known issue on macOS? Does function multi-versioning only work on
> Linux or am I doing something wrong?
It doesn't work on Mac OS X.
The implementation of "target" attribute is using the STT_GNU_IFUNC symbol
type extension to the ELF standard. H. J. Lu once explained this
(<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40528#c13>):
You have to ask BSD and Mac people since IFUNC support needs to be
implemented in both binutils and the C library.
--
Xi Ruoyao <ryxi@stu.xidian.edu.cn>
School of Aerospace Science and Technology, Xidian University