From fff407bea41fc6fc6728054c9d0dffc3cbc3562d Mon Sep 17 00:00:00 2001 From: Richard Meadows <962920+richardeoin@users.noreply.github.com> Date: Wed, 15 Jul 2020 22:53:29 +0200 Subject: [PATCH] Update link.x Similar to #38, riscv compilers may also generate 'small ro data' `.srodata` sections. This doesn't appear to be well documented, but see [this blog post](https://www.sifive.com/blog/all-aboard-part-3-linker-relaxation-in-riscv-toolchain) for small amount of context. --- CHANGELOG.md | 1 + link.x | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 848ab0b..c7538c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Changed - Preserve `.eh_frame` and `.eh_frame_hdr` sections +- Place `.srodata` and `.srodata.*` sections in `.rodata` ## [v0.7.1] - 2020-06-02 diff --git a/link.x b/link.x index 73553cf..d319d09 100644 --- a/link.x +++ b/link.x @@ -57,6 +57,7 @@ SECTIONS .rodata : ALIGN(4) { + *(.srodata .srodata.*); *(.rodata .rodata.*); /* 4-byte align the end (VMA) of this section.