[12/22] score: drop .bss override

Message ID e2c36446-1570-450f-ba00-518ef0c7a930@suse.com
State New
Headers
Series ELF: correct handling of simplified section directives |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_binutils_check--master-arm success Testing passed

Commit Message

Jan Beulich Dec. 15, 2023, 12:14 p.m. UTC
  The comment looks bogus (perhaps simply stale, or wrongly copied from
another target). It also doesn't look to be a good idea to override the
custom handler that ELF has (afaict doing so broke .previous as well as
sub-section specification).

While there also fold the identical handlers for .text (there likely is
more room for such folding).
  

Patch

--- a/gas/config/tc-score.c
+++ b/gas/config/tc-score.c
@@ -24,8 +24,6 @@ 
 
 #include "tc-score7.c"
 
-static void s3_s_score_bss (int ignore ATTRIBUTE_UNUSED);
-static void s3_s_score_text (int ignore);
 static void s3_score_s_section (int ignore);
 static void s3_s_change_sec (int sec);
 static void s3_s_score_mask (int reg_type ATTRIBUTE_UNUSED);
@@ -39,7 +37,6 @@  static void s3_s_score_gpword (int ignor
 static void s3_s_score_cpadd (int ignore ATTRIBUTE_UNUSED);
 static void s3_s_score_lcomm (int bytes_p);
 
-static void s_score_bss (int ignore ATTRIBUTE_UNUSED);
 static void s_score_text (int ignore);
 static void s_section (int ignore);
 static void s_change_sec (int sec);
@@ -196,7 +193,6 @@  symbolS *GOT_symbol;
 
 const pseudo_typeS md_pseudo_table[] =
 {
-  {"bss", s_score_bss, 0},
   {"text", s_score_text, 0},
   {"word", cons, 4},
   {"long", cons, 4},
@@ -5532,22 +5528,6 @@  s3_do_dsp3 (char *str)
     s3_inst.relax_inst = 0x8000;
 }
 
-
-/* If we change section we must dump the literal pool first.  */
-static void
-s3_s_score_bss (int ignore ATTRIBUTE_UNUSED)
-{
-  subseg_set (bss_section, (subsegT) get_absolute_expression ());
-  demand_empty_rest_of_line ();
-}
-
-static void
-s3_s_score_text (int ignore)
-{
-  obj_elf_text (ignore);
-  record_alignment (now_seg, 2);
-}
-
 static void
 s3_score_s_section (int ignore)
 {
@@ -6324,21 +6304,10 @@  s3_build_dependency_insn_hsh (void)
 }
 
 static void
-s_score_bss (int ignore ATTRIBUTE_UNUSED)
-{
-  if (score3)
-    return s3_s_score_bss (ignore);
-  else
-    return s7_s_score_bss (ignore);
-}
-
-static void
 s_score_text (int ignore)
 {
-  if (score3)
-    return s3_s_score_text (ignore);
-  else
-    return s7_s_score_text (ignore);
+  obj_elf_text (ignore);
+  record_alignment (now_seg, 2);
 }
 
 static void
--- a/gas/config/tc-score7.c
+++ b/gas/config/tc-score7.c
@@ -5367,21 +5367,6 @@  s7_build_reg_hsh (struct s7_reg_map *map
 
 
 
-/* If we change section we must dump the literal pool first.  */
-static void
-s7_s_score_bss (int ignore ATTRIBUTE_UNUSED)
-{
-  subseg_set (bss_section, (subsegT) get_absolute_expression ());
-  demand_empty_rest_of_line ();
-}
-
-static void
-s7_s_score_text (int ignore)
-{
-  obj_elf_text (ignore);
-  record_alignment (now_seg, 2);
-}
-
 static void
 s7_s_section (int ignore)
 {