[PATCH] D52430: Introduce a flag to warn when IFUNC symbols are used with text relocations.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 25 13:45:42 PDT 2018


MaskRay added inline comments.


================
Comment at: ELF/Relocations.cpp:986
+    if (!Config->ZText && Config->WarnIfuncTextrel) {
+      warn("using IFUNC symbols when text relocations are allowed may produce "
+          "a binary that will segfault, if the object file is linked with "
----------------
ruiu wrote:
> Please add the latest version of glibc and today's date along with a link to the bug management system's entry for the glibc crash issue as a comment, so that we can easily check whether a bug is fixed or not in the future. This flag is temporary; this is a workaround for the nasty glibc bug. We want to remove the flag within perhaps 5 years.
The incompatibility issue has been fixed today (2018-09-25)
https://sourceware.org/bugzilla/show_bug.cgi?id=20480#c19

The next release glibc 2.29 will include the patch and run such executable fine.

There might be other security layers that block such executable from running (I am not sure if selinux can do such things) but they are not things linkers should consider.

You may consider changing the warning a bit to include the version information if this change is considered helpful. (It assuredly takes a long time for Linux distributions to adopt newer versions of glibc)


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D52430





More information about the llvm-commits mailing list