Author: tkreuzer
Date: Tue Dec 16 17:32:03 2008
New Revision: 38129
URL:
http://svn.reactos.org/svn/reactos?rev=38129&view=rev
Log:
- DLLs that don't contain any code (like cfgmgr) don't need to have an .eh_frame
section. Make sure rsym64 continues in that case.
- Handle DW_CFA_GNU_args_size
Modified:
branches/ros-amd64-bringup/reactos/tools/rsym/rsym64.c
Modified: branches/ros-amd64-bringup/reactos/tools/rsym/rsym64.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
==============================================================================
--- branches/ros-amd64-bringup/reactos/tools/rsym/rsym64.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/tools/rsym/rsym64.c [iso-8859-1] Tue Dec 16
17:32:03 2008
@@ -205,6 +205,13 @@
State->FramePtr *= 8; // data alignment
State->IsUwop = 1;
break;
+ case DW_CFA_GNU_args_size:
+ {
+ unsigned long argsize;
+ printf("Warning, DW_CFA_GNU_args_size is unimplemented\n");
+ Length += DwDecodeUleb128(&argsize, pc + Length);
+ break;
+ }
/* PSEH types */
case 0x1c:
printf("found 1c at %lx\n", State->Location);
@@ -575,7 +582,7 @@
if ((File->DosHeader->e_magic != IMAGE_DOS_MAGIC) ||
File->DosHeader->e_lfanew == 0L)
{
perror("Input file is not a PE image.\n");
- return 0;
+ return -1;
}
/* Locate PE file header */
@@ -584,7 +591,7 @@
if (File->FileHeader->Machine != IMAGE_FILE_MACHINE_AMD64)
{
perror("Input file is not an x64 image.\n");
- return 0;
+ return -1;
}
/* Locate optional header */
@@ -615,7 +622,7 @@
if (!File->FileHeader->PointerToSymbolTable)
{
fprintf(stderr, "No symbol table.\n");
- return 0;
+ return -1;
}
File->Symbols = File->FilePtr + File->FileHeader->PointerToSymbolTable;
@@ -664,6 +671,7 @@
char* pszOutFile;
FILE_INFO File;
FILE* outfile;
+ int ret;
if (argc != 3)
{
@@ -681,10 +689,11 @@
exit(1);
}
- if (!ParsePEHeaders(&File))
+ ret = ParsePEHeaders(&File);
+ if (ret != 1)
{
free(File.FilePtr);
- exit(1);
+ exit(ret == -1 ? 1 : 0);
}
File.AlignBuf = malloc(File.OptionalHeader->FileAlignment);