aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-09-12 02:49:28 +0000
committerIan Lance Taylor <ian@airs.com>1999-09-12 02:49:28 +0000
commit23dab925ad8856522f11b1aaca29a1b0c5e41034 (patch)
tree7d9c495692f21c53c8e0cb74673c703092a8670d
parent28428223eb4e69d95528a6ce78cf47fc001a2137 (diff)
downloadgdb-23dab925ad8856522f11b1aaca29a1b0c5e41034.zip
gdb-23dab925ad8856522f11b1aaca29a1b0c5e41034.tar.gz
gdb-23dab925ad8856522f11b1aaca29a1b0c5e41034.tar.bz2
1999-09-11 Donn Terry <donn@interix.com>
* config/obj-coff.c (obj_coff_endef) [BFD_ASSEMBLER]: Handle .ef C_FCN symbol differently if TE_PE. (obj_coff_line) [BFD_ASSEMBLER]: Always use the line number which appears in the pseudo-op, rather coff_line_base which is only set for a .bf symbol.
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/obj-coff.c36
2 files changed, 32 insertions, 10 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 29ba1db..a2515b3 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -5,6 +5,12 @@
1999-09-11 Donn Terry <donn@interix.com>
+ * config/obj-coff.c (obj_coff_endef) [BFD_ASSEMBLER]: Handle .ef
+ C_FCN symbol differently if TE_PE.
+ (obj_coff_line) [BFD_ASSEMBLER]: Always use the line number which
+ appears in the pseudo-op, rather coff_line_base which is only set
+ for a .bf symbol.
+
* config/obj-coff.c (obj_coff_loc): New static function.
(obj_pseudo_table): Add "loc".
diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c
index b488cdf..6be9133 100644
--- a/gas/config/obj-coff.c
+++ b/gas/config/obj-coff.c
@@ -659,14 +659,30 @@ obj_coff_endef (ignore)
S_SET_SEGMENT (def_symbol_in_progress, text_section);
name = S_GET_NAME (def_symbol_in_progress);
- if (name[1] == 'b' && name[2] == 'f')
- {
- if (! in_function ())
- as_warn (_("`%s' symbol without preceding function"), name);
-/* SA_SET_SYM_LNNO (def_symbol_in_progress, 12345);*/
- /* Will need relocating */
- SF_SET_PROCESS (def_symbol_in_progress);
- clear_function ();
+ if (name[0] == '.' && name[2] == 'f' && name[3] == '\0')
+ {
+ switch (name[1])
+ {
+ case 'b':
+ /* .bf */
+ if (! in_function ())
+ as_warn (_("`%s' symbol without preceding function"), name);
+ /* Will need relocating. */
+ SF_SET_PROCESS (def_symbol_in_progress);
+ clear_function ();
+ break;
+#ifdef TE_PE
+ case 'e':
+ /* .ef */
+ /* The MS compilers output the actual endline, not the
+ function-relative one... we want to match without
+ changing the assembler input. */
+ SA_SET_SYM_LNNO (def_symbol_in_progress,
+ (SA_GET_SYM_LNNO (def_symbol_in_progress)
+ + coff_line_base));
+ break;
+#endif
+ }
}
}
break;
@@ -856,7 +872,7 @@ obj_coff_line (ignore)
coff_line_base = this_base;
S_SET_NUMBER_AUXILIARY (def_symbol_in_progress, 1);
- SA_SET_SYM_LNNO (def_symbol_in_progress, coff_line_base);
+ SA_SET_SYM_LNNO (def_symbol_in_progress, this_base);
demand_empty_rest_of_line ();
@@ -866,7 +882,7 @@ obj_coff_line (ignore)
extern int listing;
if (listing)
- listing_source_line ((unsigned int) coff_line_base);
+ listing_source_line ((unsigned int) this_base);
}
#endif
}