summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1998-01-10 05:36:35 +0000
committerjdp <jdp@FreeBSD.org>1998-01-10 05:36:35 +0000
commitebe9c8eb7f01b66ce8c9fbe401aa6cea31bafcf9 (patch)
tree236bff81feab91b7c3f93d4ceaa803af10ed9565 /gnu
parent4881b1e50e753c1a77be50bfe7fd88fff0da4e61 (diff)
downloadFreeBSD-src-ebe9c8eb7f01b66ce8c9fbe401aa6cea31bafcf9.zip
FreeBSD-src-ebe9c8eb7f01b66ce8c9fbe401aa6cea31bafcf9.tar.gz
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/as/read.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/usr.bin/as/read.c b/gnu/usr.bin/as/read.c
index 59beec3..9e8db59 100644
--- a/gnu/usr.bin/as/read.c
+++ b/gnu/usr.bin/as/read.c
@@ -19,7 +19,7 @@
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef lint
-static char rcsid[] = "$Id: read.c,v 1.10 1997/03/29 02:16:44 jdp Exp $";
+static char rcsid[] = "$Id: read.c,v 1.11 1997/04/29 02:11:48 jdp Exp $";
#endif
#define MASK_CHAR (0xFF) /* If your chars aren't 8 bits, you will
@@ -1446,6 +1446,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. */
OpenPOWER on IntegriCloud