Handle unaligned .bss on sparc64.
Current code improperly assumes that both __bss_start and _end are aligned to 8-bytes. Eliminating this assumption and explicitly align modules.
This commit is contained in:
parent
4a73746a04
commit
e5ed2f6947
5 changed files with 49 additions and 10 deletions
|
@ -1356,6 +1356,11 @@ SUFFIX (load_image) (const char *kernel_path, size_t *exec_size,
|
|||
else
|
||||
*bss_size = 0;
|
||||
|
||||
if (image_target->id == IMAGE_SPARC64_AOUT
|
||||
|| image_target->id == IMAGE_SPARC64_RAW
|
||||
|| image_target->id == IMAGE_SPARC64_CDCORE)
|
||||
*kernel_sz = ALIGN_UP (*kernel_sz, image_target->mod_align);
|
||||
|
||||
if (image_target->id == IMAGE_EFI)
|
||||
{
|
||||
symtab_section = NULL;
|
||||
|
|
|
@ -383,7 +383,8 @@ static const struct grub_install_image_target_desc image_targets[] =
|
|||
.decompressor_uncompressed_addr = TARGET_NO_FIELD,
|
||||
.section_align = 1,
|
||||
.vaddr_offset = 0,
|
||||
.link_addr = GRUB_KERNEL_SPARC64_IEEE1275_LINK_ADDR
|
||||
.link_addr = GRUB_KERNEL_SPARC64_IEEE1275_LINK_ADDR,
|
||||
.mod_align = GRUB_KERNEL_SPARC64_IEEE1275_MOD_ALIGN,
|
||||
},
|
||||
{
|
||||
.dirname = "sparc64-ieee1275",
|
||||
|
@ -398,7 +399,8 @@ static const struct grub_install_image_target_desc image_targets[] =
|
|||
.decompressor_uncompressed_addr = TARGET_NO_FIELD,
|
||||
.section_align = 1,
|
||||
.vaddr_offset = 0,
|
||||
.link_addr = GRUB_KERNEL_SPARC64_IEEE1275_LINK_ADDR
|
||||
.link_addr = GRUB_KERNEL_SPARC64_IEEE1275_LINK_ADDR,
|
||||
.mod_align = GRUB_KERNEL_SPARC64_IEEE1275_MOD_ALIGN,
|
||||
},
|
||||
{
|
||||
.dirname = "sparc64-ieee1275",
|
||||
|
@ -413,7 +415,8 @@ static const struct grub_install_image_target_desc image_targets[] =
|
|||
.decompressor_uncompressed_addr = TARGET_NO_FIELD,
|
||||
.section_align = 1,
|
||||
.vaddr_offset = 0,
|
||||
.link_addr = GRUB_KERNEL_SPARC64_IEEE1275_LINK_ADDR
|
||||
.link_addr = GRUB_KERNEL_SPARC64_IEEE1275_LINK_ADDR,
|
||||
.mod_align = GRUB_KERNEL_SPARC64_IEEE1275_MOD_ALIGN,
|
||||
},
|
||||
{
|
||||
.dirname = "ia64-efi",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue