Commit faee8ef0 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(unexec): Round up section header offset to bss alignment

before deciding whether it's after the bss section.
parent aa39a5dd
......@@ -767,7 +767,9 @@ unexec (new_name, old_name, data_start, bss_start, entry_address)
>= OLD_SECTION_H (old_bss_index-1).sh_offset)
NEW_SECTION_H (nn).sh_offset += new_data2_size;
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;
/* Any section that was originally placed after the section
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment