_text vs _start
Hi Magnus, xen/common/kexec.c references _text, which is not provided by PowerPC's linker script.
Given that you do arithmetic with _end, can you explain why you're not using _start, which is a standard symbol provided by the default linker script?
Outside of Linux, kexec is the only code referencing _text.
Signature · 2 lines
Hollis Blanchard IBM Linux Technology Center
Quoted 3 lines · Hollis Blanchard
Given that you do arithmetic with
_end, can you explain why you're not using_start, which is a standard symbol provided by the default linker script?
My mistake; _start of course isn't a linker script symbol at all, but rather the entry point code.
Signature · 2 lines
Hollis Blanchard IBM Linux Technology Center
Quoted 7 lines · Hollis Blanchard
Quoted 3 lines · Hollis Blanchard
Given that you do arithmetic with
_end, can you explain why you're not using_start, which is a standard symbol provided by the default linker script?My mistake;
_startof course isn't a linker script symbol at all, but rather the entry point code.
There is an unnecessary disagreement among architectures over what symbols should be used to mark section and image boundaries. We could reasonably agree on at least _start/_end and _stext/_etext I think. This would allow functions like is_kernel_text() to become generic, and make it obvious which labels kexec should be using.
-- Keir
Quoted 7 lines · Keir Fraser
Quoted 5 lines · Hollis Blanchard
Quoted 3 lines · Hollis Blanchard
Given that you do arithmetic with
_end, can you explain why you're not using_start, which is a standard symbol provided by the default linker script?
Quoted 8 lines
Quoted 2 lines
My mistake;
_startof course isn't a linker script symbol at all, but rather the entry point code.There is an unnecessary disagreement among architectures over what symbols should be used to mark section and image boundaries. We could reasonably agree on at least _start/_end and _stext/_etext I think. This would allow functions like
is_kernel_text()to become generic, and make it obvious which labels kexec should be using.
Sounds great to me.
PowerPC already arranges for _start to be at the very beginning of .text, which is at the beginning of the first PT_LOAD segment... so the end result is that the address of _start is the same as our link address.
We also provide _etext, and _end, but not _stext (currently).
Signature · 2 lines
Hollis Blanchard IBM Linux Technology Center
Quoted 5 lines · Keir Fraser
There is an unnecessary disagreement among architectures over what symbols should be used to mark section and image boundaries. We could reasonably agree on at least _start/_end and _stext/_etext I think. This would allow functions like
is_kernel_text()to become generic, and make it obvious which labels kexec should be using.
I was about to suggest to move the prototypes to a generic header file while at it, but it seems like that someone already done that... Thanks!
/ magnus