summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-04-23 00:16:12 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-04-23 00:16:12 +0000
commit48f0216494efd6a916518c31e551b9a416ba191f (patch)
tree85fa8f606f06465ae26f7ebd1033edfc597f7ec0 /gnu/usr.bin
parentd0a03bf14a2903828ffaf6d0fbcf845f33f3df0c (diff)
Merge of NetBSD 960418
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/Makefile4
-rw-r--r--gnu/usr.bin/cpio/main.c2
-rw-r--r--gnu/usr.bin/gas/as.19
-rw-r--r--gnu/usr.bin/gas/as.c13
-rw-r--r--gnu/usr.bin/gas/as.h8
-rw-r--r--gnu/usr.bin/gas/config/Makefile.ns32k4
-rw-r--r--gnu/usr.bin/gas/config/obj-aout.c8
-rw-r--r--gnu/usr.bin/gas/config/obj-aout.h6
-rw-r--r--gnu/usr.bin/gas/config/tc-i386.c17
-rw-r--r--gnu/usr.bin/gas/config/tc-m68k.c15
-rw-r--r--gnu/usr.bin/gas/config/tc-ns32k.c14
-rw-r--r--gnu/usr.bin/gas/config/tc-sparc.c18
-rw-r--r--gnu/usr.bin/gas/expr.c6
-rw-r--r--gnu/usr.bin/gas/read.c7
-rw-r--r--gnu/usr.bin/gas/write.c10
-rw-r--r--gnu/usr.bin/sort/sort.c2
-rw-r--r--gnu/usr.bin/tar/list.c7
-rw-r--r--gnu/usr.bin/tar/tar.c6
18 files changed, 90 insertions, 66 deletions
diff --git a/gnu/usr.bin/Makefile b/gnu/usr.bin/Makefile
index bb5064b7914..339a4f9735a 100644
--- a/gnu/usr.bin/Makefile
+++ b/gnu/usr.bin/Makefile
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile,v 1.6 1996/03/30 15:29:23 niklas Exp $
-# $NetBSD: Makefile,v 1.34 1996/02/18 12:28:15 pk Exp $
+# $OpenBSD: Makefile,v 1.7 1996/04/23 00:15:44 niklas Exp $
+# $NetBSD: Makefile,v 1.35 1996/04/03 21:20:52 chuck Exp $
SUBDIR+= bc cpio cvs dc diff diff3 gawk grep groff
SUBDIR+= gzip rcs sdiff send-pr sort tar texinfo
diff --git a/gnu/usr.bin/cpio/main.c b/gnu/usr.bin/cpio/main.c
index 78b5fc53145..1e87b1a248e 100644
--- a/gnu/usr.bin/cpio/main.c
+++ b/gnu/usr.bin/cpio/main.c
@@ -450,7 +450,7 @@ initialize_buffers ()
bzero (zeros_512, 512);
}
-void
+int
main (argc, argv)
int argc;
char *argv[];
diff --git a/gnu/usr.bin/gas/as.1 b/gnu/usr.bin/gas/as.1
index 57e2dc1f9b9..0ab2511a472 100644
--- a/gnu/usr.bin/gas/as.1
+++ b/gnu/usr.bin/gas/as.1
@@ -16,6 +16,7 @@ GNU as \- the portable GNU assembler.
.I path\c
\&\|]
.RB "[\|" \-k "\|]"
+.RB "[\|" \-K "\|]"
.RB "[\|" \-L "\|]"
.RB "[\|" \-o
.I objfile\c
@@ -147,6 +148,14 @@ directives.
.B \-k
Handle position independent code, generated by gcc -fpic.
.TP
+.B \-K
+Handle position independent code, generated by gcc -fPIC.
+This is currently handled identically to `\|\c
+.B \-k\c
+\&\|', on all architectures except the
+.I ns32k\c
+\&\.
+.TP
.B \-L
Keep (in symbol table) local symbols, starting with `\|\c
.B L\c
diff --git a/gnu/usr.bin/gas/as.c b/gnu/usr.bin/gas/as.c
index b956efd2efc..d120b986a36 100644
--- a/gnu/usr.bin/gas/as.c
+++ b/gnu/usr.bin/gas/as.c
@@ -1,3 +1,5 @@
+/* $OpenBSD: as.c,v 1.2 1996/04/23 00:15:50 niklas Exp $ */
+
/* as.c - GAS main program.
Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc.
@@ -32,7 +34,7 @@
*
*/
#ifndef lint
-static char rcsid[] = "$Id: as.c,v 1.1 1995/10/18 08:38:57 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: as.c,v 1.2 1996/04/23 00:15:50 niklas Exp $";
#endif
#include <stdio.h>
@@ -225,11 +227,6 @@ char **argv;
break;
}
-#if 00000
- case 'k':
- break;
-#endif
-
case 'L': /* -L means keep L* symbols */
break;
@@ -290,6 +287,10 @@ char **argv;
*/
*work_argv = NULL; /* NULL means 'not a file-name' */
}
+#ifdef PIC
+ if (flagseen['K'] || flagseen['k'])
+ picmode = 1;
+#endif
#ifdef DONTDEF
if (gdb_begin(gdb_symbol_file_name) == 0)
flagseen['G'] = 0; /* Don't do any gdbsym stuff. */
diff --git a/gnu/usr.bin/gas/as.h b/gnu/usr.bin/gas/as.h
index f7ca292f5a3..0a0a0f0018f 100644
--- a/gnu/usr.bin/gas/as.h
+++ b/gnu/usr.bin/gas/as.h
@@ -1,3 +1,5 @@
+/* $OpenBSD: as.h,v 1.2 1996/04/23 00:15:51 niklas Exp $ */
+
/* as.h - global header file
Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc.
@@ -17,10 +19,6 @@
along with GAS; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-/*
- * $Id: as.h,v 1.1 1995/10/18 08:38:57 deraadt Exp $
- */
-
#define GAS 1
/* #include <ansidecl.h> */
#include "host.h"
@@ -295,6 +293,8 @@ COMMON char *
COMMON int need_pass_2; /* TRUE if we need a second pass. */
+COMMON int picmode; /* TRUE if "-k" or "-K" seen. */
+
typedef struct {
char * poc_name; /* assembler mnemonic, lower case, no '.' */
void (*poc_handler)(); /* Do the work */
diff --git a/gnu/usr.bin/gas/config/Makefile.ns32k b/gnu/usr.bin/gas/config/Makefile.ns32k
index 30c3e120d23..780528aab3d 100644
--- a/gnu/usr.bin/gas/config/Makefile.ns32k
+++ b/gnu/usr.bin/gas/config/Makefile.ns32k
@@ -1,4 +1,4 @@
-# $Id: Makefile.ns32k,v 1.1 1995/10/18 08:39:01 deraadt Exp $
+# $OpenBSD: Makefile.ns32k,v 1.2 1996/04/23 00:15:57 niklas Exp $
CFLAGS+= -DPIC -DNS32532 -DNS32381
-SRCS+= tc-ns32k.c atof-ns32k.c
+SRCS+= tc-ns32k.c atof-ieee.c
diff --git a/gnu/usr.bin/gas/config/obj-aout.c b/gnu/usr.bin/gas/config/obj-aout.c
index 2129e53e5d7..4cbca4ad09f 100644
--- a/gnu/usr.bin/gas/config/obj-aout.c
+++ b/gnu/usr.bin/gas/config/obj-aout.c
@@ -522,12 +522,12 @@ object_headers *headers;
|| (S_GET_NAME(symbolP)[0] != '\001' &&
(flagseen['L'] || ! S_LOCAL_NAME(symbolP))
#ifdef PIC
- || (flagseen['k'] && symbolP->sy_forceout)
+ || (picmode && symbolP->sy_forceout)
#endif
)
)
#ifdef PIC
- && (!flagseen['k'] ||
+ && (!picmode ||
symbolP != GOT_symbol || got_referenced != 0
)
#endif
@@ -551,7 +551,7 @@ object_headers *headers;
* some its terms may not have had their final values
* set. We defer this until `obj_emit_symbols()'
*/
- if (flagseen['k'] &&
+ if (picmode &&
S_GET_TYPE(symbolP) != N_SIZE &&
#ifndef GRACE_PERIOD_EXPIRED
/*Can be enabled when no more old ld's around*/
@@ -585,7 +585,7 @@ object_headers *headers;
} else {
if ((S_IS_EXTERNAL(symbolP) || !S_IS_DEFINED(symbolP))
#ifdef PIC
- && (!flagseen['k'] ||
+ && (!picmode ||
symbolP != GOT_symbol || got_referenced != 0
)
#endif
diff --git a/gnu/usr.bin/gas/config/obj-aout.h b/gnu/usr.bin/gas/config/obj-aout.h
index c9b8bfc6f60..e59b1a04b46 100644
--- a/gnu/usr.bin/gas/config/obj-aout.h
+++ b/gnu/usr.bin/gas/config/obj-aout.h
@@ -1,3 +1,5 @@
+/* $OpenBSD: obj-aout.h,v 1.2 1996/04/23 00:15:59 niklas Exp $ */
+
/* obj-aout.h, a.out object file format for gas, the assembler.
Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
@@ -16,8 +18,6 @@
You should have received a copy of the GNU General Public
License along with GAS; see the file COPYING. If not, write
to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id: obj-aout.h,v 1.1 1995/10/18 08:39:02 deraadt Exp $
*/
@@ -156,7 +156,7 @@ typedef struct nlist obj_symbol_type; /* Symbol table entry */
#define EX_DYNAMIC 0x20
#define EX_PIC 0x10
#undef AOUT_FLAGS
-#define AOUT_FLAGS (flagseen['k'] ? EX_PIC : 0)
+#define AOUT_FLAGS (picmode ? EX_PIC : 0)
#define H_GET_DYNAMIC(h) (H_GET_FLAGS(h) & EX_DYNAMIC)
diff --git a/gnu/usr.bin/gas/config/tc-i386.c b/gnu/usr.bin/gas/config/tc-i386.c
index 0eef54a9e73..a8793363cd2 100644
--- a/gnu/usr.bin/gas/config/tc-i386.c
+++ b/gnu/usr.bin/gas/config/tc-i386.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tc-i386.c,v 1.3 1996/03/30 15:29:36 niklas Exp $ */
+/* $OpenBSD: tc-i386.c,v 1.4 1996/04/23 00:16:00 niklas Exp $ */
/* i386.c -- Assemble code for the Intel 80386
Copyright (C) 1989, 1991, 1992 Free Software Foundation.
@@ -27,11 +27,7 @@
*/
#ifndef lint
-#if 0
-static char rcsid[] = "$Id: tc-i386.c,v 1.3 1996/03/30 15:29:36 niklas Exp $";
-#else
-static char rcsid[] = "$OpenBSD: tc-i386.c,v 1.3 1996/03/30 15:29:36 niklas Exp $";
-#endif
+static char rcsid[] = "$OpenBSD: tc-i386.c,v 1.4 1996/04/23 00:16:00 niklas Exp $";
#endif
#include "as.h"
@@ -1612,7 +1608,7 @@ char *operand_string;
* into a temporary buffer...
*/
register char *cp;
- if (flagseen['k'] &&
+ if (picmode &&
(cp = strchr(input_line_pointer,'@'))) {
char tmpbuf[BUFSIZ];
@@ -1765,7 +1761,7 @@ register segT segment;
/* XXX - oops, the JMP_TBL relocation info should have percolated through
* here, define a field in frag to this?
*/
- (flagseen['k'] && S_GET_SEGMENT(fragP->fr_symbol) == SEG_UNKNOWN)?
+ (picmode && S_GET_SEGMENT(fragP->fr_symbol) == SEG_UNKNOWN)?
RELOC_JMP_TBL :
#endif
NO_RELOC, (symbolS *)0);
@@ -1782,7 +1778,7 @@ register segT segment;
(symbolS *) 0,
fragP->fr_offset, 1,
#ifdef PIC
-/*XXX*/ (flagseen['k'] && S_GET_SEGMENT(fragP->fr_symbol) == SEG_UNKNOWN)?
+/*XXX*/ (picmode && S_GET_SEGMENT(fragP->fr_symbol) == SEG_UNKNOWN)?
RELOC_JMP_TBL :
#endif
NO_RELOC, (symbolS *)0);
@@ -1922,6 +1918,7 @@ char ***vecP;
switch (**argP) {
#ifdef PIC
case 'k':
+ case 'K':
#if 00
char *tmp = xmalloc(3+1+strlen(operand_special_chars));
strcpy(tmp, operand_special_chars);
@@ -2076,7 +2073,7 @@ relax_addressT segment_address_in_file;
case NO_RELOC:
break;
case RELOC_32:
- if (!flagseen['k'] || !S_IS_EXTERNAL(fixP->fx_addsy))
+ if (!picmode || !S_IS_EXTERNAL(fixP->fx_addsy))
break;
r_symbolnum = fixP->fx_addsy->sy_number;
extrn_bit = 1;
diff --git a/gnu/usr.bin/gas/config/tc-m68k.c b/gnu/usr.bin/gas/config/tc-m68k.c
index 1a1e56e88ee..9a03e8a8ee2 100644
--- a/gnu/usr.bin/gas/config/tc-m68k.c
+++ b/gnu/usr.bin/gas/config/tc-m68k.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tc-m68k.c,v 1.2 1996/03/30 15:29:47 niklas Exp $ */
+/* $OpenBSD: tc-m68k.c,v 1.3 1996/04/23 00:16:02 niklas Exp $ */
/* tc-m68k.c All the m68020 specific stuff in one convenient, huge,
slow to compile, easy to find file.
@@ -1304,7 +1304,7 @@ char *instring;
#ifdef PIC
case ' ':
/* this operand is just here to indicate a jump-table branch */
- if (!flagseen['k'])
+ if (!picmode)
losing++;
break;
#endif /* PIC */
@@ -1665,7 +1665,7 @@ char *instring;
#ifdef PIC
/* Use GLOB_DAT for operand references in PIC mode */
- if (flagseen['k'])
+ if (picmode)
reloc_type = RELOC_GLOB_DAT;
else
#endif /* PIC */
@@ -1689,7 +1689,7 @@ char *instring;
__GLOBAL_OFFSET_TABLE_ is turned into a pc-relative
reference to __GLOBAL_OFFSET_TABLE_ - 6,
for the sake of Sun compatibility. */
- if (s[1] == 'l' && flagseen['k'] && gots(opP->con1)) {
+ if (s[1] == 'l' && picmode && gots(opP->con1)) {
offs(opP->con1) -= 6;
add_fix(s[1], opP->con1, 1, NO_RELOC);
} else
@@ -2121,7 +2121,7 @@ char *instring;
#ifdef PIC
/* If we have the optional kludgey 2nd operand,
make this go via the jump table. */
- if (flagseen['k'] && s[2] == ' ') {
+ if (picmode && s[2] == ' ') {
the_ins.opcode[the_ins.numo-1] |= 0xFF;
add_fix('l', opP->con1, 1, RELOC_JMP_TBL);
addword(0);
@@ -3314,7 +3314,7 @@ segT segment;
(symbolS *) 0, fragP->fr_offset, 1,
#ifdef PIC
/* With -k, make all external branches go via the jump table. */
- (flagseen['k']? RELOC_JMP_TBL: NO_RELOC), NULL
+ (picmode ? RELOC_JMP_TBL : NO_RELOC), NULL
#else
NO_RELOC
#endif
@@ -3517,7 +3517,7 @@ relax_addressT segment_address_in_file;
case NO_RELOC:
break;
case RELOC_32:
- if (flagseen['k'] && S_IS_EXTERNAL(fixP->fx_addsy)) {
+ if (picmode && S_IS_EXTERNAL(fixP->fx_addsy)) {
r_symbolnum = fixP->fx_addsy->sy_number;
r_flags |= 0x10; /* set extern bit */
}
@@ -3916,6 +3916,7 @@ char ***vecP;
#ifdef PIC
case 'k':
+ case 'K':
/* Predefine GOT symbol */
GOT_symbol = symbol_find_or_make("__GLOBAL_OFFSET_TABLE_");
break;
diff --git a/gnu/usr.bin/gas/config/tc-ns32k.c b/gnu/usr.bin/gas/config/tc-ns32k.c
index 17390ab402b..2a86ebd7006 100644
--- a/gnu/usr.bin/gas/config/tc-ns32k.c
+++ b/gnu/usr.bin/gas/config/tc-ns32k.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tc-ns32k.c,v 1.2 1996/03/30 15:29:50 niklas Exp $ */
+/* $OpenBSD: tc-ns32k.c,v 1.3 1996/04/23 00:16:04 niklas Exp $ */
/* ns32k.c -- Assemble on the National Semiconductor 32k series
Copyright (C) 1987, 1992 Free Software Foundation, Inc.
@@ -1073,7 +1073,7 @@ void convert_iif() {
#ifdef PIC
int reloc_mode;
if ((i == 4 || i == 6)
- && flagseen['k']
+ && picmode
&& (iif.iifP[i].addr_mode == 18 || iif.iifP[i].addr_mode == 26))
reloc_mode = RELOC_GLOB_DAT;
else
@@ -1339,7 +1339,7 @@ int *sizeP;
int prec;
LITTLENUM_TYPE words[MAX_LITTLENUMS];
LITTLENUM_TYPE *wordP;
- extern char *atof_ns32k();
+ extern char *atof_ieee();
char *t;
switch (type) {
@@ -1354,12 +1354,12 @@ int *sizeP;
*sizeP = 0;
return "Bad call to MD_ATOF()";
}
- t = atof_ns32k(input_line_pointer, type, words);
+ t = atof_ieee(input_line_pointer, type, words);
if (t)
input_line_pointer=t;
*sizeP = prec * sizeof(LITTLENUM_TYPE);
- for (wordP = words +prec; prec--;) {
+ for (wordP = words + prec; prec--;) {
md_number_to_chars(litP, (long)(*--wordP), sizeof(LITTLENUM_TYPE));
litP+=sizeof(LITTLENUM_TYPE);
}
@@ -1571,7 +1571,7 @@ relax_addressT segment_address_in_file;
| ((!S_IS_DEFINED(fixP->fx_addsy)
&& fixP->fx_pcrel
&& fixP->fx_addsy != got_symbol
- && flagseen['k']) ? 0x10 : 0)
+ && picmode) ? 0x10 : 0)
#endif
| (fixP->fx_im_disp & 3) << 5;
@@ -1580,7 +1580,7 @@ relax_addressT segment_address_in_file;
case NO_RELOC:
break;
case RELOC_32:
- if (flagseen['k'] && S_IS_EXTERNAL(fixP->fx_addsy)) {
+ if (picmode && S_IS_EXTERNAL(fixP->fx_addsy)) {
r_symbolnum = fixP->fx_addsy->sy_number;
r_flags |= 8; /* set extern bit */
}
diff --git a/gnu/usr.bin/gas/config/tc-sparc.c b/gnu/usr.bin/gas/config/tc-sparc.c
index 97ca7ed47f1..66e219e4f6d 100644
--- a/gnu/usr.bin/gas/config/tc-sparc.c
+++ b/gnu/usr.bin/gas/config/tc-sparc.c
@@ -1,3 +1,5 @@
+/* $OpenBSD: tc-sparc.c,v 1.2 1996/04/23 00:16:06 niklas Exp $ */
+
/* tc-sparc.c -- Assemble for the SPARC
Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
@@ -18,7 +20,7 @@
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef lint
-static char rcsid[] = "$Id: tc-sparc.c,v 1.1 1995/10/18 08:39:06 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: tc-sparc.c,v 1.2 1996/04/23 00:16:06 niklas Exp $";
#endif
#define cypress 1234
@@ -435,7 +437,7 @@ void md_begin() {
toHex[i] = i + 10 - 'A';
#if 0
- if (flagseen['k'])
+ if (picmode)
GOT_symbol = symbol_find_or_make("__GLOBAL_OFFSET_TABLE_");
#endif
} /* md_begin() */
@@ -885,7 +887,7 @@ char *str;
case 'L': /* 30 bit immediate */
the_insn.reloc =
#ifdef PIC
- flagseen['k']?RELOC_JMP_TBL:
+ picmode ? RELOC_JMP_TBL :
#endif
RELOC_WDISP30;
the_insn.pcrel = 1;
@@ -971,7 +973,7 @@ char *str;
}
}
- if (flagseen['k'] && the_insn.exp.X_add_symbol) {
+ if (picmode && the_insn.exp.X_add_symbol) {
switch (the_insn.reloc) {
case RELOC_LO10:
the_insn.reloc = RELOC_BASE10;
@@ -1386,7 +1388,7 @@ long val;
buf[2] = val >> 18;
buf[3] = val >> 10;
} else {
- if (flagseen['k'] && fixP->fx_r_type == RELOC_HI22)
+ if (picmode && fixP->fx_r_type == RELOC_HI22)
as_warn("non-PIC access to %s",
S_GET_NAME(fixP->fx_addsy));
buf[2]=0;
@@ -1411,7 +1413,7 @@ long val;
buf[2] |= (val >> 8) & 0x03;
buf[3] = val & 0xff;
} else {
- if (flagseen['k'] && fixP->fx_r_type == RELOC_LO10)
+ if (picmode && fixP->fx_r_type == RELOC_LO10)
as_warn("non-PIC access to %s",
S_GET_NAME(fixP->fx_addsy));
buf[3]=0;
@@ -1487,7 +1489,7 @@ relax_addressT segment_address_in_file;
r_extern = 0;
r_index = S_GET_TYPE(fixP->fx_addsy);
#ifdef PIC
- if (flagseen['k']) {
+ if (picmode) {
switch (fixP->fx_r_type) {
case RELOC_BASE10:
case RELOC_BASE13:
@@ -1726,7 +1728,7 @@ char ***vecP;
architecture_requested = 1;
}
#ifdef PIC
- } else if (**argP == 'k') {
+ } else if (**argP == 'k' || **argP == 'K') {
/* Predefine GOT symbol */
GOT_symbol = symbol_find_or_make("__GLOBAL_OFFSET_TABLE_");
#endif
diff --git a/gnu/usr.bin/gas/expr.c b/gnu/usr.bin/gas/expr.c
index 8ef7fbf68d7..5e33089b990 100644
--- a/gnu/usr.bin/gas/expr.c
+++ b/gnu/usr.bin/gas/expr.c
@@ -1,3 +1,5 @@
+/* $OpenBSD: expr.c,v 1.2 1996/04/23 00:15:52 niklas Exp $ */
+
/* expr.c -operands, expressions-
Copyright (C) 1987, 1990, 1991, 1992 Free Software Foundation, Inc.
@@ -25,7 +27,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: expr.c,v 1.1 1995/10/18 08:38:57 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: expr.c,v 1.2 1996/04/23 00:15:52 niklas Exp $";
#endif
#include <ctype.h>
@@ -126,7 +128,7 @@ register expressionS * expressionP;
/* likewise for the b's. xoxorich. */
if ((c == 'f' || c == 'b' || c == 'B')
&& (!*input_line_pointer ||
- (!strchr("+-.0123456789",*input_line_pointer) &&
+ (!strchr("+-.0123456789iInN",*input_line_pointer) &&
!strchr(EXP_CHARS,*input_line_pointer)))) {
maxdig = radix = 10;
too_many_digits = 11;
diff --git a/gnu/usr.bin/gas/read.c b/gnu/usr.bin/gas/read.c
index 7fc0feb876d..ac7fed5cdf0 100644
--- a/gnu/usr.bin/gas/read.c
+++ b/gnu/usr.bin/gas/read.c
@@ -1,3 +1,5 @@
+/* $OpenBSD: read.c,v 1.2 1996/04/23 00:15:53 niklas Exp $ */
+
/* read.c - read a source file -
Copyright (C) 1986, 1987, 1990, 1991, 1992 Free Software Foundation, Inc.
@@ -19,7 +21,7 @@
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef lint
-static char rcsid[] = "$Id: read.c,v 1.1 1995/10/18 08:38:59 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: read.c,v 1.2 1996/04/23 00:15:53 niklas Exp $";
#endif
#define MASK_CHAR (0xFF) /* If your chars aren't 8 bits, you will
@@ -631,7 +633,7 @@ int arg;
if (temp > max_alignment) {
as_bad("Alignment too large: %d. assumed.", temp = max_alignment);
}
-
+
/*
* For the sparc, `.align (1<<n)' actually means `.align n'
* so we have to convert it.
@@ -644,6 +646,7 @@ int arg;
as_bad("Alignment not a power of 2");
temp = i;
+
if (*input_line_pointer == ',') {
input_line_pointer ++;
temp_fill = get_absolute_expression();
diff --git a/gnu/usr.bin/gas/write.c b/gnu/usr.bin/gas/write.c
index 6b241efa10e..81be2a859d6 100644
--- a/gnu/usr.bin/gas/write.c
+++ b/gnu/usr.bin/gas/write.c
@@ -1,3 +1,5 @@
+/* $OpenBSD: write.c,v 1.2 1996/04/23 00:15:55 niklas Exp $ */
+
/* write.c - emit .o file
Copyright (C) 1986, 1987, 1990, 1991, 1992 Free Software Foundation, Inc.
@@ -21,7 +23,7 @@
/* This thing should be set up to do byteordering correctly. But... */
#ifndef lint
-static char rcsid[] = "$Id: write.c,v 1.1 1995/10/18 08:39:00 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: write.c,v 1.2 1996/04/23 00:15:55 niklas Exp $";
#endif
#include "as.h"
@@ -724,11 +726,13 @@ segT segment; /* SEG_DATA or SEG_TEXT */
offset = lie->add->sy_frag->fr_address+ S_GET_VALUE(lie->add) + lie->addnum -
(lie->sub->sy_frag->fr_address+ S_GET_VALUE(lie->sub));
if (offset <= -32768 || offset >= 32767) {
+#if 0
if (flagseen['K'])
as_warn(".word %s-%s+%ld didn't fit",
S_GET_NAME(lie->add),
S_GET_NAME(lie->sub),
lie->addnum);
+#endif
lie->added=1;
if (fragP->fr_subtype == 0) {
fragP->fr_subtype++;
@@ -1003,7 +1007,7 @@ segT this_segment_type; /* N_TYPE bits for segment. */
}
#endif /* TC_I960 */
#ifdef PIC
- if (flagseen['k'] &&
+ if (picmode &&
S_IS_EXTERNAL(add_symbolP)) {
as_bad("Can't reduce difference of external symbols in PIC code");
}
@@ -1078,7 +1082,7 @@ segT this_segment_type; /* N_TYPE bits for segment. */
* Do not fixup refs to global data
* even if defined here.
*/
- if (!flagseen['k'] ||
+ if (!picmode ||
#ifdef TC_NS32K
fixP->fx_pcrel ||
#endif
diff --git a/gnu/usr.bin/sort/sort.c b/gnu/usr.bin/sort/sort.c
index 13d7959ba4c..a5ab7a28234 100644
--- a/gnu/usr.bin/sort/sort.c
+++ b/gnu/usr.bin/sort/sort.c
@@ -1451,7 +1451,7 @@ set_ordering (s, key, blanktype)
return s;
}
-void
+int
main (argc, argv)
int argc;
char *argv[];
diff --git a/gnu/usr.bin/tar/list.c b/gnu/usr.bin/tar/list.c
index 59c724b107f..b1e42a628c1 100644
--- a/gnu/usr.bin/tar/list.c
+++ b/gnu/usr.bin/tar/list.c
@@ -1,3 +1,5 @@
+/* $OpenBSD: list.c,v 1.2 1996/04/23 00:16:09 niklas Exp $ */
+
/* List a tar archive.
Copyright (C) 1988, 1992, 1993 Free Software Foundation
@@ -18,7 +20,7 @@ along with GNU Tar; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef lint
-static char rcsid[] = "$Id: list.c,v 1.1 1995/10/18 08:41:09 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: list.c,v 1.2 1996/04/23 00:16:09 niklas Exp $";
#endif /* not lint */
/*
@@ -459,7 +461,8 @@ decode_header (header, st, stdp, wantug)
st->st_ctime = from_oct (1 + 12, header->header.ctime);
}
- if (0 == strcmp (header->header.magic, TMAGIC))
+ /* just match against "ustar" */
+ if (0 == strncmp (header->header.magic, TMAGIC, 5))
{
/* Unix Standard tar archive */
*stdp = 1;
diff --git a/gnu/usr.bin/tar/tar.c b/gnu/usr.bin/tar/tar.c
index ce610934237..ce4b3ba31b1 100644
--- a/gnu/usr.bin/tar/tar.c
+++ b/gnu/usr.bin/tar/tar.c
@@ -1,3 +1,5 @@
+/* $OpenBSD: tar.c,v 1.2 1996/04/23 00:16:11 niklas Exp $ */
+
/* Tar -- a tape archiver.
Copyright (C) 1988, 1992, 1993 Free Software Foundation
@@ -18,7 +20,7 @@ along with GNU Tar; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef lint
-static char rcsid[] = "$Id: tar.c,v 1.1 1995/10/18 08:41:10 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: tar.c,v 1.2 1996/04/23 00:16:11 niklas Exp $";
#endif /* not lint */
/*
@@ -194,7 +196,7 @@ struct option long_options[] =
/*
* Main routine for tar.
*/
-void
+int
main (argc, argv)
int argc;
char **argv;