fix(libs): libc export flag name fix

This commit is contained in:
boykopovar 2026-08-22 11:18:42 +03:00
parent b49279e832
commit 8672a5cc3d
2 changed files with 8 additions and 2 deletions

View File

@ -4,7 +4,7 @@
#include <ctime>
#include "SceTypes.hpp"
uint32_t g_need_flag = 1;
uint32_t Need_sceLibc = 1;
extern "C" {

View File

@ -71,9 +71,15 @@ SysVDynamicSection SysVDynamicSectionBuilder::BuildDynamicSection(
_appendElfSym(result.DynSymData, 0, 0, 0, 0, 0, 0);
auto stripHashSuffix = [](const std::string& value) -> std::string {
const auto hashPos = value.find('#');
if (hashPos == std::string::npos) return value;
return value.substr(0, hashPos);
};
std::uint32_t symIdx = 1;
for (const auto& ref : nidReferences) {
const std::uint32_t nameOff = _appendStr(result.DynStrData, ref.Nid);
const std::uint32_t nameOff = _appendStr(result.DynStrData, stripHashSuffix(ref.Nid));
const auto info = static_cast<std::uint8_t>((STB_GLOBAL << 4) | STT_FUNC);
_appendElfSym(result.DynSymData, nameOff, info, STV_DEFAULT, 0, 0, 0);