aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/unexelf.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/unexelf.c b/src/unexelf.c
index 7fa8eb00ce0..015522638f4 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -926,9 +926,15 @@ unexec (new_name, old_name, data_start, bss_start, entry_address)
926 >= OLD_SECTION_H (old_bss_index-1).sh_offset) 926 >= OLD_SECTION_H (old_bss_index-1).sh_offset)
927 NEW_SECTION_H (nn).sh_offset += new_data2_size; 927 NEW_SECTION_H (nn).sh_offset += new_data2_size;
928#else 928#else
929 if (round_up (NEW_SECTION_H (nn).sh_offset, 929 /* The idea of this is that the bss section's sh_offset
930 may need rounding up to compare with new_data2_offset.
931 So we cannot simply compare the sh_offset.
932 However, another small section could exist just before
933 the bss section, and we need to know that is before. */
934 if (round_up (NEW_SECTION_H (nn).sh_offset
935 + NEW_SECTION_H (nn).sh_size,
930 OLD_SECTION_H (old_bss_index).sh_addralign) 936 OLD_SECTION_H (old_bss_index).sh_addralign)
931 >= new_data2_offset) 937 > new_data2_offset)
932 NEW_SECTION_H (nn).sh_offset += new_data2_size; 938 NEW_SECTION_H (nn).sh_offset += new_data2_size;
933#endif 939#endif
934 /* Any section that was originally placed after the section 940 /* Any section that was originally placed after the section