File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -682,6 +682,10 @@ endif
682682ifeq ($(ARCH ) ,PPC)
683683 CROSS_COMPILE? =powerpc-linux-gnu-
684684 LDFLAGS+=-Wl,--build-id =none
685+ # Produce a fully-resolved static ELF (no dynamic relocations).
686+ # Required for JTAG probes that load ELFs but don't process relocations.
687+ CFLAGS+ =-fno-pic -fno-pie
688+ LDFLAGS+ =-no-pie
685689 CFLAGS+ =-DARCH_PPC -DFAST_MEMCPY -ffreestanding -fno-tree-loop-distribute-patterns
686690
687691 ifeq ($(DEBUG_UART),0)
Original file line number Diff line number Diff line change @@ -53,17 +53,24 @@ SECTIONS
5353 *(.text *)
5454 *(.rodata *)
5555 *(.sdata *)
56+ KEEP (*(.keystore ))
5657 } > FLASH
5758
58- /* Read-only sections, merged into text segment: */
59- .interp : { *(.interp ) }
60- .hash : { *(.hash ) }
61- .dynsym : { *(.dynsym ) }
62- .dynstr : { *(.dynstr ) }
63- .gnu.version : { *(.gnu .version ) }
64- .gnu.version_r : { *(.gnu .version_r ) }
65- .gnu.hash : { *(.gnu .hash ) }
66- .rela.dyn : { *(.rela .dyn ) }
59+ /* Discard dynamic linking sections - not needed for bare-metal.
60+ * Ensures the ELF has no relocation sections, so JTAG probes
61+ * (e.g. Ronetix PEEDI) can load it without a dynamic linker. */
62+ /DISCARD/ :
63+ {
64+ *(.interp )
65+ *(.hash )
66+ *(.dynsym )
67+ *(.dynstr )
68+ *(.gnu .version )
69+ *(.gnu .version_r )
70+ *(.gnu .hash )
71+ *(.rela .dyn )
72+ *(.rela .plt )
73+ }
6774
6875 /* Store flash location for .ramcode copy */
6976 _stored_ramcode = .;
You can’t perform that action at this time.
0 commit comments