mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-10 01:28:44 +02:00
fix(libs): libc export flag name fix
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include <ctime>
|
||||
#include "SceTypes.hpp"
|
||||
|
||||
uint32_t g_need_flag = 1;
|
||||
uint32_t Need_sceLibc = 1;
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user