* scripttempl/pru.sc (.pru_irq_map): Define output section.
* testsuite/ld-pru/pru_irq_map-1.d: New test.
* testsuite/ld-pru/pru_irq_map-2.d: New test.
* testsuite/ld-pru/pru_irq_map.s: New test.
+2021-11-30 Nick Clifton <nickc@redhat.com>
+
+ * scripttempl/pru.sc (.pru_irq_map): Define output section.
+ * testsuite/ld-pru/pru_irq_map-1.d: New test.
+ * testsuite/ld-pru/pru_irq_map-2.d: New test.
+ * testsuite/ld-pru/pru_irq_map.s: New test.
+
2021-11-17 Jeremy Drake <cygwin@jdrake.com>
* emultempl/pep.em (DEFAULT_DLL_CHARACTERISTICS): Set to 0 for
${RELOCATING+ . += __STACK_SIZE ; }
} ${RELOCATING+ > dmem}
+ /* Remoteproc loader in Linux kernel 5.10 and later reads this section
+ to setup the PRUSS interrupt controller. The interrupt map section
+ is never referenced from PRU firmware, so there is no need to
+ place it in the target dmem memory. */
+ .pru_irq_map 0 : { *(.pru_irq_map) }
+
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
--- /dev/null
+#name: pru_irq_map special section for host
+#source: pru_irq_map.s
+#ld: --defsym=__HEAP_SIZE=0 --defsym=__STACK_SIZE=0
+#readelf: -l --wide
+
+# Ensure that .pru_irq_map section is not loaded into target memory.
+
+#...
+Program Headers:
+ +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg +Align
+ +LOAD +0x[0-9a-f]+ 0x0+ 0x0+ 0x0+8 0x0+8 RW 0x1
+ +LOAD +0x[0-9a-f]+ 0x20+ 0x20+ 0x0+4 0x0+4 R E 0x1
+
+ Section to Segment mapping:
+ +Segment Sections...
+ +00 +.data[ ]*
+ +01 +.text[ ]*
--- /dev/null
+#name: pru_irq_map special section for host
+#source: pru_irq_map.s
+#ld: --defsym=__HEAP_SIZE=0 --defsym=__STACK_SIZE=0
+#readelf: -S --wide
+
+# Ensure that .pru_irq_map section is present.
+
+#...
+ +\[[ 0-9]+\] +.pru_irq_map +PROGBITS +0+ +[0-9a-f]+ +0+5 +00 +0 +0 +1
+#...
--- /dev/null
+
+ .text
+ .global _start
+_start:
+ nop
+
+ .data
+my_global_var:
+ .byte 10
+ .byte 11
+ .byte 12
+ .byte 13
+
+ .section .pru_irq_map,"",@progbits
+my_intc_map:
+ .byte 0
+ .byte 1
+ .byte 19
+ .byte 1
+ .byte 1