* 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.
This commit is contained in:
Richard Henderson 2001-09-11 18:26:04 +00:00
parent f94952df27
commit d61a78a7af
5 changed files with 58 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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; }