diff options
author | Nick Clifton <nickc@redhat.com> | 2021-11-30 10:54:50 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2021-11-30 13:11:57 +0000 |
commit | 44b357eb9aefc77a8385e631d8e3035a664f2333 (patch) | |
tree | 6e6b168933d9ac723e3a056d586dceab3d757d6d /ld/testsuite/ld-pru | |
parent | ae9aa73767ca46f34ee6ea915bdf13b77d058d4d (diff) | |
download | binutils-44b357eb9aefc77a8385e631d8e3035a664f2333.zip binutils-44b357eb9aefc77a8385e631d8e3035a664f2333.tar.gz binutils-44b357eb9aefc77a8385e631d8e3035a664f2333.tar.bz2 |
ld: pru: Add pru_irq_map output section
* 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.
Diffstat (limited to 'ld/testsuite/ld-pru')
-rw-r--r-- | ld/testsuite/ld-pru/pru_irq_map-1.d | 17 | ||||
-rw-r--r-- | ld/testsuite/ld-pru/pru_irq_map-2.d | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-pru/pru_irq_map.s | 20 |
3 files changed, 47 insertions, 0 deletions
diff --git a/ld/testsuite/ld-pru/pru_irq_map-1.d b/ld/testsuite/ld-pru/pru_irq_map-1.d new file mode 100644 index 0000000..bbdf5b6 --- /dev/null +++ b/ld/testsuite/ld-pru/pru_irq_map-1.d @@ -0,0 +1,17 @@ +#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[ ]* diff --git a/ld/testsuite/ld-pru/pru_irq_map-2.d b/ld/testsuite/ld-pru/pru_irq_map-2.d new file mode 100644 index 0000000..3166595 --- /dev/null +++ b/ld/testsuite/ld-pru/pru_irq_map-2.d @@ -0,0 +1,10 @@ +#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 +#... diff --git a/ld/testsuite/ld-pru/pru_irq_map.s b/ld/testsuite/ld-pru/pru_irq_map.s new file mode 100644 index 0000000..b38d037 --- /dev/null +++ b/ld/testsuite/ld-pru/pru_irq_map.s @@ -0,0 +1,20 @@ + + .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 |