diff options
Diffstat (limited to 'ld/scripttempl/pru.sc')
-rw-r--r-- | ld/scripttempl/pru.sc | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/ld/scripttempl/pru.sc b/ld/scripttempl/pru.sc index 56d07be..7cb8069 100644 --- a/ld/scripttempl/pru.sc +++ b/ld/scripttempl/pru.sc @@ -149,17 +149,13 @@ SECTIONS ${RELOCATING+*(.gnu.linkonce.r*)} ${RELOCATING+. = ALIGN(4);} ${RELOCATING+ PROVIDE (_data_end = .) ; } - } ${RELOCATING+ > dmem } - /* Linux remoteproc loader requires the resource_table section - start address to be aligned to 8 bytes. */ - .resource_table ${RELOCATING-0} ${RELOCATING+ ALIGN(8)} : - { - KEEP (*(.resource_table)) - } ${RELOCATING+ > dmem} - - .bss ${RELOCATING-0} : - { + ${RELOCATING+/* Merge the bss input sections into the output + data section. The Linux kernel's remoteproc PRU ELF loader + will not memzero the bss section. The CRT0 will not either, in order + to reduce the final firmware's instruction memory size. Hence + present bss sections as regular data sections, at the negligible + expense of increasing the ELF file size. */} ${RELOCATING+ PROVIDE (_bss_start = .) ; } *(.bss) ${RELOCATING+ *(.bss.*)} @@ -167,6 +163,14 @@ SECTIONS ${RELOCATING+*(.gnu.linkonce.b*)} ${RELOCATING+*(COMMON)} ${RELOCATING+ PROVIDE (_bss_end = .) ; } + + } ${RELOCATING+ > dmem} + + /* Linux remoteproc loader requires the resource_table section + start address to be aligned to 8 bytes. */ + .resource_table ${RELOCATING-0} ${RELOCATING+ ALIGN (8)} : + { + KEEP (*(.resource_table)) } ${RELOCATING+ > dmem} /* Global data not cleared after reset. */ |