aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2024-01-05 08:07:58 +0100
committerJan Beulich <jbeulich@suse.com>2024-01-05 08:07:58 +0100
commita2f964a61723482efdbef0612cb48cb27387a230 (patch)
tree5df2128ddd3e6d428ec7296f539e6620ac9069aa /gas
parenta998254496d64940c4464606e95cdb952fe67fea (diff)
downloadfsf-binutils-gdb-a2f964a61723482efdbef0612cb48cb27387a230.zip
fsf-binutils-gdb-a2f964a61723482efdbef0612cb48cb27387a230.tar.gz
fsf-binutils-gdb-a2f964a61723482efdbef0612cb48cb27387a230.tar.bz2
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.
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-microblaze.c46
1 files changed, 9 insertions, 37 deletions
diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c
index 6a002a2..c971d18 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. */