diff options
author | Ian Lance Taylor <ian@airs.com> | 1997-03-13 16:21:34 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1997-03-13 16:21:34 +0000 |
commit | 2e9974a4504db68072a7b373bbb3d13ea574505a (patch) | |
tree | 2f5124433378e60f8def366aff89b73920f2b69f /gas/config | |
parent | fd435e9f097f97e9fd078730a24c7b0096d580d0 (diff) | |
download | gdb-2e9974a4504db68072a7b373bbb3d13ea574505a.zip gdb-2e9974a4504db68072a7b373bbb3d13ea574505a.tar.gz gdb-2e9974a4504db68072a7b373bbb3d13ea574505a.tar.bz2 |
* 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.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/obj-elf.c | 59 |
1 files changed, 58 insertions, 1 deletions
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index 38a909a..6f13bb6 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -806,9 +806,17 @@ static void 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. */ @@ -817,9 +825,17 @@ static void 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 @@ -831,8 +847,17 @@ obj_elf_previous (ignore) 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 @@ -865,6 +890,15 @@ obj_elf_symver (ignore) 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 != ',') { @@ -887,6 +921,14 @@ obj_elf_symver (ignore) *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 (); } @@ -1255,7 +1297,22 @@ elf_frob_symbol (symp, puntp) 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; |