+Thu Mar 13 11:20:51 1997 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-elf.c (obj_elf_data): Call md_flush_pending_output
+ and md_elf_section_change_hook if they are defined.
+ (obj_elf_text, obj_elf_previous): Likewise.
+
Wed Mar 12 11:40:20 1997 Ian Lance Taylor <ian@cygnus.com>
+ * config/obj-multi.h (struct elf_obj_sy): Define if
+ OBJ_MAYBE_ELF.
+ (OBJ_SYMFIELD_TYPE): Define as struct elf_obj_sy if
+ OBJ_MAYBE_ELF.
+ * config/obj-elf.h (struct elf_obj_sy): Don't define if
+ OBJ_SYMFIELD_TYPE is defined.
+
* doc/as.texinfo (bss): Improve description of .bss section. In
ELF or COFF, you are permitted to switch into the section.
(Comm): Rewrite description of common symbols.
obj_elf_data (i)
int i;
{
+#ifdef md_flush_pending_output
+ md_flush_pending_output ();
+#endif
+
previous_section = now_seg;
previous_subsection = now_subseg;
s_data (i);
+
+#ifdef md_elf_section_change_hook
+ md_elf_section_change_hook ();
+#endif
}
/* Change to the .text section. */
obj_elf_text (i)
int i;
{
+#ifdef md_flush_pending_output
+ md_flush_pending_output ();
+#endif
+
previous_section = now_seg;
previous_subsection = now_subseg;
s_text (i);
+
+#ifdef md_elf_section_change_hook
+ md_elf_section_change_hook ();
+#endif
}
void
as_bad (".previous without corresponding .section; ignored");
return;
}
+
+#ifdef md_flush_pending_output
+ md_flush_pending_output ();
+#endif
+
subseg_set (previous_section, previous_subsection);
previous_section = 0;
+
+#ifdef md_elf_section_change_hook
+ md_elf_section_change_hook ();
+#endif
}
static void
sym = symbol_find_or_make (name);
*input_line_pointer = c;
+
+ if (sym->sy_obj.versioned_name != NULL)
+ {
+ as_bad ("multiple .symver directives for symbol `%s'",
+ S_GET_NAME (sym));
+ ignore_rest_of_line ();
+ return;
+ }
+
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
*input_line_pointer = c;
+ if (strchr (sym->sy_obj.versioned_name, ELF_VER_CHR) == NULL)
+ {
+ as_bad ("missing version name in `%s' for symbol `%s'",
+ sym->sy_obj.versioned_name, S_GET_NAME (sym));
+ ignore_rest_of_line ();
+ return;
+ }
+
demand_empty_rest_of_line ();
}
approach. */
if (! S_IS_DEFINED (symp))
- S_SET_NAME (symp, symp->sy_obj.versioned_name);
+ {
+ char *p;
+
+ /* Verify that the name isn't using the @@ syntax--this is
+ reserved for definitions of the default version to link
+ against. */
+ p = strchr (symp->sy_obj.versioned_name, ELF_VER_CHR);
+ know (p != NULL);
+ if (p[1] == ELF_VER_CHR)
+ {
+ as_bad ("invalid attempt to declare external version name as default in symbol `%s'",
+ symp->sy_obj.versioned_name);
+ *puntp = true;
+ }
+ S_SET_NAME (symp, symp->sy_obj.versioned_name);
+ }
else
{
symbolS *symp2;