This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH v2 4/7] ld:pru: Add sections for compatibility with TI proprietary toolchain
- From: Dimitar Dimitrov <dimitar at dinux dot eu>
- To: binutils at sourceware dot org
- Cc: Dimitar Dimitrov <dimitar at dinux dot eu>
- Date: Fri, 4 May 2018 20:07:39 +0300
- Subject: [PATCH v2 4/7] ld:pru: Add sections for compatibility with TI proprietary toolchain
- References: <20180504170742.27303-1-dimitar@dinux.eu>
The TI proprietary toolchain generates references to sections with
separator ":" instead of the traditional dot "." . Accommodate them
to allow Binutils to link against TI toolchain object files.
2018-05-02 Dimitar Dimitrov <dimitar@dinux.eu>
* scripttempl/pru.sc: Add LD sections to allow linking TI
toolchain object files.
Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
---
ld/scripttempl/pru.sc | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/ld/scripttempl/pru.sc b/ld/scripttempl/pru.sc
index 88fe06cb63..7e87e20191 100644
--- a/ld/scripttempl/pru.sc
+++ b/ld/scripttempl/pru.sc
@@ -32,12 +32,14 @@ SECTIONS
{
*(.rel.text)
${RELOCATING+*(.rel.text.*)}
+ ${RELOCATING+*(.rel.text:*)}
${RELOCATING+*(.rel.gnu.linkonce.t*)}
}
.rela.text ${RELOCATING-0} :
{
*(.rela.text)
${RELOCATING+*(.rela.text.*)}
+ ${RELOCATING+*(.rela.text:*)}
${RELOCATING+*(.rela.gnu.linkonce.t*)}
}
.rel.fini ${RELOCATING-0} : { *(.rel.fini) }
@@ -46,24 +48,28 @@ SECTIONS
{
*(.rel.rodata)
${RELOCATING+*(.rel.rodata.*)}
+ ${RELOCATING+*(.rel.rodata:*)}
${RELOCATING+*(.rel.gnu.linkonce.r*)}
}
.rela.rodata ${RELOCATING-0} :
{
*(.rela.rodata)
${RELOCATING+*(.rela.rodata.*)}
+ ${RELOCATING+*(.rela.rodata:*)}
${RELOCATING+*(.rela.gnu.linkonce.r*)}
}
.rel.data ${RELOCATING-0} :
{
*(.rel.data)
${RELOCATING+*(.rel.data.*)}
+ ${RELOCATING+*(.rel.data:*)}
${RELOCATING+*(.rel.gnu.linkonce.d*)}
}
.rela.data ${RELOCATING-0} :
{
*(.rela.data)
${RELOCATING+*(.rela.data.*)}
+ ${RELOCATING+*(.rela.data:*)}
${RELOCATING+*(.rela.gnu.linkonce.d*)}
}
.rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
@@ -92,6 +98,8 @@ SECTIONS
${RELOCATING+. = ALIGN(4);}
${RELOCATING+*(.text.*)}
${RELOCATING+. = ALIGN(4);}
+ ${RELOCATING+*(.text:*)}
+ ${RELOCATING+. = ALIGN(4);}
${RELOCATING+*(.gnu.linkonce.t*)}
${RELOCATING+. = ALIGN(4);}
@@ -123,8 +131,10 @@ SECTIONS
${RELOCATING+ PROVIDE (_data_start = .) ; }
*(.data)
${RELOCATING+ *(.data*)}
+ ${RELOCATING+ *(.data:*)}
${RELOCATING+ *(.rodata) /* We need to include .rodata here if gcc is used. */}
${RELOCATING+ *(.rodata.*) /* with -fdata-sections. */}
+ ${RELOCATING+ *(.rodata:*)}
${RELOCATING+*(.gnu.linkonce.d*)}
${RELOCATING+*(.gnu.linkonce.r*)}
${RELOCATING+. = ALIGN(4);}
@@ -142,6 +152,7 @@ SECTIONS
${RELOCATING+ PROVIDE (_bss_start = .) ; }
*(.bss)
${RELOCATING+ *(.bss.*)}
+ ${RELOCATING+ *(.bss:*)}
${RELOCATING+*(.gnu.linkonce.b*)}
*(COMMON)
${RELOCATING+ PROVIDE (_bss_end = .) ; }
--
2.11.0