[PATCH] D119278: [LLD] Fix issue in HIP toolchain due to unspecified order of evaluation of the function object
Alexandre Ganea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 8 16:12:33 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbb8be26a7ec3: [LLD] Fix issue in HIP due to unspecified order of evaluation of the function… (authored by aganea).
Changed prior to commit:
https://reviews.llvm.org/D119278?vs=406938&id=407008#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119278/new/
https://reviews.llvm.org/D119278
Files:
lld/test/ELF/amdgpu-duplicate-sym.s
lld/tools/lld/lld.cpp
Index: lld/tools/lld/lld.cpp
===================================================================
--- lld/tools/lld/lld.cpp
+++ lld/tools/lld/lld.cpp
@@ -159,9 +159,9 @@
die("lld is a generic driver.\n"
"Invoke ld.lld (Unix), ld64.lld (macOS), lld-link (Windows), wasm-ld"
" (WebAssembly) instead");
- };
+ }();
// Run the driver. If an error occurs, false will be returned.
- bool r = link()(args, stdoutOS, stderrOS, exitEarly, inTestOutputDisabled);
+ bool r = link(args, stdoutOS, stderrOS, exitEarly, inTestOutputDisabled);
// Call exit() if we can to avoid calling destructors.
if (exitEarly)
Index: lld/test/ELF/amdgpu-duplicate-sym.s
===================================================================
--- /dev/null
+++ lld/test/ELF/amdgpu-duplicate-sym.s
@@ -0,0 +1,26 @@
+# REQUIRES: amdgpu
+# RUN: llvm-mc -filetype=obj -triple amdgcn-amd-amdhsa -mcpu=gfx1031 --position-independent --relax-relocations %s -o %t.o
+
+# We use lld-link on purpose to exercise -flavor.
+# RUN: lld-link -flavor gnu -shared %t.o
+
+ .text
+ .amdgcn_target "amdgcn-amd-amdhsa--gfx1031"
+ .protected xxx ; @xxx
+ .type xxx, at object
+ .data
+ .globl xxx
+xxx:
+ .long 123 ; 0x7b
+
+ .addrsig
+ .amdgpu_metadata
+---
+amdhsa.kernels: []
+amdhsa.target: amdgcn-amd-amdhsa--gfx1031
+amdhsa.version:
+ - 1
+ - 1
+...
+
+ .end_amdgpu_metadata
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119278.407008.patch
Type: text/x-patch
Size: 1501 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220209/8d870858/attachment.bin>
More information about the llvm-commits
mailing list