The only known user of this relocation type and symbol type is
the debug info sections, but we were not testing the `--relocatable`
output path.
This change adds a minimal test case to cover relocations against
section symbols includes `--relocatable` output.
Differential Revision: https://reviews.llvm.org/D61623
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360110
91177308-0d34-0410-b5e6-
96231b3b80d8
WasmYAML::SymbolInfo &Info) {
IO.mapRequired("Index", Info.Index);
IO.mapRequired("Kind", Info.Kind);
- IO.mapRequired("Name", Info.Name);
+ if (Info.Kind != wasm::WASM_SYMBOL_TYPE_SECTION)
+ IO.mapRequired("Name", Info.Name);
IO.mapRequired("Flags", Info.Flags);
if (Info.Kind == wasm::WASM_SYMBOL_TYPE_FUNCTION) {
IO.mapRequired("Function", Info.ElementIndex);
break;
case wasm::WASM_SEC_CUSTOM: {
auto CustomSection = dyn_cast<WasmYAML::CustomSection>(&Sec);
- if (!CustomSection->Name.startswith(".debug_")) {
- llvm_unreachable("not yet implemented (only for debug sections)");
- return 1;
- }
-
writeStringRef(("reloc." + CustomSection->Name).str(), OS);
break;
}