[PATCH] D131162: [MC][ELF] Mark GNU ABI if ifunc are used

Adhemerval Zanella via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 24 05:44:26 PDT 2022


zatrazz added a comment.

In D131162#3708701 <https://reviews.llvm.org/D131162#3708701>, @MaskRay wrote:

> The SHF_GNU_RETAIN change is more so that GNU ld recognizes its semantics, less about the `readelf -s` output. With many systems adopting GNU ABI features, I do not know whether it makes significant sense to "upgrade" ELFOSABI_NONE to ELFOSABI_GNU.

I came up with this change mainly to make glibc configure script to detect that clang can actually use the ifunc attribute, otherwise it will use the old inline asm macros which might be subpar regarding debug information [1].

And I think this change also aligns with the recent discussion gABI where iFUNC does make the object ELFOSABI_GNU.

[1] https://sourceware.org/git/?p=glibc.git;a=blob;f=configure.ac;h=eb5bc6a1313acb3f3614645739adeb7638f19617;hb=HEAD#l657


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131162/new/

https://reviews.llvm.org/D131162



More information about the llvm-commits mailing list