aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJames Lemke <jlemke@cygnus>1998-01-27 03:34:26 +0000
committerJames Lemke <jlemke@cygnus>1998-01-27 03:34:26 +0000
commit5fcbec8f9c632ed3c04e7967d0624b3cba384c0a (patch)
tree451c38346a364a988602d9f2f589de87af445fea /gas
parent5340383e6978cdbf79e4c2f6944f333421c74ad3 (diff)
downloadgdb-5fcbec8f9c632ed3c04e7967d0624b3cba384c0a.zip
gdb-5fcbec8f9c632ed3c04e7967d0624b3cba384c0a.tar.gz
gdb-5fcbec8f9c632ed3c04e7967d0624b3cba384c0a.tar.bz2
Fix to s_dmadata(), .EndDmaData was causing a trap.
Diffstat (limited to 'gas')
-rw-r--r--gas/config/tc-txvu.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/gas/config/tc-txvu.c b/gas/config/tc-txvu.c
index c3e5b43..de38477 100644
--- a/gas/config/tc-txvu.c
+++ b/gas/config/tc-txvu.c
@@ -910,8 +910,9 @@ s_dmadata( type)
int type;
{
static short state = 0;
- struct symbol *label; /* Points to symbol */
- char *name, *name2; /* points to name of first / final symbol */
+ static symbolS *label; /* Points to symbol */
+ char *name;
+ const char *prevName;
int temp;
switch( type) {
@@ -962,14 +963,14 @@ s_dmadata( type)
*"label" points to beginning of block
* Create a name for the final label like _$<name>
*/
- name = label->bsym->name;
- temp = strlen( name) + 1;
- name2 = malloc( temp + 2);
- name2[ 0] = '_';
- name2[ 1] = '$';
- memcpy( name2+2, name, temp); /* copy original name & \0 */
- colon( name2);
- free( name2);
+ prevName = label->bsym->name;
+ temp = strlen( prevName) + 1;
+ name = malloc( temp + 2);
+ name[ 0] = '_';
+ name[ 1] = '$';
+ memcpy( name+2, prevName, temp); /* copy original name & \0 */
+ colon( name);
+ free( name);
break;
default: