[PATCH] D46472: [HIP] Support offloading by linker script

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 18 16:26:08 PDT 2018


tra added inline comments.


================
Comment at: cfe/trunk/lib/Driver/ToolChains/CommonArgs.cpp:1371-1388
+  // machines.
+  LksStream << "/*\n";
+  LksStream << "       HIP Offload Linker Script\n";
+  LksStream << " *** Automatically generated by Clang ***\n";
+  LksStream << "*/\n";
+  LksStream << "TARGET(binary)\n";
+  LksStream << "INPUT(" << BundleFileName << ")\n";
----------------
Using this linker script may present a problem.

INSERT BEFORE is not going to work with ld.gold.
https://sourceware.org/bugzilla/show_bug.cgi?id=15373

LLD also does not handle it particularly well -- INSERT BEFORE can only be used to override explicitly specified external linker script and virtually nobody uses linker scripts with LLD.
See tests in https://reviews.llvm.org/D44380



Repository:
  rL LLVM

https://reviews.llvm.org/D46472





More information about the llvm-commits mailing list