mirror of
https://github.com/jakcron/nstool
synced 2024-11-15 02:06:40 +00:00
[nx] Add defines for NSO/NRO dynamic symbols.
This commit is contained in:
parent
f7e49c50f3
commit
d165243231
3 changed files with 60 additions and 0 deletions
56
lib/libnx/include/nx/dynamic_symbol.h
Normal file
56
lib/libnx/include/nx/dynamic_symbol.h
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
#pragma once
|
||||||
|
#include <fnd/types.h>
|
||||||
|
|
||||||
|
namespace nx
|
||||||
|
{
|
||||||
|
namespace dynsym
|
||||||
|
{
|
||||||
|
enum SpecialSectionIndex
|
||||||
|
{
|
||||||
|
SHN_UNDEF,
|
||||||
|
SHN_LORESERVE = 65280,
|
||||||
|
SHN_LOPROC = 65280,
|
||||||
|
SHN_HIPROC = 65311,
|
||||||
|
SHN_LOOS,
|
||||||
|
SHN_HIOS = 65343,
|
||||||
|
SHN_ABS = 65521,
|
||||||
|
SHN_COMMON,
|
||||||
|
SHN_HIRESERVE = 0xFFFF
|
||||||
|
};
|
||||||
|
|
||||||
|
enum SymbolType
|
||||||
|
{
|
||||||
|
STT_NOTYPE,
|
||||||
|
STT_OBJECT,
|
||||||
|
STT_FUNC,
|
||||||
|
STT_SECTION,
|
||||||
|
STT_FILE,
|
||||||
|
STT_LOOS = 10,
|
||||||
|
STT_HIOS = 12,
|
||||||
|
STT_LOPROC,
|
||||||
|
STT_HIPROC = 0xF
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma pack(push,1)
|
||||||
|
struct sDynSymbol32Bit
|
||||||
|
{
|
||||||
|
le_uint32_t name;
|
||||||
|
le_uint32_t value;
|
||||||
|
le_uint32_t size;
|
||||||
|
le_uint32_t info;
|
||||||
|
le_uint32_t other;
|
||||||
|
le_uint32_t special_section_index;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct sDynSymbol64Bit
|
||||||
|
{
|
||||||
|
le_uint32_t name;
|
||||||
|
byte_t info;
|
||||||
|
byte_t other;
|
||||||
|
le_uint16_t special_section_index;
|
||||||
|
le_uint64_t value;
|
||||||
|
le_uint64_t size;
|
||||||
|
};
|
||||||
|
#pragma pack(pop)
|
||||||
|
}
|
|
@ -26,6 +26,7 @@
|
||||||
<ClInclude Include="include\nx\AesKeygen.h" />
|
<ClInclude Include="include\nx\AesKeygen.h" />
|
||||||
<ClInclude Include="include\nx\cnmt.h" />
|
<ClInclude Include="include\nx\cnmt.h" />
|
||||||
<ClInclude Include="include\nx\ContentMetaBinary.h" />
|
<ClInclude Include="include\nx\ContentMetaBinary.h" />
|
||||||
|
<ClInclude Include="include\nx\dynamic_symbol.h" />
|
||||||
<ClInclude Include="include\nx\FacBinary.h" />
|
<ClInclude Include="include\nx\FacBinary.h" />
|
||||||
<ClInclude Include="include\nx\FacHeader.h" />
|
<ClInclude Include="include\nx\FacHeader.h" />
|
||||||
<ClInclude Include="include\nx\HandleTableSizeEntry.h" />
|
<ClInclude Include="include\nx\HandleTableSizeEntry.h" />
|
||||||
|
|
|
@ -162,6 +162,9 @@
|
||||||
<ClInclude Include="include\nx\NsoHeader.h">
|
<ClInclude Include="include\nx\NsoHeader.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="include\nx\dynamic_symbol.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="makefile" />
|
<None Include="makefile" />
|
||||||
|
|
Loading…
Reference in a new issue