mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 01:15:42 +00:00
[RSYM]
* Don't overwrite the MZ header when there are no long section names. * Correct an error including 4 more bytes than needed in the coff strings. * Brought to you by Arty. svn path=/trunk/; revision=59938
This commit is contained in:
parent
762f3e87da
commit
af5ce0ae6b
1 changed files with 12 additions and 7 deletions
|
@ -1161,13 +1161,18 @@ CreateOutputFile(FILE *OutFile, void *InData,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (OutFileHeader->PointerToSymbolTable)
|
||||||
|
{
|
||||||
fseek(OutFile, OutFileHeader->PointerToSymbolTable, 0);
|
fseek(OutFile, OutFileHeader->PointerToSymbolTable, 0);
|
||||||
|
|
||||||
/* COFF string section is preceeded by a length */
|
/* COFF string section is preceeded by a length */
|
||||||
|
assert(sizeof(StringTableLength) == 4);
|
||||||
fwrite((char*)&StringTableLength, 1, sizeof(StringTableLength), OutFile);
|
fwrite((char*)&StringTableLength, 1, sizeof(StringTableLength), OutFile);
|
||||||
/* We just copy enough of the string table to contain the strings we want
|
/* We just copy enough of the string table to contain the strings we want
|
||||||
The string table length technically counts as part of the string table
|
The string table length technically counts as part of the string table
|
||||||
space itself. */
|
space itself. */
|
||||||
fwrite(StringTable+4, 1, StringTableLength, OutFile);
|
fwrite(StringTable + 4, 1, StringTableLength - 4, OutFile);
|
||||||
|
}
|
||||||
|
|
||||||
if (PaddedRosSym)
|
if (PaddedRosSym)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue