File tree 3 files changed +11
-2
lines changed
3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -111,10 +111,15 @@ add_custom_command(
111
111
-no -pie
112
112
-Wl,-r
113
113
${rust_ldscript}
114
+ -Wl,-T ${CMAKE_CURRENT_SOURCE_DIR} /gnu-stack.ld
114
115
-Wl,--whole-archive ${rust_staticlib}
115
116
-Wl,--no -whole-archive $<TARGET_OBJECTS:rust_c>
116
117
-o ${rust_obj}
117
- DEPENDS ${rust_staticlib} $<TARGET_OBJECTS:rust_c>
118
+ DEPENDS
119
+ ${rust_staticlib}
120
+ $<TARGET_OBJECTS:rust_c>
121
+ ${CMAKE_CURRENT_SOURCE_DIR} /rust-smem.ld
122
+ ${CMAKE_CURRENT_SOURCE_DIR} /gnu-stack.ld
118
123
COMMAND_EXPAND_LISTS
119
124
)
120
125
add_custom_target (rust_final DEPENDS ${rust_obj} )
Original file line number Diff line number Diff line change
1
+ SECTIONS
2
+ {
3
+ /DISCARD/ : { *(.note.GNU-stack) }
4
+ } INSERT AFTER .text;
Original file line number Diff line number Diff line change 2
2
{
3
3
data_smem_rust_std_partition_data : { *librust_app.a :*(.data .data.*) }
4
4
data_smem_rust_std_partition_bss : { *librust_app.a :*(.bss .bss.* COMMON COMMON.*) }
5
- }
5
+ } INSERT BEFORE .data;
You can’t perform that action at this time.
0 commit comments