Bläddra i källkod

Reorder startup sections first and non-startup sections second, because the latter heuristics can make use of the results of the former, and not the other way round.
(It doesn't seem to make any actual difference though.)


git-svn-id: file:///var/svn/tigccpp/trunk/tigcc/ld-tigcc@139 9552661e-59e3-4036-b4f2-dbe53926924f

kevinkofler 19 år sedan
förälder
incheckning
c1464289c0
1 ändrade filer med 3 tillägg och 2 borttagningar
  1. 3 2
      reorder.c

+ 3 - 2
reorder.c

@@ -35,8 +35,8 @@ static void ReorderStartupSections (PROGRAM *Program);
 // to avoid combinatorial explosion.
 void ReorderSections (PROGRAM *Program)
 {
-	ReorderNonStartupSections(Program);
 	ReorderStartupSections(Program);
+	ReorderNonStartupSections(Program);
 }
 
 
@@ -454,7 +454,8 @@ static SI1 ReorderSectionsRecurse(PROGRAM *Program, COUNT SectionCount,
 			COUNT TaggedSectionCount;
 			// If the current section is not a startup section, it means we are
 			// done with the startup sections. So just add all the remaining
-			// sections in the order decided by global reordering.
+			// sections in their current order, to be rearranged by global
+			// reordering.
 			if (!StartupNumber)
 			{
 				SECTION *RemainingSection;