Browse Source

Set Essential instead of Referenced.

git-svn-id: file:///var/svn/tigccpp/trunk/tigcc/ld-tigcc@152 9552661e-59e3-4036-b4f2-dbe53926924f
kevinkofler 19 years ago
parent
commit
9ee079b54c
4 changed files with 17 additions and 16 deletions
  1. 3 3
      insert/comprrlc.c
  2. 4 3
      insert/kernel.c
  3. 5 5
      manip.c
  4. 5 5
      special.c

+ 3 - 3
insert/comprrlc.c

@@ -1,6 +1,6 @@
 /* comprrlc.c: Routines for compressed relocation tables
 
-   Copyright (C) 2003-2004 Kevin Kofler
+   Copyright (C) 2003-2005 Kevin Kofler
    Portions copyright (C) 2002-2003 Sebastian Reichelt
 
    This program is free software; you can redistribute it and/or modify
@@ -252,10 +252,10 @@ BOOLEAN InsertCompressedRelocs (SECTION *Section, SECTION *TargetSection, SECTIO
 	// Initialize user data for list model.
 	RELOC_USER_DATA UserData = {TargetSection};
 	
-	// If a target section is specified, it is referenced now, and it may
+	// If a target section is specified, it is essential now, and it may
 	// not be modified any more.
 	if (TargetSection)
-		TargetSection->Frozen = TargetSection->Referenced = TRUE;
+		TargetSection->Frozen = TargetSection->Essential = TRUE;
 	else
 		// Do code optimizations now, since this might reduce the number
 		// of relocs. If a target section was specified, this is pointless,

+ 4 - 3
insert/kernel.c

@@ -1,6 +1,7 @@
 /* kernel.c: Routines to handle automatic insertion of section contents in kernel format
 
-   Copyright (C) 2003 Sebastian Reichelt, Kevin Kofler
+   Copyright (C) 2003 Sebastian Reichelt
+   Copyright (C) 2003-2005 Kevin Kofler
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -83,9 +84,9 @@ BOOLEAN InsertKernelRelocs (SECTION *Section, SECTION *TargetSection)
 	// Initialize user data for list model.
 	RELOC_USER_DATA UserData = {TargetSection};
 	
-	// If a target section is specified, it is referenced now.
+	// If a target section is specified, it is essential now.
 	if (TargetSection)
-		TargetSection->Referenced = TRUE;
+		TargetSection->Essential = TRUE;
 	else
 		// Do code optimizations now, since this might reduce the number
 		// of relocs. If a target section was specified, this is pointless,

+ 5 - 5
manip.c

@@ -1,7 +1,7 @@
 /* manip.c: Routines to manipulate the internal data
 
    Copyright (C) 2002-2004 Sebastian Reichelt
-   Copyright (C) 2003-2004 Kevin Kofler
+   Copyright (C) 2003-2005 Kevin Kofler
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -305,7 +305,7 @@ void InsertSection (PROGRAM *Program, SECTION *Section)
 			Warning (Section->FileName, "Inserting startup section with number %ld in front of entry point.", (long) Section->StartupNumber);
 		
 		// Cannot remove startup sections.
-		Section->Referenced = TRUE;
+		Section->Essential = TRUE;
 		
 		// Insert the section where it belongs.
 		InsertAfter (Program->Sections, Section, PrevStartupSection);
@@ -943,7 +943,7 @@ SECTION *MergeSections (SECTION *Dest, SECTION *Src)
 	}
 	Dest->Mergeable = Dest->Mergeable && Src->Mergeable;
 	Dest->Unaligned = Dest->Unaligned && Src->Unaligned;
-	Dest->Referenced |= Src->Referenced;
+	Dest->Essential |= Src->Essential;
 	Dest->Constructors = Dest->Constructors && Src->Constructors;
 	Dest->Destructors = Dest->Destructors && Src->Destructors;
 	Dest->CanCutRanges |= Src->CanCutRanges;
@@ -1418,8 +1418,8 @@ SECTION_MARKERS *CreateSectionMarkers (SECTION_MARKERS *Marker, SECTION *Section
 	{
 		SYMBOL *Symbol;
 
-		// Mark the section as referenced so it isn't removed.
-		Section->Referenced = TRUE;
+		// Mark the section as essential so it isn't removed.
+		Section->Essential = TRUE;
 		
 		// Use the section symbol for the beginning.
 		Marker->Start = Section->SectionSymbol;

+ 5 - 5
special.c

@@ -1,7 +1,7 @@
 /* special.c: Routines to handle special characteristics of the linker
 
    Copyright (C) 2002-2004 Sebastian Reichelt
-   Copyright (C) 2003-2004 Kevin Kofler
+   Copyright (C) 2003-2005 Kevin Kofler
    Copyright (C) 2004 Billy Charvet
 
    This program is free software; you can redistribute it and/or modify
@@ -134,7 +134,7 @@ BOOLEAN HandleSpecialSymbol (PROGRAM *Program, const char *SymbolName)
 		{
 			SECTION *FirstSection = GetFirst (Program->Sections);
 			if (FirstSection && (!(FirstSection->StartupNumber)))
-				FirstSection->Referenced = TRUE;
+				FirstSection->Essential = TRUE;
 			Program->Type = PT_NOSTUB;
 		}
 #ifdef NOSTUB_DLL_SUPPORT
@@ -142,7 +142,7 @@ BOOLEAN HandleSpecialSymbol (PROGRAM *Program, const char *SymbolName)
 		{
 			SECTION *FirstSection = GetFirst (Program->Sections);
 			if (FirstSection && (!(FirstSection->StartupNumber)))
-				FirstSection->Referenced = TRUE;
+				FirstSection->Essential = TRUE;
 			Program->Type = PT_NOSTUB_DLL;
 			Program->Library = TRUE;
 		}
@@ -439,7 +439,7 @@ BOOLEAN CreateSpecialGlobalImports (PROGRAM *Program)
 					if (ExportNumber >= 0)
 					{
 						NostubComments = TRUE;
-						TempSection->Referenced = TRUE;
+						TempSection->Essential = TRUE;
 						break;
 					}
 				}
@@ -799,7 +799,7 @@ BOOLEAN ResolveSpecialSymbolLocation (SECTION *Section, LOCATION *Location, BOOL
 							if (ExportNumber >= 0)
 							{
 								HasExports = TRUE;
-								TempSection->Referenced = TRUE;
+								TempSection->Essential = TRUE;
 								break;
 							}
 						}