* [binutils-gdb] microblaze: drop/restrict override of .text, .data, and .bss
@ 2024-01-05 7:10 Jan Beulich
0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2024-01-05 7:10 UTC (permalink / raw)
To: bfd-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a2f964a61723482efdbef0612cb48cb27387a230
commit a2f964a61723482efdbef0612cb48cb27387a230
Author: Jan Beulich <jbeulich@suse.com>
Date: Fri Jan 5 08:07:58 2024 +0100
microblaze: drop/restrict override of .text, .data, and .bss
While only ELF is supported right now, (stub) code generally is in place
for the non-ELF case as well. Don't override .bss for ELF - that's
unlikely to be a good idea anyway and prevented the sub-section
specifier from being usable. Don't override .text and .data at all - for
.data and ELF for the same reason, while for .text and ELF obj-elf.c's is
all we need, and for (hypothetical) non-ELF read.c's identical handling
would have been invoked anyway.
Diff:
---
gas/config/tc-microblaze.c | 46 +++++++++-------------------------------------
1 file changed, 9 insertions(+), 37 deletions(-)
diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c
index 6a002a2e152..c971d187095 100644
--- a/gas/config/tc-microblaze.c
+++ b/gas/config/tc-microblaze.c
@@ -135,27 +135,6 @@ microblaze_generate_symbol (char *sym)
/* Handle the section changing pseudo-ops. */
-static void
-microblaze_s_text (int ignore ATTRIBUTE_UNUSED)
-{
-#ifdef OBJ_ELF
- obj_elf_text (ignore);
-#else
- s_text (ignore);
-#endif
-}
-
-static void
-microblaze_s_data (int ignore ATTRIBUTE_UNUSED)
-{
-#ifdef OBJ_ELF
- obj_elf_change_section (".data", SHT_PROGBITS, SHF_ALLOC+SHF_WRITE,
- 0, 0, false);
-#else
- s_data (ignore);
-#endif
-}
-
/* Things in the .sdata segment are always considered to be in the small data section. */
static void
@@ -298,20 +277,13 @@ microblaze_s_rdata (int localvar)
}
static void
-microblaze_s_bss (int localvar)
+microblaze_s_sbss (int ignore ATTRIBUTE_UNUSED)
{
#ifdef OBJ_ELF
- if (localvar == 0) /* bss. */
- obj_elf_change_section (".bss", SHT_NOBITS, SHF_ALLOC+SHF_WRITE,
- 0, 0, false);
- else if (localvar == 1)
- {
- /* sbss. */
- obj_elf_change_section (".sbss", SHT_NOBITS, SHF_ALLOC+SHF_WRITE,
- 0, 0, false);
- if (sbss_segment == 0)
- sbss_segment = subseg_new (".sbss", 0);
- }
+ obj_elf_change_section (".sbss", SHT_NOBITS, SHF_ALLOC+SHF_WRITE,
+ 0, 0, false);
+ if (sbss_segment == 0)
+ sbss_segment = subseg_new (".sbss", 0);
#else
s_data (ignore);
#endif
@@ -385,7 +357,6 @@ microblaze_s_weakext (int ignore ATTRIBUTE_UNUSED)
const pseudo_typeS md_pseudo_table[] =
{
{"lcomm", microblaze_s_lcomm, 1},
- {"data", microblaze_s_data, 0},
{"data8", cons, 1}, /* Same as byte. */
{"data16", cons, 2}, /* Same as hword. */
{"data32", cons, 4}, /* Same as word. */
@@ -396,9 +367,10 @@ const pseudo_typeS md_pseudo_table[] =
{"rodata", microblaze_s_rdata, 0},
{"sdata2", microblaze_s_rdata, 1},
{"sdata", microblaze_s_sdata, 0},
- {"bss", microblaze_s_bss, 0},
- {"sbss", microblaze_s_bss, 1},
- {"text", microblaze_s_text, 0},
+#ifndef OBJ_ELF
+ {"bss", s_data, 0},
+#endif
+ {"sbss", microblaze_s_sbss, 0},
{"word", cons, 4},
{"frame", s_ignore, 0},
{"mask", s_ignore, 0}, /* Emitted by gcc. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-05 7:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-05 7:10 [binutils-gdb] microblaze: drop/restrict override of .text, .data, and .bss Jan Beulich
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).