aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1996-06-24 19:54:38 +0000
committerRichard M. Stallman1996-06-24 19:54:38 +0000
commitfaee8ef030e6a3a94ddfff12b8217da4dca94650 (patch)
tree9e6242757f7e7f9159d32f58df759d6d9c8a0f82 /src
parentaa39a5ddc09e6566286c4b9cfce9fee3e48835fb (diff)
downloademacs-faee8ef030e6a3a94ddfff12b8217da4dca94650.tar.gz
emacs-faee8ef030e6a3a94ddfff12b8217da4dca94650.zip
(unexec): Round up section header offset to bss alignment
before deciding whether it's after the bss section.
Diffstat (limited to 'src')
-rw-r--r--src/unexelf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/unexelf.c b/src/unexelf.c
index a63ecf0dbb6..60e82cc6a95 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -767,7 +767,9 @@ unexec (new_name, old_name, data_start, bss_start, entry_address)
767 >= OLD_SECTION_H (old_bss_index-1).sh_offset) 767 >= OLD_SECTION_H (old_bss_index-1).sh_offset)
768 NEW_SECTION_H (nn).sh_offset += new_data2_size; 768 NEW_SECTION_H (nn).sh_offset += new_data2_size;
769#else 769#else
770 if (NEW_SECTION_H (nn).sh_offset >= new_data2_offset) 770 if (round_up (NEW_SECTION_H (nn).sh_offset,
771 OLD_SECTION_H (old_bss_index).sh_addralign)
772 >= new_data2_offset)
771 NEW_SECTION_H (nn).sh_offset += new_data2_size; 773 NEW_SECTION_H (nn).sh_offset += new_data2_size;
772#endif 774#endif
773 /* Any section that was originally placed after the section 775 /* Any section that was originally placed after the section