diff options
-rw-r--r-- | ld/scripttempl/pru.sc | 24 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/orphan3.d | 2 |
2 files changed, 15 insertions, 11 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. */ diff --git a/ld/testsuite/ld-elf/orphan3.d b/ld/testsuite/ld-elf/orphan3.d index af6ce25..ec10164 100644 --- a/ld/testsuite/ld-elf/orphan3.d +++ b/ld/testsuite/ld-elf/orphan3.d @@ -7,7 +7,7 @@ #ld: #readelf: -S --wide #xfail: [uses_genelf] -#xfail: xstormy16-*-* +#xfail: xstormy16-*-* pru-*-* #... \[[ 0-9]+\] \.foo +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+20 +0+ +A +0 +0 +[0-9]+ |