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>
This commit is contained in:
parent
6378e1e4a2
commit
348b0266d8
1 changed files with 1 additions and 1 deletions
|
@ -88,7 +88,7 @@ function(add_bin_file_to_the_next_link target_dependency bin)
|
||||||
-I binary
|
-I binary
|
||||||
-B ${OUTPUT_ARCH}
|
-B ${OUTPUT_ARCH}
|
||||||
-O ${OUTPUT_FORMAT}
|
-O ${OUTPUT_FORMAT}
|
||||||
--rename-section .data=${bin}
|
--rename-section .data=${bin},CONTENTS,ALLOC,LOAD,READONLY,DATA
|
||||||
${bin}.bin
|
${bin}.bin
|
||||||
${bin}.o
|
${bin}.o
|
||||||
DEPENDS ${target_dependency} ${bin}.bin
|
DEPENDS ${target_dependency} ${bin}.bin
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue