[01/22] Arm: drop .bss override

Message ID b6dfdd98-ddb9-4008-9858-bdf90b1b3cd5@suse.com
State Committed
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

Commit Message

Jan Beulich Dec. 15, 2023, 12:06 p.m. UTC
  The comment looks bogus (perhaps simply stale), and there are also no
other precautions against subsections being used on ELF with .bss. It
also doesn't look to be a good idea to override the custom handlers that
ELF and COFF have (afaict doing so further broke .previous on ELF).
  

Patch

--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -3347,20 +3347,7 @@  s_syntax (int unused ATTRIBUTE_UNUSED)
   demand_empty_rest_of_line ();
 }
 
-/* Directives: sectioning and alignment.  */
-
-static void
-s_bss (int ignore ATTRIBUTE_UNUSED)
-{
-  /* We don't support putting frags in the BSS segment, we fake it by
-     marking in_bss, then looking at s_skip for clues.	*/
-  subseg_set (bss_section, 0);
-  demand_empty_rest_of_line ();
-
-#ifdef md_elf_section_change_hook
-  md_elf_section_change_hook ();
-#endif
-}
+/* Directives: alignment.  */
 
 static void
 s_even (int ignore ATTRIBUTE_UNUSED)
@@ -5187,7 +5174,6 @@  const pseudo_typeS md_pseudo_table[] =
   { "dn",	   s_dn,          0 },
   { "qn",          s_qn,          0 },
   { "unreq",	   s_unreq,	  0 },
-  { "bss",	   s_bss,	  0 },
   { "align",	   s_align_ptwo,  2 },
   { "arm",	   s_arm,	  0 },
   { "thumb",	   s_thumb,	  0 },
--- a/gas/doc/c-arm.texi
+++ b/gas/doc/c-arm.texi
@@ -870,11 +870,6 @@  incrementally to the architecture being
 This performs the same action as @var{.code 32}.
 
 @c BBBBBBBBBBBBBBBBBBBBBBBBBB
-
-@cindex @code{.bss} directive, ARM
-@item .bss
-This directive switches to the @code{.bss} section.
-
 @c CCCCCCCCCCCCCCCCCCCCCCCCCC
 
 @cindex @code{.cantunwind} directive, ARM