aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1998-06-22 23:53:10 +0000
committerIan Lance Taylor <ian@airs.com>1998-06-22 23:53:10 +0000
commitaa3c8d2d37511fa6c1ea1958bb724a3c4550086a (patch)
tree683e51d02d4064e19b70c56a6650fa11d8b99e54 /gas
parent59bbaa1950af91de0a6ce6127d1622cd9211daa8 (diff)
downloadgdb-aa3c8d2d37511fa6c1ea1958bb724a3c4550086a.zip
gdb-aa3c8d2d37511fa6c1ea1958bb724a3c4550086a.tar.gz
gdb-aa3c8d2d37511fa6c1ea1958bb724a3c4550086a.tar.bz2
* config/obj-coff.c (c_symbol_merge): Fix copying of auxiliary
information.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/obj-coff.c35
2 files changed, 21 insertions, 19 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 2d3449f..6a70a89 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+Mon Jun 22 19:52:42 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (c_symbol_merge): Fix copying of auxiliary
+ information.
+
start-sanitize-am33
Mon Jun 22 13:45:19 1998 Jeffrey A Law (law@cygnus.com)
diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c
index 5940fbd..5b5a229 100644
--- a/gas/config/obj-coff.c
+++ b/gas/config/obj-coff.c
@@ -270,21 +270,17 @@ c_symbol_merge (debug, normal)
S_SET_STORAGE_CLASS (normal, S_GET_STORAGE_CLASS (debug));
if (S_GET_NUMBER_AUXILIARY (debug) > S_GET_NUMBER_AUXILIARY (normal))
- /* take the most we have */
- S_SET_NUMBER_AUXILIARY (normal, S_GET_NUMBER_AUXILIARY (debug));
+ {
+ /* take the most we have */
+ S_SET_NUMBER_AUXILIARY (normal, S_GET_NUMBER_AUXILIARY (debug));
+ }
if (S_GET_NUMBER_AUXILIARY (debug) > 0)
{
/* Move all the auxiliary information. */
- /* @@ How many fields do we want to preserve? Would it make more
- sense to pick and choose those we want to copy? Should look
- into this further.... [raeburn:19920512.2209EST] */
- alent *linenos;
- linenos = coffsymbol (normal->bsym)->lineno;
- memcpy ((char *) &coffsymbol (normal->bsym)->native,
- (char *) &coffsymbol (debug->bsym)->native,
- S_GET_NUMBER_AUXILIARY(debug) * AUXESZ);
- coffsymbol (normal->bsym)->lineno = linenos;
+ memcpy (coffsymbol (normal->bsym)->native + 1,
+ coffsymbol (debug->bsym)->native + 1,
+ S_GET_NUMBER_AUXILIARY (debug) * sizeof (combined_entry_type));
}
/* Move the debug flags. */
@@ -344,21 +340,20 @@ void
coff_obj_symbol_new_hook (symbolP)
symbolS *symbolP;
{
- char underscore = 0; /* Symbol has leading _ */
+ long sz = (OBJ_COFF_MAX_AUXENTRIES + 1) * sizeof (combined_entry_type);
+ char * s = (char *) xmalloc (sz);
+
+ memset (s, 0, sz);
+ coffsymbol (symbolP->bsym)->native = (combined_entry_type *) s;
- {
- long sz = (OBJ_COFF_MAX_AUXENTRIES + 1) * sizeof (combined_entry_type);
- char *s = (char *) xmalloc (sz);
- memset (s, 0, sz);
- coffsymbol (symbolP->bsym)->native = (combined_entry_type *) s;
- }
S_SET_DATA_TYPE (symbolP, T_NULL);
S_SET_STORAGE_CLASS (symbolP, 0);
S_SET_NUMBER_AUXILIARY (symbolP, 0);
if (S_IS_STRING (symbolP))
SF_SET_STRING (symbolP);
- if (!underscore && S_IS_LOCAL (symbolP))
+
+ if (S_IS_LOCAL (symbolP))
SF_SET_LOCAL (symbolP);
}
@@ -514,6 +509,7 @@ obj_coff_endef (ignore)
int ignore;
{
symbolS *symbolP;
+
/* DIM BUG FIX sac@cygnus.com */
dim_index = 0;
if (def_symbol_in_progress == NULL)
@@ -586,6 +582,7 @@ obj_coff_endef (ignore)
/* Valid but set somewhere else (s_comm, s_lcomm, colon) */
break;
+ default:
case C_USTATIC:
case C_EXTDEF:
case C_ULABEL: