+ unsigned long kernel_toc = (unsigned long)(&__toc_start) + 0x8000UL;

This line could do with a comment saying what it is doing ...

It does need a comment I agree, but I don't think I can do it justice :)
... I just used what was already there.

Here, have one:

"The TOC register (GPR2) points 32kB into the TOC, so that 64kB
of the TOC can be addressed using a single machine instruction."

or, perhaps simpler:

"The TOC register (GPR2) points 32kB into the TOC, because the
ABI says so."


Segher

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to