Skip to content

Commit

Permalink
compiler: Strip .image_header section in bin
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kasjer committed Nov 23, 2023
1 parent 7dfe546 commit c53cb2d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions newt/toolchain/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,8 @@ func (c *Compiler) generateExtras(elfFilename string,
".bss.core",
"-R",
".bss.core.nz",
"-R",
".image_header",
"-O",
"binary",
elfFilename,
Expand Down

0 comments on commit c53cb2d

Please sign in to comment.