mirror of
https://github.com/reactos/reactos.git
synced 2024-11-09 08:08:38 +00:00
c501d8112c
svn path=/branches/aicom-network-fixes/; revision=34994
43 lines
1.2 KiB
C
43 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)
|
|
*/
|
|
|
|
#define NTOSAPI
|
|
#include <ntddk.h>
|
|
#include <reactos/rossym.h>
|
|
#include "rossympriv.h"
|
|
|
|
#define NDEBUG
|
|
#include <debug.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);
|
|
}
|
|
|
|
/* EOF */
|