reactos/sdk/lib/rossym/getraw.c
Hermès Bélusca-Maïto e1d334794a
[FREELDR][ROSSYM(_NEW)] Remove last vestigial references to "NTOSAPI".
This was a MinGW-specific, non-MS-DDK/WDK-compatible define, that was
used to mark NTOS kernel/hal exports, instead of NTSYSAPI etc.

We have since fixed that, and changed the way Freeldr (and rossym)
manages these, see commits:
186c8b72d (r16028), 51f0dfd30 (r17651) and 526efd2ee (r24359)
2024-03-07 13:35:08 +01:00

37 lines
1.2 KiB
C

/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: lib/rossym/getraw.c
* PURPOSE: Convert rossym info to raw external format
*
* PROGRAMMERS: Ge van Geldorp (gvg@reactos.com)
*/
#include <ntdef.h>
#include <reactos/rossym.h>
#include "rossympriv.h"
ULONG
RosSymGetRawDataLength(PROSSYM_INFO RosSymInfo)
{
return sizeof(ROSSYM_HEADER)
+ RosSymInfo->SymbolsCount * sizeof(ROSSYM_ENTRY)
+ RosSymInfo->StringsLength;
}
VOID
RosSymGetRawData(PROSSYM_INFO RosSymInfo, PVOID RawData)
{
PROSSYM_HEADER RosSymHeader;
RosSymHeader = (PROSSYM_HEADER) RawData;
RosSymHeader->SymbolsOffset = sizeof(ROSSYM_HEADER);
RosSymHeader->SymbolsLength = RosSymInfo->SymbolsCount * sizeof(ROSSYM_ENTRY);
RosSymHeader->StringsOffset = RosSymHeader->SymbolsOffset + RosSymHeader->SymbolsLength;
RosSymHeader->StringsLength = RosSymInfo->StringsLength;
memcpy((char *) RawData + RosSymHeader->SymbolsOffset, RosSymInfo->Symbols,
RosSymHeader->SymbolsLength);
memcpy((char *) RawData + RosSymHeader->StringsOffset, RosSymInfo->Strings,
RosSymHeader->StringsLength);
}