1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +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 [WebAssembly] Put utility functions in Utils directory (NFC) 2021-04-22 15:29:43 -07:00
WebAssemblyAsmBackend.cpp
WebAssemblyFixupKinds.h
WebAssemblyInstPrinter.cpp [WebAssembly] Put utility functions in Utils directory (NFC) 2021-04-22 15:29:43 -07:00
WebAssemblyInstPrinter.h [WebAssembly] Put utility functions in Utils directory (NFC) 2021-04-22 15:29:43 -07:00
WebAssemblyMCAsmInfo.cpp
WebAssemblyMCAsmInfo.h
WebAssemblyMCCodeEmitter.cpp [WebAssembly] Rename event to tag 2021-06-17 20:34:19 -07:00
WebAssemblyMCTargetDesc.cpp [WebAssembly] Put utility functions in Utils directory (NFC) 2021-04-22 15:29:43 -07:00
WebAssemblyMCTargetDesc.h [WebAssembly] Rename event to tag 2021-06-17 20:34:19 -07:00
WebAssemblyTargetStreamer.cpp [WebAssembly] Rename event to tag 2021-06-17 20:34:19 -07:00
WebAssemblyTargetStreamer.h [WebAssembly] Rename event to tag 2021-06-17 20:34:19 -07:00
WebAssemblyWasmObjectWriter.cpp [WebAssembly] Generate R_WASM_FUNCTION_OFFSET relocs in debuginfo sections 2021-07-19 14:02:33 -07:00