[PATCH] ld: pru: Ensure resource table is aligned

Dimitar Dimitrov dimitar@dinux.eu
Sat May 8 18:40:34 GMT 2021


TI recently specified [1] an alignment requirement for the resource table.

[1] https://e2e.ti.com/support/processors/f/791/p/973317/3615080#3615080

ld/ChangeLog:

	* scripttempl/pru.sc (.resource_table): Add ALIGN directive.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
---
 ld/scripttempl/pru.sc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ld/scripttempl/pru.sc b/ld/scripttempl/pru.sc
index 08aceaa3b2c..9fda2084991 100644
--- a/ld/scripttempl/pru.sc
+++ b/ld/scripttempl/pru.sc
@@ -149,6 +149,9 @@ SECTIONS
 
   .resource_table ${RELOCATING-0} :
   {
+    /* Linux remoteproc loader requires the resource table address
+       to be aligned to 8 bytes.  */
+    ${RELOCATING+. = ALIGN(8);}
     KEEP (*(.resource_table))
   } ${RELOCATING+ > dmem}
 
-- 
2.20.1



More information about the Binutils mailing list