Pad only text sections at end by default

gas/
	* write.c (SUB_SEGMENT_ALIGN): Don't pad non-code sections at
	end to their alignment.
gas/testsuite/
	* gas/sparc/pcrel.d: Update for changed padding in data sections.
	* gas/sparc/pcrel64.d: Likewise.
ld/testsuite/
	* ld-sparc/gotop32.rd: Update for changed padding in data sections.
	* ld-sparc/gotop32.td: Likewise.
	* ld-sparc/gotop64.rd: Likewise.
	* ld-sparc/gotop64.td: Likewise.
	* ld-tilegx/external.s: Align .data.
	* ld-tilepro/external.s: Likewise.
This commit is contained in:
Alan Modra
2015-02-25 09:36:36 +10:30
parent f01f1741df
commit 9028d9432c
12 changed files with 56 additions and 39 deletions

View File

@ -1692,7 +1692,9 @@ set_symtab (void)
of the section. This allows proper nop-filling at the end of
code-bearing sections. */
#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) \
(!(FRCHAIN)->frch_next ? get_recorded_alignment (SEG) : 0)
(!(FRCHAIN)->frch_next && subseg_text_p (SEG) \
? get_recorded_alignment (SEG) \
: 0)
#else
#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 0
#endif