Instead we now link the bootwrapper with -pie to get a position-
independent executable, and process the relocations in the dynamic
relocation section that the linker puts into the executable.
Hurray! Looks good, just a few nits...
+ bl .+4
+p_base:mflrr10
Segher Boessenkool writes:
Hurray! Looks good, just a few nits...
Thanks for reviewing.
+ bl .+4
+p_base:mflrr10 /* r10 now points to runtime addr of
p_base */
bl p_base instead?
I went back and forth on that. I ended up with it that way to
emphasize
+ bl .+4
+p_base:mflrr10 /* r10 now points to runtime addr of
p_base */
bl p_base instead?
I went back and forth on that. I ended up with it that way to
emphasize that the bl does need to branch to the *next* instruction
for the idiom to work.
Right, I
Segher Boessenkool writes:
... that is exactly what I meant: the code skips relocation only if
both are missing.
Doh! You're right, thanks. Serves me right for being so clever. :)
Paul.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
This changes the way we make the boot wrapper position-independent.
Before we just added the offset (the difference between runtime
address and link address) to each entry in the .got2 section. That
doesn't relocate pointer values in initialized variables and arrays.
Instead we now link the