[binutils-gdb] gas/SH: respect --no-pad-sections

Jan Beulich jbeulich@sourceware.org
Fri Oct 10 14:05:33 GMT 2025


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

commit c0f8a4a25e5de8194ea6cfe49a84ef61bf426676
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Oct 10 16:00:44 2025 +0200

    gas/SH: respect --no-pad-sections
    
    This is once again just so the target won't need excluding in a
    forthcoming new testcase, which requires no padding at the end of at
    least some of the sections.

Diff:
---
 gas/config/tc-sh.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gas/config/tc-sh.h b/gas/config/tc-sh.h
index 1ed0f5e1088..b91d0e1fd52 100644
--- a/gas/config/tc-sh.h
+++ b/gas/config/tc-sh.h
@@ -138,7 +138,8 @@ extern void sh_frob_file (void);
 
 /* We align most sections to a 16 byte boundary.  */
 #define SUB_SEGMENT_ALIGN(SEG, FRCHAIN)			\
-  (startswith (SEG_NAME (SEG), ".stabstr")		\
+  ((startswith (SEG_NAME (SEG), ".stabstr")		\
+    || do_not_pad_sections_to_alignment)		\
    ? 0							\
    : ((startswith (SEG_NAME (SEG), ".stab")	\
        || strcmp (SEG_NAME (SEG), ".ctors") == 0	\


More information about the Binutils-cvs mailing list