Skip to content
Permalink
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 <flavio.ceolin@intel.com>
  • 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
-B ${OUTPUT_ARCH}
-O ${OUTPUT_FORMAT}
--rename-section .data=${bin}
--rename-section .data=${bin},CONTENTS,ALLOC,LOAD,READONLY,DATA
${bin}.bin
${bin}.o
DEPENDS ${target_dependency} ${bin}.bin

0 comments on commit 348b026

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