[binutils-gdb] Re: gas .align limit

Alan Modra amodra@sourceware.org
Thu May 22 22:57:13 GMT 2025


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

commit 0c951ab895a5b3977dad6718e6571774db1237c6
Author: Alan Modra <amodra@gmail.com>
Date:   Mon May 19 00:32:22 2025 +0930

    Re: gas .align limit
    
    Now that rs_align_code has been corrected for all targets, put the
    .align limit back to bits_per_address-1.  Also fix a comment.
    
            * frags.h (fr_var): Correct comment.
            * read.c (TC_ALIGN_LIMIT): Revert commit ff4c03516c change.

Diff:
---
 gas/frags.h | 3 +--
 gas/read.c  | 7 +------
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/gas/frags.h b/gas/frags.h
index 695277d7871..c2fea09a8f6 100644
--- a/gas/frags.h
+++ b/gas/frags.h
@@ -44,8 +44,7 @@ struct frag {
 
   /* (Fixed) number of octets we know we have.  May be 0.  */
   valueT fr_fix;
-  /* May be used for (Variable) number of octets after above.
-     The generic frag handling code no longer makes any use of fr_var.  */
+  /* May be used for (Variable) number of octets after above.  */
   offsetT fr_var;
   /* For variable-length tail.  */
   offsetT fr_offset;
diff --git a/gas/read.c b/gas/read.c
index eaa1300ff96..de26d4b6460 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -1514,12 +1514,7 @@ s_abort (int ignore ATTRIBUTE_UNUSED)
 }
 
 #ifndef TC_ALIGN_LIMIT
-/* Limit alignment in code to 1G, to limit the amount of memory used
-   by rs_code_align frags.  */
-#define TC_ALIGN_LIMIT \
-  ((subseg_text_p (now_seg)				\
-    && stdoutput->arch_info->bits_per_address >= 32)	\
-   ? 30 : stdoutput->arch_info->bits_per_address - 1)
+#define TC_ALIGN_LIMIT (stdoutput->arch_info->bits_per_address - 1)
 #endif
 
 /* Handle the .align pseudo-op.  A positive ARG is a default alignment


More information about the Binutils-cvs mailing list