[PATCH] D15524: [GCC] Attribute ifunc support in clang
Eric Christopher via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 8 11:15:37 PDT 2016
On Fri, Apr 8, 2016, 10:45 AM Paul Robinson <
Paul_Robinson at playstation.sony.com> wrote:
> probinson added inline comments.
> Comment at: include/clang/Basic/AttrDocs.td:2371
> @@ +2370,3 @@
> +Not all targets support this attribute. ELF targets support this
> attribute when using binutils v2.20.1 or higher and glibc v2.11.1 or
> higher. Non-ELF targets currently do not support this attribute.
> + }];
> joerg wrote:
> > probinson wrote:
> > > echristo wrote:
> > > > rjmccall wrote:
> > > > > echristo wrote:
> > > > > > Probably better to say linux fwiw and not ELF.
> > > > > The validation code in Sema is checking for an ELF target. If the
> restriction is more precise than that, then we should make a TargetInfo
> callback. Do the BSDs and other ELF targets not use binutils/glibc?
> > > > We should make a TargetInfo callback. BSDs and other ELF targets
> aren't guaranteed to use binutils/glibc (some of them have even switched to
> llvm already) - and I don't know what the state of ifunc support on those
> architectures is.
> > > Hear hear. PS4 is ELF but we don't use glibc.
> > The attribute is not Linux specific, so ELF is a reasonable first
> approximation. Most BSDs have some ifunc support at least. I'm not in favor
> of doing any checks beyond ELF -- even on Linux the availability of working
> ifunc support depends on other factors like whether the binary is
> dynamically linked.
> What's the failure mode if the target doesn't actually support it?
Unknown relocation likely.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits