Browse Source

Ignore "relative reloc to symbol in different section" error in the ".deleted" section. This fixes --remove-unused with debugging information and -freg-relative-an.

git-svn-id: file:///var/svn/tigccpp/trunk/tigcc/ld-tigcc@1213 9552661e-59e3-4036-b4f2-dbe53926924f
kevinkofler 16 years ago
parent
commit
301be95cd6
1 changed files with 8 additions and 0 deletions
  1. 8 0
      manip.c

+ 8 - 0
manip.c

@@ -1151,6 +1151,14 @@ BOOLEAN FixupRelativeReloc (RELOC *Reloc)
 			if (Result)
 				FreeReloc (Reloc);
 		}
+#ifdef DEBUGGING_INFO_SUPPORT
+		// If this is the .deleted section, ignore this error, as it can legitimately happen and doesn't matter anyway.
+		else if (Section->DebuggingInfoType == DI_DELETED)
+		{
+			Result = TRUE;
+			FreeReloc (Reloc);
+		}
+#endif
 		else
 			Error (CurFileName, "Relative reloc at 0x%lX to `%s' in different section.", (long) Reloc->Location, Reloc->Target.SymbolName);
 	}