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:
@@ -132,7 +132,7 @@ void ObjReadFiles (FILE* F, unsigned long Pos, ObjData* O)
|
|||||||
void ObjReadSections (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 */
|
/* Read the section data from a file at the given position */
|
||||||
{
|
{
|
||||||
unsigned I;
|
unsigned I;
|
||||||
unsigned SectionCount;
|
unsigned SectionCount;
|
||||||
|
|
||||||
/* Seek to the correct position */
|
/* 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)
|
void ObjReadImports (FILE* F, unsigned long Pos, ObjData* O)
|
||||||
/* Read the imports from a file at the given position */
|
/* Read the imports from a file at the given position */
|
||||||
{
|
{
|
||||||
unsigned I;
|
unsigned I;
|
||||||
unsigned ImportCount;
|
unsigned ImportCount;
|
||||||
|
|
||||||
/* Seek to the correct position */
|
/* 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)
|
void ObjReadExports (FILE* F, unsigned long Pos, ObjData* O)
|
||||||
/* Read the exports from a file at the given position */
|
/* Read the exports from a file at the given position */
|
||||||
{
|
{
|
||||||
unsigned I;
|
unsigned I;
|
||||||
unsigned ExportCount;
|
unsigned ExportCount;
|
||||||
|
|
||||||
/* Seek to the correct position */
|
/* 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)
|
void ObjReadAssertions (FILE* F, unsigned long Pos, ObjData* O)
|
||||||
/* Read the assertions from a file at the given offset */
|
/* Read the assertions from a file at the given offset */
|
||||||
{
|
{
|
||||||
unsigned I;
|
unsigned I;
|
||||||
unsigned AssertionCount;
|
unsigned AssertionCount;
|
||||||
|
|
||||||
/* Seek to the correct position */
|
/* 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)
|
void ObjReadScopes (FILE* F, unsigned long Pos, ObjData* O)
|
||||||
/* Read the scope table from a file at the given offset */
|
/* Read the scope table from a file at the given offset */
|
||||||
{
|
{
|
||||||
unsigned I;
|
unsigned I;
|
||||||
unsigned ScopeCount;
|
unsigned ScopeCount;
|
||||||
|
|
||||||
/* Seek to the correct position */
|
/* Seek to the correct position */
|
||||||
@@ -301,6 +301,9 @@ void ObjAdd (FILE* Obj, const char* Name)
|
|||||||
/* Read the files list from the object file */
|
/* Read the files list from the object file */
|
||||||
ObjReadFiles (Obj, O->Header.FileOffs, O);
|
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 */
|
/* Read the imports list from the object file */
|
||||||
ObjReadImports (Obj, O->Header.ImportOffs, O);
|
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 */
|
/* Read the object debug symbols from the object file */
|
||||||
ObjReadDbgSyms (Obj, O->Header.DbgSymOffs, O);
|
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 */
|
/* Read the assertions from the object file */
|
||||||
ObjReadAssertions (Obj, O->Header.AssertOffs, O);
|
ObjReadAssertions (Obj, O->Header.AssertOffs, O);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user