Please sign in to comment.
linker: move scripts generated code at the beginning of .text
When code relocation enabled, there will be serval regions holding text. And then there will be function call between these .text regions, when distance between caller and callee is too far, linker will automatically generate and insert veneer functions. And these veneer functions will be located right after the last instruction in the .text region by the linker. So these code will be put in the memory reserved for priv_stacks text and kobject text if they don't consume all the reserved memory. Or the veneer functions will be put before the reserved memory if there isn't code in the reserved memory. And then in the user mode building process, there will be different memory layout and it will cause usr mode not working. And moving the memory reserved for priv_stacks text and kobject text at the beginning of .text will avoid above problem. The detailed analysis for this issue can be found on Github issue #17038. Fixes: #17038. Signed-off-by: Wentong Wu <firstname.lastname@example.org>
- Loading branch information...
Showing with 4 additions and 3 deletions.