[PATCH] D69313: Handle more crt*.o filename variants.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 24 11:20:34 PDT 2019


MaskRay added a comment.

You may need to update the file `test/ELF/ctors_dtors_priority.s`, delete the existing `%t-crtbegin.o` RUN lines, `mkdir %t`, add crtbegin.o and clang_rt.crtbegin.o RUN lines. You can run the ELF specific tests with `ninja check-lld-elf`.



================
Comment at: lld/ELF/OutputSections.cpp:388
 
-// Returns true if S matches /Filename.?\.o$/.
-static bool isCrtBeginEnd(StringRef s, StringRef filename) {
-  if (!s.endswith(".o"))
-    return false;
-  s = s.drop_back(2);
-  if (s.endswith(filename))
-    return true;
-  return !s.empty() && s.drop_back().endswith(filename);
+// Returns true if S is in one of the many forms the driver may
+// pass crtbegin files.
----------------
driver -> compiler driver


Repository:
  rL LLVM

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

https://reviews.llvm.org/D69313





More information about the llvm-commits mailing list