Skip to content

Commit 4a1dd3a

Browse files
author
Joel Dice
committed
specify writable and executable section for boot image
1 parent eaf30eb commit 4a1dd3a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,8 +432,10 @@ ifeq ($(platform),darwin)
432432
else
433433
(wd=$$(pwd); \
434434
cd $(native-build); \
435-
$(objcopy) -I binary bootimage.bin \
436-
-O $(object-format) -B $(object-arch) "$${wd}/$(@)")
435+
$(objcopy) --rename-section=.data=.boot -I binary bootimage.bin \
436+
-O $(object-format) -B $(object-arch) "$${wd}/$(@).tmp"; \
437+
$(objcopy) --set-section-flags .boot=alloc,load,code "$${wd}/$(@).tmp" \
438+
"$${wd}/$(@)")
437439
endif
438440

439441
$(executable): \

0 commit comments

Comments
 (0)