aboutsummaryrefslogtreecommitdiff
path: root/gas/config/obj-elf.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/obj-elf.c')
-rw-r--r--gas/config/obj-elf.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
index 6ca2433..315d08e 100644
--- a/gas/config/obj-elf.c
+++ b/gas/config/obj-elf.c
@@ -1163,6 +1163,15 @@ obj_elf_attach_to_group (int dummy ATTRIBUTE_UNUSED)
elf_set_group_name (now_seg, gname);
}
+/* Handle section related directives.
+
+ Note on support for SFrame sections: These are generally expected to be
+ generated by the assembler. However, this function permits their direct
+ creation by the user. At the moment though, we go no extra mile by adding
+ an explicit @sframe for SHT_GNU_SFRAME (using the numeric value of section
+ type should suffice); Nor do we implement any outright refusal for
+ non-supported targets via ELFOSABI-specific checks. */
+
void
obj_elf_section (int push)
{
@@ -1228,7 +1237,7 @@ obj_elf_section (int push)
if (push && ISDIGIT (*input_line_pointer))
{
/* .pushsection has an optional subsection. */
- new_subsection = (subsegT) get_absolute_expression ();
+ new_subsection = get_absolute_expression ();
SKIP_WHITESPACE ();
@@ -1459,7 +1468,7 @@ obj_elf_section (int push)
char *t = input_line_pointer;
match.sh_info = strtoul (input_line_pointer,
&input_line_pointer, 0);
- if (match.sh_info == (unsigned int) -1)
+ if (match.sh_info == -1u)
{
as_warn (_("unsupported mbind section info: %s"), t);
match.sh_info = 0;
@@ -1496,8 +1505,7 @@ obj_elf_section (int push)
errno = 0;
id = strtoul (input_line_pointer,
&input_line_pointer, 0);
- overflow = (id == (unsigned long) -1
- && errno == ERANGE);
+ overflow = id == -1ul && errno == ERANGE;
}
else
{
@@ -1506,7 +1514,7 @@ obj_elf_section (int push)
(const char **) &input_line_pointer, 0);
overflow = id == ~(bfd_vma) 0;
}
- if (overflow || id > (unsigned int) -1)
+ if (overflow || id > -1u)
{
char *linefeed, saved_char = 0;
if ((linefeed = strchr (t, '\n')) != NULL)