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

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 25 02:35:20 PDT 2018


grimar added a comment.

New options should be mentioned in doc, see:
/lld/trunk/docs/ld.lld.1



================
Comment at: ELF/Config.h:180
   bool WarnSymbolOrdering;
+  bool WarnIfuncTextrel;
   bool WriteAddends;
----------------
Flags here are alphabetically sorted, so `WarnIfuncTextrel` should be before the `WarnMissingEntry` I think.


================
Comment at: test/ELF/textrel.s:4
+
+# Without --warn-text-ifunc, ld should run fine:
+# RUN: ld.lld -z notext %t.o -o %t2
----------------
ld -> lld


================
Comment at: test/ELF/textrel.s:15
+#   %t.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=error
+# CHECK: error: Using IFUNC symbols when text relocations are allowed may
+
----------------
I think we need to check the full error message. Including the location it prints.


================
Comment at: test/ELF/textrel.s:17
+
+# Without text relocations, ld should run fine:
+# RUN: ld.lld --fatal-warnings %t.o -o /dev/null
----------------
The same.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D52430





More information about the llvm-commits mailing list