On 3/12/24 04:08, Ilias Apalodimas wrote:
commit 47bd65ef057f ("arm: make __rel_dyn_{start, end} compiler-generated")
were moving the __rel_dyn_start/end on c generated variables that were
injected in their own sections. The reason was that we needed relative
relocations for position independent code and linker bugs back then
prevented us from doing so [0].

However, the linker documentation pages states that symbols that are
defined within a section definition will create a relocatable
type with the value being a fixed offset from the base of a section [1].

[0] binutils commit 6b3b0ab89663 ("Make linker assigned symbol dynamic only for 
shared object")
[1]https://sourceware.org/binutils/docs/ld/Expression-Section.html

Suggested-by: Sam Edwards<cfswo...@gmail.com>
Signed-off-by: Ilias Apalodimas<ilias.apalodi...@linaro.org>
Reviewed-by: Sam Edwards<cfswo...@gmail.com>
Tested-by: Sam Edwards<cfswo...@gmail.com>  # Binary output identical
---
  arch/arm/cpu/armv8/u-boot.lds | 16 +++-------------
  arch/arm/cpu/u-boot.lds       | 14 +++-----------
  arch/arm/lib/sections.c       |  2 --
  arch/arm/mach-zynq/u-boot.lds | 14 +++-----------
  4 files changed, 9 insertions(+), 37 deletions(-)

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

r~

Reply via email to