diff options
author | Ian Lance Taylor <ian@airs.com> | 1999-06-22 19:04:42 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1999-06-22 19:04:42 +0000 |
commit | be2acf275637e78bd900b7cce39af180f5c53cd3 (patch) | |
tree | beede8329310c9c89e82f5134954e8f2b7da5797 /gas/subsegs.c | |
parent | 7dcc9865504dca99a950c4d11d54c3a3a5f0b8c9 (diff) | |
download | gdb-be2acf275637e78bd900b7cce39af180f5c53cd3.zip gdb-be2acf275637e78bd900b7cce39af180f5c53cd3.tar.gz gdb-be2acf275637e78bd900b7cce39af180f5c53cd3.tar.bz2 |
* subsegs.c (subseg_text_p): Rewrite non BFD_ASSEMBLER case to use
a list of names, to try obj_segment_name, and to try abbreviated
names when using COFF without long section names.
Diffstat (limited to 'gas/subsegs.c')
-rw-r--r-- | gas/subsegs.c | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/gas/subsegs.c b/gas/subsegs.c index a8e4b4b..f0efed1 100644 --- a/gas/subsegs.c +++ b/gas/subsegs.c @@ -566,17 +566,47 @@ section_symbol (sec) /* Return whether the specified segment is thought to hold text. */ +#ifndef BFD_ASSEMBLER +const char * const nontext_section_names[] = +{ + ".eh_frame", + ".gcc_except_table", +#ifdef OBJ_COFF +#ifndef COFF_LONG_SECTION_NAMES + ".eh_fram", + ".gcc_exc", +#endif +#endif + NULL +}; +#endif /* ! BFD_ASSEMBLER */ + 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); +#else /* ! BFD_ASSEMBLER */ + const char * const *p; + + if (sec == data_section || sec == bss_section) + return false; + + for (p = nontext_section_names; *p != NULL; ++p) + { + if (strcmp (segment_name (sec), *p) == 0) + return false; + +#ifdef obj_segment_name + if (strcmp (obj_segment_name (sec), *p) == 0) + return false; #endif + } + + return true; + +#endif /* ! BFD_ASSEMBLER */ } void |