This is an automated email from the ASF dual-hosted git repository.
jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git
The following commit(s) were added to refs/heads/master by this push:
new 1e7bf05e compiler: Strip .image_header section in bin
1e7bf05e is described below
commit 1e7bf05e5047144c87cd107fa94b4a4983e71e35
Author: Jerzy Kasenberg <[email protected]>
AuthorDate: Thu Nov 23 13:03:45 2023 +0100
compiler: Strip .image_header section in bin
This sepcifies .image_header section that will be removed from elf when
.bin file is generated.
So far there is no such section used.
With this change it is possible to have elf file that already contains
image header (in .image_header section).
This header will be removed and so create image will add new one.
Elf file containing image header can be flashed by debugger, this way
output build from cmake can be use directly by IDE that supports cmake.
---
newt/toolchain/compiler.go | 2 ++
1 file changed, 2 insertions(+)
diff --git a/newt/toolchain/compiler.go b/newt/toolchain/compiler.go
index 9354206d..c63eabbf 100644
--- a/newt/toolchain/compiler.go
+++ b/newt/toolchain/compiler.go
@@ -1108,6 +1108,8 @@ func (c *Compiler) generateExtras(elfFilename string,
".bss.core",
"-R",
".bss.core.nz",
+ "-R",
+ ".image_header",
"-O",
"binary",
elfFilename,