1
0
mirror of https://github.com/cc65/cc65.git synced 2024-10-01 15:54:59 +00:00

Must read line infos earlier when reading in an object files, because later

data references it.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4927 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2011-01-27 16:20:14 +00:00
parent b903e818d1
commit d7d1ad7fd0

View File

@ -132,7 +132,7 @@ void ObjReadFiles (FILE* F, unsigned long Pos, ObjData* O)
void ObjReadSections (FILE* F, unsigned long Pos, ObjData* O)
/* Read the section data from a file at the given position */
{
unsigned I;
unsigned I;
unsigned SectionCount;
/* Seek to the correct position */
@ -151,7 +151,7 @@ void ObjReadSections (FILE* F, unsigned long Pos, ObjData* O)
void ObjReadImports (FILE* F, unsigned long Pos, ObjData* O)
/* Read the imports from a file at the given position */
{
unsigned I;
unsigned I;
unsigned ImportCount;
/* Seek to the correct position */
@ -170,7 +170,7 @@ void ObjReadImports (FILE* F, unsigned long Pos, ObjData* O)
void ObjReadExports (FILE* F, unsigned long Pos, ObjData* O)
/* Read the exports from a file at the given position */
{
unsigned I;
unsigned I;
unsigned ExportCount;
/* Seek to the correct position */
@ -245,7 +245,7 @@ void ObjReadStrPool (FILE* F, unsigned long Pos, ObjData* O)
void ObjReadAssertions (FILE* F, unsigned long Pos, ObjData* O)
/* Read the assertions from a file at the given offset */
{
unsigned I;
unsigned I;
unsigned AssertionCount;
/* Seek to the correct position */
@ -264,7 +264,7 @@ void ObjReadAssertions (FILE* F, unsigned long Pos, ObjData* O)
void ObjReadScopes (FILE* F, unsigned long Pos, ObjData* O)
/* Read the scope table from a file at the given offset */
{
unsigned I;
unsigned I;
unsigned ScopeCount;
/* Seek to the correct position */
@ -301,6 +301,9 @@ void ObjAdd (FILE* Obj, const char* Name)
/* Read the files list from the object file */
ObjReadFiles (Obj, O->Header.FileOffs, O);
/* Read the line infos from the object file */
ObjReadLineInfos (Obj, O->Header.LineInfoOffs, O);
/* Read the imports list from the object file */
ObjReadImports (Obj, O->Header.ImportOffs, O);
@ -310,9 +313,6 @@ void ObjAdd (FILE* Obj, const char* Name)
/* Read the object debug symbols from the object file */
ObjReadDbgSyms (Obj, O->Header.DbgSymOffs, O);
/* Read the line infos from the object file */
ObjReadLineInfos (Obj, O->Header.LineInfoOffs, O);
/* Read the assertions from the object file */
ObjReadAssertions (Obj, O->Header.AssertOffs, O);