variable __rel_dyn_start and __rel_dyn_end missing for u-boot proper?
Chan Kim
ckim at etri.re.kr
Thu Nov 25 02:29:46 CET 2021
Hello experts,
I can't find the definition of variable __rel_dyn_start and __rel_dyn_end
for u-boot proper build.
Those variables are used in arch/arm/cpu/armv8/start.S
(though they are enclosed in #ifdef CONFIG_POSISION_INDEPDNED and #endif)
pie_fixup:
adr x0, _start /* x0 <- Runtime value of _start */
ldr x1, _TEXT_BASE /* x1 <- Linked value of _start */
subs x9, x0, x1 /* x9 <- Run-vs-link offset */
beq pie_fixup_done
adrp x2, __rel_dyn_start /* x2 <- Runtime &__rel_dyn_start */
add x2, x2, #:lo12:__rel_dyn_start
adrp x3, __rel_dyn_end /* x3 <- Runtime &__rel_dyn_end */
add x3, x3, #:lo12:__rel_dyn_end
pie_fix_loop:
Shouldn't they be added in arch/arm/cpu/armv8/u-boot.lds like in
arch/arm/cpu/u-boot-spl.lds?
These are only places __rel_dyn_star/end are defined for arm. (v2021.10)
ckim at ckim-ubuntu:~/U-BOOT/u-boot$ grep '__rel_dyn_\(start\|end\).*=.*\.'
arch/arm -r
arch/arm/cpu/u-boot-spl.lds: __rel_dyn_start = .;
arch/arm/cpu/u-boot-spl.lds: __rel_dyn_end = .;
arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds: __rel_dyn_start =
.;
arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds: __rel_dyn_end = .;
By the way, I asked a question about the relocation code on stack exchange.
I would be very happy if anyone here could spare some time to answer my
question.
https://stackoverflow.com/questions/70092014/cant-exactly-understand-the-ass
embly-code-about-how-relocation-works-in-u-boot/70094227#70094227
Thank you!
Chan Kim
More information about the U-Boot
mailing list