* [binutils-gdb] Use bfd_rename_section in msp430.em
@ 2022-11-28 9:46 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2022-11-28 9:46 UTC (permalink / raw)
To: bfd-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e7d942e0144264e952a735ae4fc41424df47470e
commit e7d942e0144264e952a735ae4fc41424df47470e
Author: Alan Modra <amodra@gmail.com>
Date: Mon Nov 28 10:14:30 2022 +1030
Use bfd_rename_section in msp430.em
* emultempl/msp430.em (add_region_prefix <REGION_EITHER>): Use
bfd_rename_section.
* testsuite/ld-msp430-elf/msp430-tiny-rom.ld: Handle varian data
and bss input sections.
Diff:
---
ld/emultempl/msp430.em | 2 +-
ld/testsuite/ld-msp430-elf/msp430-tiny-rom.ld | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ld/emultempl/msp430.em b/ld/emultempl/msp430.em
index f188b46b4aa..048e3ebfe5a 100644
--- a/ld/emultempl/msp430.em
+++ b/ld/emultempl/msp430.em
@@ -417,7 +417,7 @@ add_region_prefix (bfd *abfd ATTRIBUTE_UNUSED, asection *s,
bfd_rename_section (s, concat (".lower", curr_name, NULL));
break;
case REGION_EITHER:
- s->name = concat (".either", curr_name, NULL);
+ bfd_rename_section (s, concat (".either", curr_name, NULL));
break;
default:
/* Unreachable. */
diff --git a/ld/testsuite/ld-msp430-elf/msp430-tiny-rom.ld b/ld/testsuite/ld-msp430-elf/msp430-tiny-rom.ld
index 3e263796948..c88442377d1 100644
--- a/ld/testsuite/ld-msp430-elf/msp430-tiny-rom.ld
+++ b/ld/testsuite/ld-msp430-elf/msp430-tiny-rom.ld
@@ -26,13 +26,19 @@ SECTIONS
.data :
{
. = ALIGN(2);
+ *(.lower.data.* .lower.data)
*(.data.* .data)
+ *(.either.data.* .either.data)
+ *(.upper.data.* .upper.data)
} > RAM AT> ROM
.bss :
{
. = ALIGN(2);
+ *(.lower.bss.* .lower.bss)
*(.bss.* .bss)
+ *(.either.bss.* .either.bss)
+ *(.upper.bss.* .upper.bss)
} > RAM
.upper.text :
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-28 9:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28 9:46 [binutils-gdb] Use bfd_rename_section in msp430.em Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).