summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1998-02-15 21:08:32 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1998-02-15 21:08:32 +0000
commitc0bf900609653b10d261450fb6e03882a0019fef (patch)
treec70dcdfa76e8d53305145fc916c2b8160529ef65 /gnu
parent62c7a7d35258cb8cdf9e2049cda1db01bf585423 (diff)
date: 1998/01/10 05:36:35; author: jdp; state: Exp; lines: +2 -1
Make the ".set" directive copy the aux field when the expression reduces to a relocatable symbol plus an offset. This preserves the symbol type information (function vs. object). It is important for SVR4-style weak symbols, e.g., "#pragma weak foo=bar". Without this change, the linker complains that the jmpslot entry is not a function.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/gas/read.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gnu/usr.bin/gas/read.c b/gnu/usr.bin/gas/read.c
index 82d2f8a9e9b..a5ee2f6a49a 100644
--- a/gnu/usr.bin/gas/read.c
+++ b/gnu/usr.bin/gas/read.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: read.c,v 1.5 1998/02/15 18:48:58 niklas Exp $ */
+/* $OpenBSD: read.c,v 1.6 1998/02/15 21:08:31 niklas Exp $ */
/* read.c - read a source file -
@@ -21,7 +21,7 @@
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef lint
-static char rcsid[] = "$OpenBSD: read.c,v 1.5 1998/02/15 18:48:58 niklas Exp $";
+static char rcsid[] = "$OpenBSD: read.c,v 1.6 1998/02/15 21:08:31 niklas Exp $";
#endif
#define MASK_CHAR (0xFF) /* If your chars aren't 8 bits, you will
@@ -1459,6 +1459,7 @@ symbolS * symbolP;
S_SET_VALUE(symbolP, exp.X_add_number + S_GET_VALUE(exp.X_add_symbol));
symbolP->sy_frag = exp.X_add_symbol->sy_frag;
+ symbolP->sy_aux = exp.X_add_symbol->sy_aux;
break;
case SEG_PASS1: /* Not an error. Just try another pass. */