• Palmer Dabbelt's avatar
    Revert "RISC-V: Make BSS section as the last section in vmlinux.lds.S" · 41fb9d54
    Palmer Dabbelt authored
    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 22e6a2e1.
    Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    41fb9d54
vmlinux.lds.S 1.67 KB