[all-commits] [llvm/llvm-project] 80a4e6: [Driver] Error for -gsplit-dwarf with RISC-V linke...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Fri Jul 22 17:16:54 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 80a4e6fd31a06143b83947785ea3bd5c04344ea6
https://github.com/llvm/llvm-project/commit/80a4e6fd31a06143b83947785ea3bd5c04344ea6
Author: Fangrui Song <i at maskray.me>
Date: 2022-07-22 (Fri, 22 Jul 2022)
Changed paths:
M clang/include/clang/Basic/DiagnosticDriverKinds.td
M clang/lib/Driver/ToolChains/Arch/RISCV.cpp
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/lib/Driver/ToolChains/Clang.h
M clang/test/Driver/riscv-features.c
Log Message:
-----------
[Driver] Error for -gsplit-dwarf with RISC-V linker relaxation
-gsplit-dwarf produces a .dwo file which will not be processed by the linker. If
.dwo files contain relocations, they will not be resolved. Therefore the
practice is that .dwo files do not contain relocations.
Address ranges and location description need to use forms/entry kinds indexing
into .debug_addr (DW_FORM_addrx/DW_RLE_startx_endx/etc), which is currently not
implemented.
There is a difficult-to-read MC error with -gsplit-dwarf with RISC-V for both -mrelax and -mno-relax.
```
% clang --target=riscv64-linux-gnu -g -gsplit-dwarf -c a.c
error: A dwo section may not contain relocations
```
We expect to fix -mno-relax soon, so report a driver error for -mrelax for now.
Link: https://github.com/llvm/llvm-project/issues/56642
Reviewed By: compnerd, kito-cheng
Differential Revision: https://reviews.llvm.org/D130190
More information about the All-commits
mailing list