[rumpkernel/rumprun] ef5da3: avoid orphan .bss.* sections in hw/arch/i386/kern....

  • From: GitHub <noreply@xxxxxxxxxx>
  • To: rumpkernel-builds@xxxxxxxxxxxxx
  • Date: Wed, 17 Jun 2015 15:07:12 -0700

Branch: refs/heads/master
Home: https://github.com/rumpkernel/rumprun
Commit: ef5da31206ce133946a8e0d7efe25cd73fd78ed4

https://github.com/rumpkernel/rumprun/commit/ef5da31206ce133946a8e0d7efe25cd73fd78ed4
Author: Stefan Grundmann <sg2342@xxxxxxxxxxxxxx>
Date: 2015-06-17 (Wed, 17 Jun 2015)

Changed paths:
M platform/hw/arch/i386/kern.ldscript

Log Message:
-----------
avoid orphan .bss.* sections in hw/arch/i386/kern.ldscript

include .bss.* input sections in .bss output section

If .bss.* input sections are not added to some output section, ld orphan section
placing logic will add them after the .bss output section.
However: _end will still point at the end of the .bss section.

Since _end is used by the loader to place the alloc_bitmap at the next page,
.bss.* section content that crosses this page boundary will be corrupted.

this is the cause for issue #28 where:
- _end set to location after .bss (by ld)
- orphan .bss.* sections (c++ statics) placed after .bss (by ld)
- _end is on a page boundary (by pure chance at first)
- .bss.* sections set to 0xff (by bmk_pgalloc_loadmem in loader)
- abort (c++ init code throws in constructing objects from corrupted statics)


Commit: cf28a032e4b070b02c049cc50f2980e5f4423472

https://github.com/rumpkernel/rumprun/commit/cf28a032e4b070b02c049cc50f2980e5f4423472
Author: Antti Kantee <pooka@xxxxxx>
Date: 2015-06-17 (Wed, 17 Jun 2015)

Changed paths:
M platform/hw/arch/i386/kern.ldscript

Log Message:
-----------
Merge pull request #32 from sg2342/fix_hw_i386_ldscript

avoid orphan .bss.* sections in hw/arch/i386/kern.ldscript


Compare:
https://github.com/rumpkernel/rumprun/compare/50c430f49a70...cf28a032e4b0

Other related posts:

  • » [rumpkernel/rumprun] ef5da3: avoid orphan .bss.* sections in hw/arch/i386/kern.... - GitHub