]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "RISC-V: Make BSS section as the last section in vmlinux.lds.S"
authorPalmer Dabbelt <palmer@sifive.com>
Fri, 8 Feb 2019 17:11:08 +0000 (09:11 -0800)
committerPalmer Dabbelt <palmer@sifive.com>
Mon, 11 Feb 2019 23:24:45 +0000 (15:24 -0800)
commit1898c7ca55f6de0a7b2907dcd1b5f7aef130907a
tree12499110a4de0f659685951f0150988a5bb16b39
parent5632f58b14e1d21d6da8c56442d8da7f09e50674
Revert "RISC-V: Make BSS section as the last section in vmlinux.lds.S"

At least BBL relies on the flat binaries containing all the bytes in the
actual image to exist in the file.  Before this revert the flat images
dropped the trailing zeros, which caused BBL to put its copy of the
device tree where Linux thought the BSS was, which wreaks all sorts of
havoc.  Manifesting the bug is a bit subtle because BBL aligns
everything to 2MiB page boundaries, but with large enough kernels you're
almost certain to get bitten by the bug.

While moving the sections around isn't a great long-term fix, it will at
least avoid producing broken images.

This reverts commit 11f1d6640c7da342e7d3d989cb3ad7fd37316fa5.

Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
arch/riscv/kernel/vmlinux.lds.S