diff --git a/core/relinker/relinker/src/guest/GuestModuleBuilder.cpp b/core/relinker/relinker/src/guest/GuestModuleBuilder.cpp index b9844c22cf..b742d66e43 100644 --- a/core/relinker/relinker/src/guest/GuestModuleBuilder.cpp +++ b/core/relinker/relinker/src/guest/GuestModuleBuilder.cpp @@ -353,7 +353,7 @@ std::vector GuestModuleBuilder::Build(const std::filesystem::path const auto symbolIndex = static_cast(Io::ReadU64(*table, position + 8) >> 32); if (!systemImports[index].contains(symbolIndex)) continue; const auto& symbol = image.Symbols[symbolIndex]; - imports.push_back({symbol.Name, symbol.Library, {}, 0, {}, Io::ReadU64(*table, position), {}, false}); + imports.push_back({symbol.Name, symbol.Library, {}, 0, {}, Io::ReadU64(*table, position), {}, false, (symbol.Info >> 4) == 2}); } } dynamic.GuestModules.push_back(std::move(runtime)); diff --git a/core/relinker/relinker/src/output/CallRegistryWriter.cpp b/core/relinker/relinker/src/output/CallRegistryWriter.cpp index 8fbd461e89..983450acc3 100644 --- a/core/relinker/relinker/src/output/CallRegistryWriter.cpp +++ b/core/relinker/relinker/src/output/CallRegistryWriter.cpp @@ -72,7 +72,9 @@ std::string CallRegistryWriter::WriteModuleImports(const std::vector.registry.json` for each converted bundled module; pass all of them. `--libs` is the directory the `libs` target fills ([build instructions](../dev/BUILD.md)); the exports are read from the built `.prx` files, so the result matches what the loader finds. Imports are counted once per NID and library, and every reference lands in exactly one class: +Module registries mark ELF weak imports with `"weak": true`, allowing the audit's current-stop selection to skip them. Strong imports omit the field. Older module registries do not preserve weak bindings; regenerate them to distinguish optional imports. + | Class | Meaning | |-------|---------| | `implemented` | A built library exports the NID and its function is not a throwing stub. |