aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gas/ChangeLog9
-rw-r--r--gas/config/tc-alpha.c28
-rw-r--r--gas/config/tc-alpha.h5
-rw-r--r--gas/config/tc-ia64.c14
-rw-r--r--gas/config/tc-ia64.h2
5 files changed, 58 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 2bc2628..3f0dab7 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,12 @@
+2001-09-11 Richard Henderson <rth@redhat.com>
+
+ * config/tc-alpha.c (alpha_elf_section_letter): New.
+ (alpha_elf_section_flags): New.
+ * config/tc-alpha.h (md_elf_section_letter): New.
+ (md_elf_section_flags): New.
+ * config/tc-ia64.c (ia64_elf_section_letter): New.
+ * config/tc-ia64.h (md_elf_section_letter): New.
+
2001-09-11 Jakub Jelinek <jakub@redhat.com>
* config/obj-elf.c (obj_elf_parse_section_letters): Use 'M' instead
diff --git a/gas/config/tc-alpha.c b/gas/config/tc-alpha.c
index 834186a..7a8c04c 100644
--- a/gas/config/tc-alpha.c
+++ b/gas/config/tc-alpha.c
@@ -5399,6 +5399,34 @@ select_gp_value ()
}
#endif /* OBJ_ECOFF */
+#ifdef OBJ_ELF
+/* Map 's' to SHF_ALPHA_GPREL. */
+
+int
+alpha_elf_section_letter (letter, ptr_msg)
+ int letter;
+ char **ptr_msg;
+{
+ if (letter == 's')
+ return SHF_ALPHA_GPREL;
+
+ *ptr_msg = _("Bad .section directive: want a,s,w,x,M,S in string");
+ return 0;
+}
+
+/* Map SHF_ALPHA_GPREL to SEC_SMALL_DATA. */
+
+flagword
+alpha_elf_section_flags (flags, attr, type)
+ flagword flags;
+ int attr, type ATTRIBUTE_UNUSED;
+{
+ if (attr & SHF_ALPHA_GPREL)
+ flags |= SEC_SMALL_DATA;
+ return flags;
+}
+#endif /* OBJ_ELF */
+
/* Called internally to handle all alignment needs. This takes care
of eliding calls to frag_align if'n the cached current alignment
says we've already got it, as well as taking care of the auto-align
diff --git a/gas/config/tc-alpha.h b/gas/config/tc-alpha.h
index 1eabfd0..b5121d2 100644
--- a/gas/config/tc-alpha.h
+++ b/gas/config/tc-alpha.h
@@ -108,6 +108,11 @@ extern void alpha_frob_file_before_adjust PARAMS ((void));
#define ELF_TC_SPECIAL_SECTIONS \
{ ".sdata", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL }, \
{ ".sbss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
+
+#define md_elf_section_letter alpha_elf_section_letter
+extern int alpha_elf_section_letter PARAMS ((int, char **));
+#define md_elf_section_flags alpha_elf_section_flags
+extern flagword alpha_elf_section_flags PARAMS ((flagword, int, int));
#endif
/* Whether to add support for explict !relocation_op!sequence_number. At the
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index d811aa9..c7b0ec9 100644
--- a/gas/config/tc-ia64.c
+++ b/gas/config/tc-ia64.c
@@ -916,6 +916,20 @@ set_section (name)
input_line_pointer = saved_input_line_pointer;
}
+/* Map 's' to SHF_IA_64_SHORT. */
+
+int
+ia64_elf_section_letter (letter, ptr_msg)
+ int letter;
+ char **ptr_msg;
+{
+ if (letter == 's')
+ return SHF_IA_64_SHORT;
+
+ *ptr_msg = _("Bad .section directive: want a,s,w,x,M,S in string");
+ return 0;
+}
+
/* Map SHF_IA_64_SHORT to SEC_SMALL_DATA. */
flagword
diff --git a/gas/config/tc-ia64.h b/gas/config/tc-ia64.h
index eaeca1c..d87b205 100644
--- a/gas/config/tc-ia64.h
+++ b/gas/config/tc-ia64.h
@@ -81,6 +81,7 @@ extern void ia64_cons_fix_new PARAMS ((fragS *f, int where, int nbytes,
expressionS *exp));
extern void ia64_validate_fix PARAMS ((struct fix *fix));
extern char * ia64_canonicalize_symbol_name PARAMS ((char *));
+extern int ia64_elf_section_letter PARAMS ((int, char **));
extern flagword ia64_elf_section_flags PARAMS ((flagword, int, int));
extern int ia64_elf_section_type PARAMS ((const char *, size_t len));
extern long ia64_pcrel_from_section PARAMS ((struct fix *fix, segT sec));
@@ -104,6 +105,7 @@ extern void ia64_handle_align PARAMS ((fragS *f));
as_fatal ("ia64_create_short_jump")
#define md_estimate_size_before_relax(f,s) \
(as_fatal ("ia64_estimate_size_before_relax"), 1)
+#define md_elf_section_letter ia64_elf_section_letter
#define md_elf_section_flags ia64_elf_section_flags
#define TC_FIX_TYPE struct ia64_fix
#define TC_INIT_FIX_DATA(f) { f->tc_fix_data.opnd = 0; }