diff options
author | jkh <jkh@FreeBSD.org> | 1993-12-12 17:01:24 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1993-12-12 17:01:24 +0000 |
commit | d106ff716199de535dcc49123fe78caadcd433ec (patch) | |
tree | 3d8538f024f2061b8991483eee45c571594b722e | |
parent | 72cc2e7f620d2badb6f05a17797885e0b350e2b0 (diff) | |
download | FreeBSD-src-d106ff716199de535dcc49123fe78caadcd433ec.zip FreeBSD-src-d106ff716199de535dcc49123fe78caadcd433ec.tar.gz |
Sync to PK's latest version. I know that this is in /usr/src, the bloody
patch file had absolute pathnames in it and went and patched /usr/src directly
(first time this has happened, I'll watch for it now), so I thought I might
as well just commit it and clean up the .orig files and whatnot left behind.
Sorry - this is the first time this has happened to me. Very confusing.
-rw-r--r-- | gnu/usr.bin/as/read.c | 4 | ||||
-rw-r--r-- | gnu/usr.bin/as/write.c | 24 |
2 files changed, 21 insertions, 7 deletions
diff --git a/gnu/usr.bin/as/read.c b/gnu/usr.bin/as/read.c index add26cc..cf3c416 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.2 1993/11/03 00:52:11 paul Exp $"; +static char rcsid[] = "$Id: read.c,v 1.3 1993/11/30 20:55:43 jkh Exp $"; #endif #define MASK_CHAR (0xFF) /* If your chars aren't 8 bits, you will @@ -1136,6 +1136,7 @@ void s_size() { expressionS *exp; segT seg; + SKIP_WHITESPACE(); name = input_line_pointer; c = get_symbol_end(); /* just after name is now '\0' */ @@ -1187,6 +1188,7 @@ void s_type() { register symbolS *symbolP; int aux; + SKIP_WHITESPACE(); name = input_line_pointer; c = get_symbol_end(); /* just after name is now '\0' */ diff --git a/gnu/usr.bin/as/write.c b/gnu/usr.bin/as/write.c index 0658ac6..ea633e7 100644 --- a/gnu/usr.bin/as/write.c +++ b/gnu/usr.bin/as/write.c @@ -21,7 +21,7 @@ /* This thing should be set up to do byteordering correctly. But... */ #ifndef lint -static char rcsid[] = "$Id: write.c,v 1.2 1993/11/03 00:52:28 paul Exp $"; +static char rcsid[] = "$Id: write.c,v 1.3 1993/11/30 20:55:47 jkh Exp $"; #endif #include "as.h" @@ -1007,11 +1007,6 @@ segT this_segment_type; /* N_TYPE bits for segment. */ add_symbolP = NULL; fixP->fx_addsy = NULL; -#ifdef PIC - add_symbolP = fixP->fx_addsy = fixP->fx_gotsy; - if (add_symbolP) - add_symbol_segment = S_GET_SEGMENT(add_symbolP); -#endif } else { /* Different segments in subtraction. */ know(!(S_IS_EXTERNAL(sub_symbolP) && (S_GET_SEGMENT(sub_symbolP) == SEG_ABSOLUTE))); @@ -1026,6 +1021,20 @@ segT this_segment_type; /* N_TYPE bits for segment. */ } } /* if sub_symbolP */ +#ifdef PIC + /* + * Bring _GLOBAL_OFFSET_TABLE_ forward, now we've had the + * chance to collapse any accompanying symbols into a number. + * This is the sequel of the hack in expr.c to parse operands + * of the form `_GLOBAL_OFFSET_TABLE_+(L1-L2)'. Note that + * _GLOBAL_OFFSET_TABLE_ can only be an "add symbol". + */ + if (add_symbolP == NULL && fixP->fx_gotsy != NULL) { + add_symbolP = fixP->fx_addsy = fixP->fx_gotsy; + add_symbol_segment = S_GET_SEGMENT(add_symbolP); + } +#endif + if (add_symbolP) { if (add_symbol_segment == this_segment_type && pcrel) { /* @@ -1065,8 +1074,11 @@ segT this_segment_type; /* N_TYPE bits for segment. */ */ if (!flagseen['k'] || (fixP->fx_r_type != RELOC_GLOB_DAT && +#ifdef TC_I386 +/* XXX - This must be rationalized */ fixP->fx_r_type != RELOC_GOT && fixP->fx_r_type != RELOC_GOTOFF && +#endif (fixP->fx_r_type != RELOC_32 || !S_IS_EXTERNAL(add_symbolP)))) #endif |