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

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 25 15:58:04 PDT 2018


ruiu added a comment.

That error message is displayed in one line, and usually error messages are not that long. And still the error message does not contain enough information about the warning. The other way to print out that error message is to make it more brief and include a URL to explain the issue, like this:

  error: IFUNC symbols and text relocations are not allowed. For more info, see http://lld.llvm.org/ifunc-textrel

I feel this is better than a long error message, as we can explain the issue on the website.

What do you think? What other people think?



================
Comment at: ELF/Relocations.cpp:988
+          "a binary that will segfault, if the object file is linked with "
+          "old version of glibc (The issue is fixed with version 2.29). "
+          "If this applies to you, consider recompiling the object files "
----------------
"glibc 2.28 or earlier" is perhaps better because glibc 2.29 doesn't exit yet.


================
Comment at: docs/ld.lld.1:432
+.It Fl -warn-ifunc-textrel
+Warn about usinc ifunc symbols in conjunction with text relocations.
+This will cause segment faults if linked with glibc version 2.28 and before.
----------------
using
IFUNC


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D52430





More information about the llvm-commits mailing list