Browse Source

Add implementation and documentation of special __ld_bss_even_end symbol, resolved to the first even address after the end of the BSS section.
Code by PpHd.

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

debrouxl 15 years ago
parent
commit
532477a2ba
1 changed files with 10 additions and 0 deletions
  1. 10 0
      special.c

+ 10 - 0
special.c

@@ -739,6 +739,16 @@ BOOLEAN ResolveSpecialSymbolLocation (SECTION *Section, LOCATION *Location, BOOL
 				else
 					return TRUE;
 			}
+			else if (SymNameMatches ("bss_even_end"))
+			{
+				if (Program->BSSSection)
+				{
+					NewSymbol = Program->BSSSection->SectionSymbol;
+					NewTargetOffset = (OFFSET) ((unsigned long) (Program->BSSSection->Size + 1) & ~1UL);
+				}
+				else
+					return TRUE;
+			}
 			else if (SymNameMatches ("bss_size"))
 			{
 				if (Program->BSSSection)