This repository has been archived by the owner on Aug 17, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the .data section from RISC-V's default linker script addon
I'm actually not sure why this is here: .data isn't read-only and shouldn't be in the INITIAL_READONLY_SECTIONS variable. This causes a handful of sections that should be read-only to actually be read-write when loaded, which breaks things like "-z relro". Removing this causes the default .data mapping to be used, which comes from upstream. As far os I can tell, there was no reason we were ever supposed to have our own .data in the first place, and no other architectures have ever done it this way. I tested this still builds and boots Busybox on Linux. Thanks to Alan Morda for finding the problem. ld/ChangeLog 2016-12-29 Palmer Dabbelt <[email protected]> * emulparams/elf32lriscv-defs.sh (INITIAL_READONLY_SECTIONS): Remove the RISC-V specific .data section mapping.
- Loading branch information