Browse Source

More DWARF 2 fixes (don't pad debugging info sections when merging, don't patch _ROM_CALL_nnn in a .ascii or .asciz).

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

+ 6 - 0
manip.c

@@ -820,6 +820,12 @@ SECTION *MergeSections (SECTION *Dest, SECTION *Src)
 	// Store the size of the destination section.
 	OrigSize = Dest->Size;
 	
+#ifdef DEBUGGING_INFO_SUPPORT
+	// Debugging information shouldn't be padded, the DWARF 2 format doesn't support padding.
+	if (Dest->DebuggingInfoType)
+		OrigSizePadded = OrigSize;
+#endif /* DEBUGGING_INFO_SUPPORT */
+	
 	// If no size is specified yet, pad the destination section to have an even length.
 	if (!OrigSizePadded)
 		OrigSizePadded = GetPaddedSize (OrigSize, M68K_SECTION_ALIGNMENT);