[binutils-gdb] Arm64: drop .bss override

Jan Beulich jbeulich@sourceware.org
Fri Jan 5 07:07:12 GMT 2024


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3e73bcf724ab685b3d4cca1da356791514163990

commit 3e73bcf724ab685b3d4cca1da356791514163990
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Jan 5 08:04:42 2024 +0100

    Arm64: drop .bss override
    
    The comment looks bogus (perhaps simply stale, perhaps wrongly copied
    from Arm in the first place), 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).
    
    As to the mapping state update - such also doesn't appear to be done
    for other section switching, so its original purpose was at best
    questionable as well.

Diff:
---
 gas/config/tc-aarch64.c | 13 +------------
 gas/doc/c-aarch64.texi  |  5 -----
 2 files changed, 1 insertion(+), 17 deletions(-)

diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 11707fd2ef8..cf586267ee8 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -1866,17 +1866,7 @@ mapping_state_2 (enum mstate state, int max_chars)
 #define mapping_state_2(x, y)	/* nothing */
 #endif
 
-/* 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 ();
-  mapping_state (MAP_DATA);
-}
+/* Directives: alignment.  */
 
 static void
 s_even (int ignore ATTRIBUTE_UNUSED)
@@ -2396,7 +2386,6 @@ const pseudo_typeS md_pseudo_table[] = {
   /* Never called because '.req' does not start a line.  */
   {"req", s_req, 0},
   {"unreq", s_unreq, 0},
-  {"bss", s_bss, 0},
   {"even", s_even, 0},
   {"ltorg", s_ltorg, 0},
   {"pool", s_ltorg, 0},
diff --git a/gas/doc/c-aarch64.texi b/gas/doc/c-aarch64.texi
index ef0f0bccba7..97233b5c0e5 100644
--- a/gas/doc/c-aarch64.texi
+++ b/gas/doc/c-aarch64.texi
@@ -394,11 +394,6 @@ extensions by the @option{-mcpu} command-line option.
 incrementally to the architecture being compiled for.
 
 @c BBBBBBBBBBBBBBBBBBBBBBBBBB
-
-@cindex @code{.bss} directive, AArch64
-@item .bss
-This directive switches to the @code{.bss} section.
-
 @c CCCCCCCCCCCCCCCCCCCCCCCCCC
 
 @cindex @code{.cpu} directive, AArch64


More information about the Binutils-cvs mailing list