aboutsummaryrefslogtreecommitdiff
path: root/gas/subsegs.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/subsegs.c')
-rw-r--r--gas/subsegs.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gas/subsegs.c b/gas/subsegs.c
index 70dda27..a8e4b4b 100644
--- a/gas/subsegs.c
+++ b/gas/subsegs.c
@@ -564,6 +564,21 @@ section_symbol (sec)
#endif /* BFD_ASSEMBLER */
+/* Return whether the specified segment is thought to hold text. */
+
+int
+subseg_text_p (sec)
+ segT sec;
+{
+#ifdef BFD_ASSEMBLER
+ return (bfd_get_section_flags (stdoutput, sec) & SEC_CODE) != 0;
+#else
+ return (sec != data_section
+ && sec != bss_section
+ && strcmp (segment_name (sec), ".eh_frame") != 0);
+#endif
+}
+
void
subsegs_print_statistics (file)
FILE *file;