mirror of
https://github.com/cc65/cc65.git
synced 2024-11-19 06:31:31 +00:00
Adapt to changed object file format.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4930 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
713c019a24
commit
88b3489d89
@ -6,7 +6,7 @@
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 2002-2010, Ullrich von Bassewitz */
|
||||
/* (C) 2002-2011, Ullrich von Bassewitz */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
@ -111,7 +111,7 @@ static char* TimeToStr (unsigned long Time)
|
||||
/* Remove the trailing newline */
|
||||
unsigned Len = strlen (S);
|
||||
if (Len > 0 && S[Len-1] == '\n') {
|
||||
S[Len-1 ] = '\0';
|
||||
S[Len-1 ] = '\0';
|
||||
}
|
||||
|
||||
/* Return the time string */
|
||||
@ -120,6 +120,20 @@ static char* TimeToStr (unsigned long Time)
|
||||
|
||||
|
||||
|
||||
static void SkipLineInfoList (FILE* F)
|
||||
/* Skip a line info list from the given file */
|
||||
{
|
||||
/* Count preceeds the list */
|
||||
unsigned long Count = ReadVar (F);
|
||||
|
||||
/* Skip indices */
|
||||
while (Count--) {
|
||||
(void) ReadVar (F);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void SkipExpr (FILE* F)
|
||||
/* Skip an expression from the given file */
|
||||
{
|
||||
@ -145,7 +159,7 @@ static void SkipExpr (FILE* F)
|
||||
case EXPR_SECTION:
|
||||
/* Read the segment number */
|
||||
(void) Read8 (F);
|
||||
break;
|
||||
break;
|
||||
|
||||
default:
|
||||
Error ("Invalid expression op: %02X", Op);
|
||||
@ -180,7 +194,7 @@ static const char* GetExportFlags (unsigned Flags, const unsigned char* ConDes)
|
||||
}
|
||||
|
||||
/* Symbol usage */
|
||||
switch (Flags & SYM_MASK_LABEL) {
|
||||
switch (Flags & SYM_MASK_LABEL) {
|
||||
case SYM_EQUATE: strcat (TypeDesc, ",SYM_EQUATE"); break;
|
||||
case SYM_LABEL: strcat (TypeDesc, ",SYM_LABEL"); break;
|
||||
}
|
||||
@ -388,7 +402,7 @@ void DumpObjFiles (FILE* F, unsigned long Offset)
|
||||
/* Read the data for one file */
|
||||
const char* Name = GetString (&StrPool, ReadVar (F));
|
||||
unsigned long MTime = Read32 (F);
|
||||
unsigned long Size = Read32 (F);
|
||||
unsigned long Size = ReadVar (F);
|
||||
unsigned Len = strlen (Name);
|
||||
|
||||
/* Print the header */
|
||||
@ -473,7 +487,6 @@ void DumpObjImports (FILE* F, unsigned long Offset)
|
||||
Collection StrPool = AUTO_COLLECTION_INITIALIZER;
|
||||
unsigned Count;
|
||||
unsigned I;
|
||||
FilePos Pos;
|
||||
|
||||
/* Seek to the header position and read the header */
|
||||
FileSetPos (F, Offset);
|
||||
@ -500,7 +513,9 @@ void DumpObjImports (FILE* F, unsigned long Offset)
|
||||
unsigned char AddrSize = Read8 (F);
|
||||
const char* Name = GetString (&StrPool, ReadVar (F));
|
||||
unsigned Len = strlen (Name);
|
||||
ReadFilePos (F, &Pos);
|
||||
|
||||
/* Skip the line infos */
|
||||
SkipLineInfoList (F);
|
||||
|
||||
/* Print the header */
|
||||
printf (" Index:%27u\n", I);
|
||||
@ -524,7 +539,6 @@ void DumpObjExports (FILE* F, unsigned long Offset)
|
||||
Collection StrPool = AUTO_COLLECTION_INITIALIZER;
|
||||
unsigned Count;
|
||||
unsigned I;
|
||||
FilePos Pos;
|
||||
|
||||
/* Seek to the header position and read the header */
|
||||
FileSetPos (F, Offset);
|
||||
@ -567,7 +581,9 @@ void DumpObjExports (FILE* F, unsigned long Offset)
|
||||
Value = Read32 (F);
|
||||
HaveValue = 1;
|
||||
}
|
||||
ReadFilePos (F, &Pos);
|
||||
|
||||
/* Skip the line infos */
|
||||
SkipLineInfoList (F);
|
||||
|
||||
/* Print the header */
|
||||
printf (" Index:%27u\n", I);
|
||||
@ -595,7 +611,6 @@ void DumpObjDbgSyms (FILE* F, unsigned long Offset)
|
||||
Collection StrPool = AUTO_COLLECTION_INITIALIZER;
|
||||
unsigned Count;
|
||||
unsigned I;
|
||||
FilePos Pos;
|
||||
|
||||
/* Seek to the header position and read the header */
|
||||
FileSetPos (F, Offset);
|
||||
@ -640,7 +655,9 @@ void DumpObjDbgSyms (FILE* F, unsigned long Offset)
|
||||
Value = Read32 (F);
|
||||
HaveValue = 1;
|
||||
}
|
||||
ReadFilePos (F, &Pos);
|
||||
|
||||
/* Skip the line infos */
|
||||
SkipLineInfoList (F);
|
||||
|
||||
/* Print the header */
|
||||
printf (" Index:%27u\n", I);
|
||||
@ -697,9 +714,8 @@ void DumpObjLineInfo (FILE* F, unsigned long Offset)
|
||||
/* Read and print all line infos */
|
||||
for (I = 0; I < Count; ++I) {
|
||||
|
||||
FilePos Pos;
|
||||
|
||||
/* Read one line info */
|
||||
FilePos Pos;
|
||||
ReadFilePos (F, &Pos);
|
||||
|
||||
/* Print the header */
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* */
|
||||
/* */
|
||||
/* */
|
||||
/* (C) 2000-2009, Ullrich von Bassewitz */
|
||||
/* (C) 2000-2011, Ullrich von Bassewitz */
|
||||
/* Roemerstrasse 52 */
|
||||
/* D-70794 Filderstadt */
|
||||
/* EMail: uz@cc65.org */
|
||||
@ -201,7 +201,7 @@ static void OptVersion (const char* Opt attribute ((unused)),
|
||||
/* Print the assembler version */
|
||||
{
|
||||
fprintf (stderr,
|
||||
"%s V%s - (C) Copyright 2000-2009, Ullrich von Bassewitz\n",
|
||||
"%s V%s - (C) Copyright 2000-2011, Ullrich von Bassewitz\n",
|
||||
ProgName, GetVersionAsString ());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user