aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-arm.h
diff options
context:
space:
mode:
authorRichard Earnshaw <Richard.Earnshaw@arm.com>2015-04-24 15:51:49 +0100
committerRichard Earnshaw <Richard.Earnshaw@arm.com>2015-04-24 15:54:39 +0100
commit7a5c933c7c2c3926b13a047c64f2af1d3ce8e1db (patch)
tree0b5f30e87f378b8034f88bb95e2f23cb9f9b989e /gas/config/tc-arm.h
parentde7669bfa507d78f7abfe3d219b5aee9f346235e (diff)
downloadgdb-7a5c933c7c2c3926b13a047c64f2af1d3ce8e1db.zip
gdb-7a5c933c7c2c3926b13a047c64f2af1d3ce8e1db.tar.gz
gdb-7a5c933c7c2c3926b13a047c64f2af1d3ce8e1db.tar.bz2
[ARM]: Don't tail-pad over-aligned functions to the alignment boundary.
2015-04/24 Richard Earnshaw <rearnsha@arm.com> gas/ * config/tc-arm.h (arm_min): New function. (SUB_SEGMENT_ALIGN): Define. gas/testsuite/ * gas/arm/align64.d: Delete trailing padding NOPs. ld/testsuite/ * ld-arm/armthumb-lib.d: Regenerate expected output. * ld-arm/armthumb-lib.d: Likewise. * ld-arm/armthumb-lib.sym: Likewise. * ld-arm/cortex-a8-fix-b-rel-arm.d: Likewise. * ld-arm/cortex-a8-fix-b-rel-thumb.d: Likewise. * ld-arm/cortex-a8-fix-b.d: Likewise. * ld-arm/cortex-a8-fix-bcc-rel-thumb.d: Likewise. * ld-arm/cortex-a8-fix-bcc.d: Likewise. * ld-arm/cortex-a8-fix-bl-rel-arm.d: Likewise. * ld-arm/cortex-a8-fix-bl-rel-plt.d: Likewise. * ld-arm/cortex-a8-fix-bl-rel-thumb.d: Likewise. * ld-arm/cortex-a8-fix-bl.d: Likewise. * ld-arm/cortex-a8-fix-blx-bcond.d: Likewise. * ld-arm/cortex-a8-fix-blx-rel-arm.d: Likewise. * ld-arm/cortex-a8-fix-blx-rel-thumb.d: Likewise. * ld-arm/cortex-a8-fix-blx.d: Likewise. * ld-arm/cortex-a8-fix-hdr.d: Likewise. * ld-arm/farcall-mixed-app-v5.d: Likewise. * ld-arm/farcall-mixed-app.d: Likewise. * ld-arm/farcall-mixed-lib-v4t.d: Likewise. * ld-arm/farcall-mixed-lib.d: Likewise. * ld-arm/mixed-app-v5.d: Likewise. * ld-arm/mixed-app.d: Likewise. * ld-arm/mixed-lib.d: Likewise.
Diffstat (limited to 'gas/config/tc-arm.h')
-rw-r--r--gas/config/tc-arm.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gas/config/tc-arm.h b/gas/config/tc-arm.h
index b604f04..2216267 100644
--- a/gas/config/tc-arm.h
+++ b/gas/config/tc-arm.h
@@ -236,10 +236,19 @@ struct arm_frag_type
#endif
};
+static inline int
+arm_min (int am_p1, int am_p2)
+{
+ return am_p1 < am_p2 ? am_p1 : am_p2;
+}
+
#define TC_FRAG_TYPE struct arm_frag_type
/* NOTE: max_chars is a local variable from frag_var / frag_variant. */
#define TC_FRAG_INIT(fragp) arm_init_frag (fragp, max_chars)
#define HANDLE_ALIGN(fragp) arm_handle_align (fragp)
+#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) \
+ ((!(FRCHAIN)->frch_next && subseg_text_p (SEG)) \
+ ? arm_min (2, get_recorded_alignment (SEG)) : 0)
#define md_do_align(N, FILL, LEN, MAX, LABEL) \
if (FILL == NULL && (N) != 0 && ! need_pass_2 && subseg_text_p (now_seg)) \