Skip to content
Browse files

x86: Make .rodata readonly

During the conversion of .bin to .o objcopy was not setting the
section to be readonly causing the .rodata in the final image has
write permission.

Signed-off-by: Flavio Ceolin <>
  • Loading branch information...
ceolin authored and nashif committed May 16, 2019
1 parent 6378e1e commit 348b0266d8dce0930c42a1699ec68defa786c86e
Showing with 1 addition and 1 deletion.
  1. +1 −1 arch/x86/CMakeLists.txt
@@ -88,7 +88,7 @@ function(add_bin_file_to_the_next_link target_dependency bin)
-I binary
--rename-section .data=${bin}
--rename-section .data=${bin},CONTENTS,ALLOC,LOAD,READONLY,DATA
DEPENDS ${target_dependency} ${bin}.bin

0 comments on commit 348b026

Please sign in to comment.
You can’t perform that action at this time.