kernel: fix kobj table if having .sdata section.
The gperf generated data needs to be placed at the end of memory to avoid pushing symbols around in memory, but data in .sdata section aren't placed currently. Also renaming .sdata section to kobject_data.* section and add it to kobject_data output section to fix issue. Fixes #37023. Signed-off-by: Jim Shu <cwshu@andestech.com>
This commit is contained in:
parent
9debd59368
commit
70e1dee42c
2 changed files with 2 additions and 0 deletions
|
@ -929,6 +929,7 @@ if(CONFIG_USERSPACE)
|
|||
COMMAND $<TARGET_PROPERTY:bintools,elfconvert_command>
|
||||
$<TARGET_PROPERTY:bintools,elfconvert_flag>
|
||||
$<TARGET_PROPERTY:bintools,elfconvert_flag_section_rename>.data=.kobject_data.data
|
||||
$<TARGET_PROPERTY:bintools,elfconvert_flag_section_rename>.sdata=.kobject_data.sdata
|
||||
$<TARGET_PROPERTY:bintools,elfconvert_flag_section_rename>.text=.kobject_data.text
|
||||
$<TARGET_PROPERTY:bintools,elfconvert_flag_section_rename>.rodata=.kobject_data.rodata
|
||||
$<TARGET_PROPERTY:bintools,elfconvert_flag_infile>${KOBJECT_HASH_OUTPUT_OBJ_PATH}
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#endif
|
||||
|
||||
*(".kobject_data.data*")
|
||||
*(".kobject_data.sdata*")
|
||||
|
||||
#ifdef KOBJECT_DATA_ALIGN
|
||||
_kobject_data_area_end = .;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue