changeset 15504:a01d40110af0

(unexec): Round up section header offset to bss alignment before deciding whether it's after the bss section.
author Richard M. Stallman <rms@gnu.org>
date Mon, 24 Jun 1996 19:54:38 +0000
parents 8763ff3f9ee3
children 4d3ce6ab31d8
files src/unexelf.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/unexelf.c	Mon Jun 24 16:59:49 1996 +0000
+++ b/src/unexelf.c	Mon Jun 24 19:54:38 1996 +0000
@@ -767,7 +767,9 @@
 	      >= OLD_SECTION_H (old_bss_index-1).sh_offset)
 	    NEW_SECTION_H (nn).sh_offset += new_data2_size;
 #else
-	  if (NEW_SECTION_H (nn).sh_offset >= new_data2_offset)
+	  if (round_up (NEW_SECTION_H (nn).sh_offset,
+			OLD_SECTION_H (old_bss_index).sh_addralign)
+	      >= new_data2_offset)
 	    NEW_SECTION_H (nn).sh_offset += new_data2_size;
 #endif
 	  /* Any section that was originally placed after the section