aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorStan Cox <scox@redhat.com>2002-08-17 15:09:29 +0000
committerStan Cox <scox@redhat.com>2002-08-17 15:09:29 +0000
commitcca86cc8d6e749bf054aaf3354322f6429be13d3 (patch)
treec5c65ad5c75d2c45a32275937077e98df2ae7b10 /gas
parentb4671f856bd5aa0846faf528493fae41a8127d01 (diff)
downloadgdb-cca86cc8d6e749bf054aaf3354322f6429be13d3.zip
gdb-cca86cc8d6e749bf054aaf3354322f6429be13d3.tar.gz
gdb-cca86cc8d6e749bf054aaf3354322f6429be13d3.tar.bz2
* config/obj-elf.c (obj_elf_change_section): Make non-static.
config/tc-mips.c (s_change_section): New function to support IRIX .section pseudo-op.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/obj-elf.c4
-rw-r--r--gas/config/tc-mips.c57
3 files changed, 65 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 1b92555..c865ccd 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2002-08-17 Stan Cox <scox@redhat.com>
+
+ * config/obj-elf.c (obj_elf_change_section): Make non-static.
+ config/tc-mips.c (s_change_section): New function to support
+ IRIX .section pseudo-op.
+
2002-08-16 Nick Clifton <nickc@redhat.com>
* config/tc-v850.c (md_assemble): Fix assembling of "callt 0x3f".
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
index 2266952..375dcff 100644
--- a/gas/config/obj-elf.c
+++ b/gas/config/obj-elf.c
@@ -77,7 +77,7 @@ static void obj_elf_ident PARAMS ((int));
static void obj_elf_weak PARAMS ((int));
static void obj_elf_local PARAMS ((int));
static void obj_elf_visibility PARAMS ((int));
-static void obj_elf_change_section
+void obj_elf_change_section
PARAMS ((const char *, int, int, int, const char *, int, int));
static int obj_elf_parse_section_letters PARAMS ((char *, size_t));
static int obj_elf_section_word PARAMS ((char *, size_t));
@@ -664,7 +664,7 @@ static struct special_section const special_sections[] =
{ NULL, 0, 0 }
};
-static void
+void
obj_elf_change_section (name, type, attr, entsize, group_name, linkonce, push)
const char *name;
int type;
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index c548dde..771869c 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -744,6 +744,7 @@ static symbolS *get_symbol PARAMS ((void));
static void mips_align PARAMS ((int to, int fill, symbolS *label));
static void s_align PARAMS ((int));
static void s_change_sec PARAMS ((int));
+static void s_change_section PARAMS ((int));
static void s_cons PARAMS ((int));
static void s_float_cons PARAMS ((int));
static void s_mips_globl PARAMS ((int));
@@ -883,6 +884,7 @@ static const pseudo_typeS mips_pseudo_table[] =
{"long", s_cons, 2},
{"octa", s_cons, 4},
{"quad", s_cons, 3},
+ {"section", s_change_section, 0},
{"short", s_cons, 1},
{"single", s_float_cons, 'f'},
{"stabn", s_mips_stab, 'n'},
@@ -11247,6 +11249,61 @@ s_change_sec (sec)
auto_align = 1;
}
+
+void
+s_change_section (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ expressionS rep_exp;
+
+ char *section_name;
+ char c;
+ char *next_c;
+ char *p;
+ int section_type;
+ int section_flag;
+ int section_entry_size;
+ int section_alignment;
+ int log = -1;
+ flagword flags;
+
+ section_name = input_line_pointer;
+ c = get_symbol_end ();
+ next_c = input_line_pointer + 1;
+ /* just after name is now '\0' */
+ p = input_line_pointer;
+
+ /* Do we have .section Name<,"flags"> */
+ if (c == '\n' || (c == ',' && *next_c == '"') || c == '"')
+ {
+ *p = c;
+ input_line_pointer = section_name;
+ obj_elf_section (ignore);
+ return;
+ }
+ input_line_pointer++;
+
+ /* Do we have .section Name<,type><,flag><,entry_size><,alignment> */
+ if (c == ',')
+ section_type = get_absolute_expression ();
+ else
+ section_type = 0;
+ if (*input_line_pointer++ == ',')
+ section_flag = get_absolute_expression ();
+ else
+ section_flag = 0;
+ if (*input_line_pointer++ == ',')
+ section_entry_size = get_absolute_expression ();
+ else
+ section_entry_size = 0;
+ if (*input_line_pointer++ == ',')
+ section_alignment = get_absolute_expression ();
+ else
+ section_alignment = 0;
+
+ obj_elf_change_section (section_name, section_type, section_flag,
+ section_entry_size, 0, 0, 0);
+}
void
mips_enable_auto_align ()