| Issue |
83509
|
| Summary |
clang-offload-bundler mixes symbols from different objects when unbundling an archive
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
LU-JOHN
|
Change to clang/lib/Driver/OffloadBundler.cpp in commit https://github.com/llvm/llvm-project/pull/81700 causes clang-offload-bundler to join symbols from different objects when unbundling an archive:
Source file s.cpp:
> void bazball() {
> }
Source file t.cpp:
> void foobar() {
> }
Commands:
> clang++ -c s.cpp -o s.o;
> clang-offload-bundler -type=o -targets=host-x86_64-unknown-linux-gnu -input=s.o -output=s_bundled.o;
> clang++ -c t.cpp -o t.o;
> clang-offload-bundler -type=o -targets=host-x86_64-unknown-linux-gnu -input=t.o -output=t_bundled.o;
> llvm-ar cr bundled.a s_bundled.o t_bundled.o
> clang-offload-bundler -unbundle --targets=host-x86_64-unknown-linux-gnu -type=aoo -input=bundled.a -output=t_list.txt; nm \`cat t_list.txt\`
The output of the nm command without the change is:
> bundled-742762.o:
> 0000000000000000 T _Z7bazballv
> bundled-61506b.o:
> 0000000000000000 T _Z6foobarv
>
The output with the change is:
> /tmp/bundled-e7ca35.o:s_bundled.o:
> 0000000000000000 T _Z7bazballvt_bundled.o:
> 0000000000000000 T _Z6foobarv
>
> /tmp/bundled-5ea078.o:s_bundled.o:
> 0000000000000000 T _Z7bazballvt_bundled.o:
> 0000000000000000 T _Z6foobarv
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs