[PATCH] D50494: [LLD] Reserve memory in implicitly set LMARegions
Konstantin Schwarz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 10 00:32:00 PDT 2018
kschwarz added a comment.
I agree it makes the code more complicated. Linker scripts require a lot of corner cases to be handled specially.
This patch right now does not take into account different memory attributes, which would forbid the placement of some output sections into those regions, but would also complicate the handling even more. In this case, we currently expect the user to set a valid LMARegion explicitly.
However, if we want to be compatible with GNU linker scripts, we need to handle these cases.
These features are used heavily in embedded systems packaging several memories with different properties (flash, ram, tightly coupled memories, etc.). In order to program these systems efficiently, the user needs precise control over where the code and date is placed.
An example can be found here: https://github.com/ChibiOS/ChibiOS/blob/trunk/os/common/startup/ARMCMx/compilers/LLVM/ld/STM32F401xE.ld
My patches from last week fix bugs found and worked-around in this script. This patch fixes problems discovered also in existing GNU linker scripts.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D50494
More information about the llvm-commits
mailing list