aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Interpreter/ScriptInterpreter.cpp
diff options
context:
space:
mode:
authorAdityaK <1894981+hiraditya@users.noreply.github.com>2023-02-01 12:18:35 -0800
committerAdityaK <1894981+hiraditya@users.noreply.github.com>2023-02-06 15:32:45 -0800
commit28bd84f55fc087d4aefd3fe5360f8648d1d50980 (patch)
tree7cca8ee4f5c4d9a61e6f4f855574e46174baddb2 /lldb/source/Interpreter/ScriptInterpreter.cpp
parent5e33e3014ecd98f2f8f9c1b7464a3ee5294e957c (diff)
downloadllvm-28bd84f55fc087d4aefd3fe5360f8648d1d50980.zip
llvm-28bd84f55fc087d4aefd3fe5360f8648d1d50980.tar.gz
llvm-28bd84f55fc087d4aefd3fe5360f8648d1d50980.tar.bz2
[RISCV] Allow mismatched SmallDataLimit and use Min for conflicting values
Authored By: joshua-arch1 (Jun Sha) Reviewed By: shiva0217, apazos, luismarques, asb, jrtc27, MaskRay Reviewers: MaskRay, jrtc27 Differential Revision: https://reviews.llvm.org/D131230 This patch is to fix an issue about module linking with LTO. When compiling with PIE, the small data limitation needs to be consistent with that in PIC, otherwise there will be linking errors due to conflicting values. bar.c int bar() { return 1; } foo.c int foo() { return 1; } clang --target=riscv64-unknown-linux-gnu -flto -c foo.c -o foo.o -fPIE clang --target=riscv64-unknown-linux-gnu -flto -c bar.c -o bar.o -fPIC clang --target=riscv64-unknown-linux-gnu -flto foo.o bar.o -flto -nostdlib -v -fuse-ld=lld ld.lld: error: linking module flags 'SmallDataLimit': IDs have conflicting values in 'bar.o' and 'ld-temp.o' clang-15: error: linker command failed with exit code 1 (use -v to see invocation) What we are trying to do here is to use Min instead of Error for conflicting SmallDataLimit when combining -fno-PIC code with -fPIC code. Signed-off-by: xiaojing.zhang <xiaojing.zhang@xcalibyte.com> Signed-off-by: jianxin.lai <jianxin.lai@xcalibyte.com>
Diffstat (limited to 'lldb/source/Interpreter/ScriptInterpreter.cpp')
0 files changed, 0 insertions, 0 deletions