1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/lib/Target/WebAssembly/MCTargetDesc
Derek Schuff 0c7127a873 [WebAssembly] Generate R_WASM_FUNCTION_OFFSET relocs in debuginfo sections
Debug info sections need R_WASM_FUNCTION_OFFSET_I32 relocs (with FK_Data_4 fixup
kinds) to refer to functions (instead of R_WASM_TABLE_INDEX as is used in data
sections). Usually this is done in a convoluted way, with unnamed temp data
symbols which target the start of the function, in which case
WasmObjectWriter::recordRelocation converts it to use the section symbol
instead. However in some cases the function can actually be undefined; in this
case the dwarf generator uses the function symbol (a named undefined function
symbol) instead. In that case the section-symbol transform doesn't work and we
need to generate the correct reloc type a different way. In this change
WebAssemblyWasmObjectWriter::getRelocType takes the fixup section type into
account to choose the correct reloc type.

Fixes PR50408
Differential Revision: https://reviews.llvm.org/D103557
2021-07-19 14:02:33 -07:00
..
CMakeLists.txt
WebAssemblyAsmBackend.cpp
WebAssemblyFixupKinds.h
WebAssemblyInstPrinter.cpp
WebAssemblyInstPrinter.h
WebAssemblyMCAsmInfo.cpp
WebAssemblyMCAsmInfo.h
WebAssemblyMCCodeEmitter.cpp
WebAssemblyMCTargetDesc.cpp
WebAssemblyMCTargetDesc.h
WebAssemblyTargetStreamer.cpp
WebAssemblyTargetStreamer.h
WebAssemblyWasmObjectWriter.cpp [WebAssembly] Generate R_WASM_FUNCTION_OFFSET relocs in debuginfo sections 2021-07-19 14:02:33 -07:00