summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/ld/arm32/md.h12
-rw-r--r--gnu/usr.bin/ld/i386/md-static-funcs.c7
-rw-r--r--gnu/usr.bin/ld/i386/md.c4
-rw-r--r--gnu/usr.bin/ld/i386/md.h14
-rw-r--r--gnu/usr.bin/ld/ld.c32
-rw-r--r--gnu/usr.bin/ld/ld.h4
-rw-r--r--gnu/usr.bin/ld/ldconfig/ldconfig.c4
-rw-r--r--gnu/usr.bin/ld/ldd/ldd.c4
-rw-r--r--gnu/usr.bin/ld/ldd/scanlib.c4
-rw-r--r--gnu/usr.bin/ld/lib.c36
-rw-r--r--gnu/usr.bin/ld/m68k/md.c4
-rw-r--r--gnu/usr.bin/ld/m68k/md.h12
-rw-r--r--gnu/usr.bin/ld/m88k/md.c6
-rw-r--r--gnu/usr.bin/ld/m88k/md.h46
-rw-r--r--gnu/usr.bin/ld/ns32k/md.c10
-rw-r--r--gnu/usr.bin/ld/ns32k/md.h4
-rw-r--r--gnu/usr.bin/ld/rrs.c68
-rw-r--r--gnu/usr.bin/ld/rtld/malloc.c112
-rw-r--r--gnu/usr.bin/ld/rtld/rtld.c16
-rw-r--r--gnu/usr.bin/ld/shlib.c12
-rw-r--r--gnu/usr.bin/ld/sparc/md.c4
-rw-r--r--gnu/usr.bin/ld/sparc/md.h24
-rw-r--r--gnu/usr.bin/ld/symseg.h8
-rw-r--r--gnu/usr.bin/ld/vax/md.c4
-rw-r--r--gnu/usr.bin/ld/vax/md.h14
-rw-r--r--gnu/usr.bin/ld/warnings.c16
-rw-r--r--gnu/usr.bin/ld/xbits.c4
27 files changed, 242 insertions, 243 deletions
diff --git a/gnu/usr.bin/ld/arm32/md.h b/gnu/usr.bin/ld/arm32/md.h
index a461d93977d..3bd535203cc 100644
--- a/gnu/usr.bin/ld/arm32/md.h
+++ b/gnu/usr.bin/ld/arm32/md.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: md.h,v 1.2 2000/02/01 21:01:39 espie Exp $ */
+/* $OpenBSD: md.h,v 1.3 2002/07/15 21:05:57 marc Exp $ */
/* $NetBSD: md.h,v 1.1 1996/05/17 21:51:10 mark Exp $ */
/*
@@ -126,13 +126,13 @@ typedef struct jmpslot {
#define get_byte(p) ( ((unsigned char *)(p))[0] )
#define get_short(p) ( ( ((unsigned char *)(p))[1] << 8) | \
- ( ((unsigned char *)(p))[0] ) \
+ ( ((unsigned char *)(p))[0] ) \
)
#define get_long(p) ( ( ((unsigned char *)(p))[3] << 24) | \
( ((unsigned char *)(p))[2] << 16) | \
( ((unsigned char *)(p))[1] << 8 ) | \
- ( ((unsigned char *)(p))[0] ) \
+ ( ((unsigned char *)(p))[0] ) \
)
#define put_byte(p, v) { ((unsigned char *)(p))[0] = ((unsigned long)(v)); }
@@ -140,7 +140,7 @@ typedef struct jmpslot {
#define put_short(p, v) { ((unsigned char *)(p))[1] = \
((((unsigned long)(v)) >> 8) & 0xff); \
((unsigned char *)(p))[0] = \
- ((((unsigned long)(v)) ) & 0xff); }
+ ((((unsigned long)(v)) ) & 0xff); }
#define put_long(p, v) { ((unsigned char *)(p))[3] = \
((((unsigned long)(v)) >> 24) & 0xff); \
@@ -149,7 +149,7 @@ typedef struct jmpslot {
((unsigned char *)(p))[1] = \
((((unsigned long)(v)) >> 8) & 0xff); \
((unsigned char *)(p))[0] = \
- ((((unsigned long)(v)) ) & 0xff); }
+ ((((unsigned long)(v)) ) & 0xff); }
#ifdef NEED_SWAP
@@ -181,7 +181,7 @@ void md_swapout_jmpslot __P((jmpslot_t *, int));
#define md_swap_short(x) ( (((x) >> 8) & 0xff) | (((x) & 0xff) << 8) )
-#define md_swap_long(x) ( (((x) >> 24) & 0xff ) | (((x) >> 8 ) & 0xff00 ) | \
+#define md_swap_long(x) ( (((x) >> 24) & 0xff ) | (((x) >> 8 ) & 0xff00 ) | \
(((x) << 8 ) & 0xff0000) | (((x) << 24) & 0xff000000))
#else /* We need not swap, but must pay attention to alignment: */
diff --git a/gnu/usr.bin/ld/i386/md-static-funcs.c b/gnu/usr.bin/ld/i386/md-static-funcs.c
index 1c116e5b676..28041323785 100644
--- a/gnu/usr.bin/ld/i386/md-static-funcs.c
+++ b/gnu/usr.bin/ld/i386/md-static-funcs.c
@@ -1,4 +1,4 @@
-/* * $OpenBSD: md-static-funcs.c,v 1.2 1998/03/26 19:46:36 niklas Exp $*/
+/* * $OpenBSD: md-static-funcs.c,v 1.3 2002/07/15 21:05:57 marc Exp $*/
/*
*
* Called by ld.so when onanating.
@@ -11,7 +11,6 @@ struct relocation_info *r;
long relocation;
char *addr;
{
-if (r->r_relative)
- *(long *)addr += relocation;
+ if (r->r_relative)
+ *(long *)addr += relocation;
}
-
diff --git a/gnu/usr.bin/ld/i386/md.c b/gnu/usr.bin/ld/i386/md.c
index 392298817b9..fe48c842b9a 100644
--- a/gnu/usr.bin/ld/i386/md.c
+++ b/gnu/usr.bin/ld/i386/md.c
@@ -1,4 +1,4 @@
-/* * $OpenBSD: md.c,v 1.3 1998/03/26 19:46:38 niklas Exp $*/
+/* * $OpenBSD: md.c,v 1.4 2002/07/15 21:05:57 marc Exp $*/
/*
* Copyright (c) 1993 Paul Kranenburg
* All rights reserved.
@@ -13,7 +13,7 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Paul Kranenburg.
+ * This product includes software developed by Paul Kranenburg.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
diff --git a/gnu/usr.bin/ld/i386/md.h b/gnu/usr.bin/ld/i386/md.h
index d4844a8e848..bada0ddc391 100644
--- a/gnu/usr.bin/ld/i386/md.h
+++ b/gnu/usr.bin/ld/i386/md.h
@@ -1,4 +1,4 @@
-/* * $OpenBSD: md.h,v 1.5 2000/04/17 22:23:44 deraadt Exp $*/
+/* * $OpenBSD: md.h,v 1.6 2002/07/15 21:05:57 marc Exp $*/
/*
* Copyright (c) 1993 Paul Kranenburg
* All rights reserved.
@@ -13,7 +13,7 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Paul Kranenburg.
+ * This product includes software developed by Paul Kranenburg.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
@@ -149,13 +149,13 @@ typedef struct jmpslot {
#define get_byte(p) ( ((unsigned char *)(p))[0] )
#define get_short(p) ( ( ((unsigned char *)(p))[0] << 8) | \
- ( ((unsigned char *)(p))[1] ) \
+ ( ((unsigned char *)(p))[1] ) \
)
#define get_long(p) ( ( ((unsigned char *)(p))[0] << 24) | \
( ((unsigned char *)(p))[1] << 16) | \
( ((unsigned char *)(p))[2] << 8 ) | \
- ( ((unsigned char *)(p))[3] ) \
+ ( ((unsigned char *)(p))[3] ) \
)
#define put_byte(p, v) { ((unsigned char *)(p))[0] = ((unsigned long)(v)); }
@@ -163,7 +163,7 @@ typedef struct jmpslot {
#define put_short(p, v) { ((unsigned char *)(p))[0] = \
((((unsigned long)(v)) >> 8) & 0xff); \
((unsigned char *)(p))[1] = \
- ((((unsigned long)(v)) ) & 0xff); }
+ ((((unsigned long)(v)) ) & 0xff); }
#define put_long(p, v) { ((unsigned char *)(p))[0] = \
((((unsigned long)(v)) >> 24) & 0xff); \
@@ -172,7 +172,7 @@ typedef struct jmpslot {
((unsigned char *)(p))[2] = \
((((unsigned long)(v)) >> 8) & 0xff); \
((unsigned char *)(p))[3] = \
- ((((unsigned long)(v)) ) & 0xff); }
+ ((((unsigned long)(v)) ) & 0xff); }
#ifdef NEED_SWAP
@@ -204,7 +204,7 @@ void md_swapout_jmpslot __P((jmpslot_t *, int));
#define md_swap_short(x) ( (((x) >> 8) & 0xff) | (((x) & 0xff) << 8) )
-#define md_swap_long(x) ( (((x) >> 24) & 0xff ) | (((x) >> 8 ) & 0xff00 ) | \
+#define md_swap_long(x) ( (((x) >> 24) & 0xff ) | (((x) >> 8 ) & 0xff00 ) | \
(((x) << 8 ) & 0xff0000) | (((x) << 24) & 0xff000000))
#else /* We need not swap, but must pay attention to alignment: */
diff --git a/gnu/usr.bin/ld/ld.c b/gnu/usr.bin/ld/ld.c
index bb2495a7bca..dd599484d83 100644
--- a/gnu/usr.bin/ld/ld.c
+++ b/gnu/usr.bin/ld/ld.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ld.c,v 1.24 2002/07/10 17:28:15 marc Exp $ */
+/* $OpenBSD: ld.c,v 1.25 2002/07/15 21:05:56 marc Exp $ */
/* $NetBSD: ld.c,v 1.52 1998/02/20 03:12:51 jonathan Exp $ */
/*-
@@ -178,7 +178,7 @@ enum {
int global_sym_count; /* # of nlist entries for global symbols */
int size_sym_count; /* # of N_SIZE nlist entries for output
- (relocatable_output only) */
+ (relocatable_output only) */
int local_sym_count; /* # of nlist entries for local symbols. */
int non_L_local_sym_count; /* # of nlist entries for non-L symbols */
int debugger_sym_count; /* # of nlist entries for debugger info. */
@@ -288,11 +288,11 @@ main(argc, argv)
if (atexit(cleanup))
err(1, "atexit");
- /* Added this to stop ld core-dumping on very large .o files. */
+ /* Added this to stop ld core-dumping on very large .o files. */
#ifdef RLIMIT_STACK
/* Get rid of any avoidable limit on stack size. */
{
- struct rlimit rlim;
+ struct rlimit rlim;
/* Set the stack limit huge so that alloca does not fail. */
if (getrlimit(RLIMIT_STACK, &rlim) != 0)
@@ -495,8 +495,8 @@ classify_arg(arg)
static void
decode_command(argc, argv)
- int argc;
- char **argv;
+ int argc;
+ char **argv;
{
int i;
struct file_entry *p;
@@ -511,7 +511,7 @@ decode_command(argc, argv)
*/
for (i = 1; i < argc; i++) {
- int code = classify_arg(argv[i]);
+ int code = classify_arg(argv[i]);
if (code) {
if (i + code > argc)
errx(1, "no argument following %s", argv[i]);
@@ -626,10 +626,10 @@ add_cmdline_ref(sp)
int
set_element_prefixed_p(name)
- char *name;
+ char *name;
{
struct string_list_element *p;
- int i;
+ int i;
for (p = set_element_prefixes; p; p = p->next) {
@@ -881,7 +881,7 @@ each_file(function, arg)
void (*function)();
void *arg;
{
- int i;
+ int i;
for (i = 0; i < number_of_files; i++) {
struct file_entry *entry = &file_table[i];
@@ -1907,7 +1907,7 @@ digest_pass1()
symbol *spsave;
struct localsymbol *lsp;
struct nlist *q = NULL;
- int defs = 0;
+ int defs = 0;
if (!(sp->flags & GS_REFERENCED)) {
#if 0
@@ -2467,7 +2467,7 @@ digest_pass2()
{
FOR_EACH_SYMBOL(i, sp) {
int size;
- int align = sizeof(int);
+ int align = sizeof(int);
if (!(sp->flags & GS_REFERENCED))
continue;
@@ -2980,7 +2980,7 @@ perform_relocation(data, data_size, reloc, nreloc, entry, dataseg)
} else if (RELOC_EXTERN_P(r)) {
- int symindex = RELOC_SYMBOL(r);
+ int symindex = RELOC_SYMBOL(r);
symbol *sp;
if (symindex >= entry->nsymbols)
@@ -3238,7 +3238,7 @@ coptxtrel(entry)
end = r + entry->ntextrel;
for (; r < end; r++) {
- int symindex;
+ int symindex;
struct localsymbol *lsp;
symbol *sp;
@@ -3393,7 +3393,7 @@ static int strtab_index;
static int
assign_string_table_index(name)
- char *name;
+ char *name;
{
int index = strtab_size;
int len = strlen(name) + 1;
@@ -3731,7 +3731,7 @@ write_file_syms(entry, syms_written_addr)
/* Generate a local symbol for the start of this file's text. */
if (discard_locals != DISCARD_ALL) {
- struct nlist nl;
+ struct nlist nl;
nl.n_type = N_FN | N_EXT;
nl.n_un.n_strx =
diff --git a/gnu/usr.bin/ld/ld.h b/gnu/usr.bin/ld/ld.h
index 97aafb54f81..bd0e1284cf8 100644
--- a/gnu/usr.bin/ld/ld.h
+++ b/gnu/usr.bin/ld/ld.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ld.h,v 1.9 2002/07/10 17:28:16 marc Exp $ */
+/* $OpenBSD: ld.h,v 1.10 2002/07/15 21:05:56 marc Exp $ */
/*-
* This code is derived from software copyrighted by the Free Software
@@ -410,7 +410,7 @@ typedef struct glosym {
interesting */
#define GS_TRACE 0x4 /* Symbol will be traced */
#define GS_HASJMPSLOT 0x8 /* */
-#define GS_HASGOTSLOT 0x10 /* Some state bits concerning */
+#define GS_HASGOTSLOT 0x10 /* Some state bits concerning */
#define GS_CPYRELOCRESERVED 0x20 /* entries in GOT and PLT tables */
#define GS_CPYRELOCCLAIMED 0x40 /* */
#define GS_WEAK 0x80 /* Symbol is weakly defined */
diff --git a/gnu/usr.bin/ld/ldconfig/ldconfig.c b/gnu/usr.bin/ld/ldconfig/ldconfig.c
index 0c40b823e6c..3a0e3233cd4 100644
--- a/gnu/usr.bin/ld/ldconfig/ldconfig.c
+++ b/gnu/usr.bin/ld/ldconfig/ldconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldconfig.c,v 1.10 2002/07/10 17:28:16 marc Exp $ */
+/* $OpenBSD: ldconfig.c,v 1.11 2002/07/15 21:05:57 marc Exp $ */
/*
* Copyright (c) 1993,1995 Paul Kranenburg
@@ -14,7 +14,7 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Paul Kranenburg.
+ * This product includes software developed by Paul Kranenburg.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
diff --git a/gnu/usr.bin/ld/ldd/ldd.c b/gnu/usr.bin/ld/ldd/ldd.c
index 116a1d718a9..3d78cacb26b 100644
--- a/gnu/usr.bin/ld/ldd/ldd.c
+++ b/gnu/usr.bin/ld/ldd/ldd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldd.c,v 1.9 2001/10/25 22:22:22 espie Exp $ */
+/* $OpenBSD: ldd.c,v 1.10 2002/07/15 21:05:57 marc Exp $ */
/* $NetBSD: ldd.c,v 1.12 1995/10/09 00:14:41 pk Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -14,7 +14,7 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Paul Kranenburg.
+ * This product includes software developed by Paul Kranenburg.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
diff --git a/gnu/usr.bin/ld/ldd/scanlib.c b/gnu/usr.bin/ld/ldd/scanlib.c
index cd34da747d6..f9d0557dd33 100644
--- a/gnu/usr.bin/ld/ldd/scanlib.c
+++ b/gnu/usr.bin/ld/ldd/scanlib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scanlib.c,v 1.2 2001/10/25 22:22:22 espie Exp $ */
+/* $OpenBSD: scanlib.c,v 1.3 2002/07/15 21:05:57 marc Exp $ */
/*
* Copyright (c) 2001 Marc Espie.
@@ -87,7 +87,7 @@ scan_library(fd, hdr, name, fmt1, fmt2)
if (sdt.sdt_sods) {
struct sod sod;
- off_t offset;
+ off_t offset;
char entry[MAXPATHLEN];
for (offset = sdt.sdt_sods; offset != 0;
diff --git a/gnu/usr.bin/ld/lib.c b/gnu/usr.bin/ld/lib.c
index ae505d4ed41..32457262843 100644
--- a/gnu/usr.bin/ld/lib.c
+++ b/gnu/usr.bin/ld/lib.c
@@ -1,4 +1,4 @@
-/* * $OpenBSD: lib.c,v 1.6 2002/07/10 17:28:16 marc Exp $ - library routines*/
+/* * $OpenBSD: lib.c,v 1.7 2002/07/15 21:05:56 marc Exp $ - library routines*/
/*
*/
@@ -37,7 +37,7 @@ static struct file_entry *decode_library_subfile __P((int,
void
search_library(fd, entry)
- int fd;
+ int fd;
struct file_entry *entry;
{
int member_length;
@@ -72,17 +72,17 @@ search_library(fd, entry)
static struct file_entry *
decode_library_subfile(fd, library_entry, subfile_offset, length_loc)
- int fd;
+ int fd;
struct file_entry *library_entry;
- int subfile_offset;
- int *length_loc;
+ int subfile_offset;
+ int *length_loc;
{
- int bytes_read;
+ int bytes_read;
int namelen;
- int member_length, content_length;
+ int member_length, content_length;
int starting_offset;
char *name;
- struct ar_hdr hdr1;
+ struct ar_hdr hdr1;
struct file_entry *subentry;
lseek(fd, subfile_offset, 0);
@@ -167,20 +167,20 @@ static int subfile_wanted_p __P((struct file_entry *));
static void
symdef_library(fd, entry, member_length)
- int fd;
+ int fd;
struct file_entry *entry;
- int member_length;
+ int member_length;
{
- int *symdef_data = (int *) xmalloc(member_length);
+ int *symdef_data = (int *) xmalloc(member_length);
struct ranlib *symdef_base;
- char *sym_name_base;
- int nsymdefs;
- int length_of_strings;
- int not_finished;
- int bytes_read;
+ char *sym_name_base;
+ int nsymdefs;
+ int length_of_strings;
+ int not_finished;
+ int bytes_read;
int i;
struct file_entry *prev = 0;
- int prev_offset = 0;
+ int prev_offset = 0;
bytes_read = read(fd, symdef_data, member_length);
if (bytes_read != member_length)
@@ -359,7 +359,7 @@ symdef_library(fd, entry, member_length)
static void
linear_library(fd, entry)
- int fd;
+ int fd;
struct file_entry *entry;
{
struct file_entry *prev = 0;
diff --git a/gnu/usr.bin/ld/m68k/md.c b/gnu/usr.bin/ld/m68k/md.c
index b15f764cc46..5ecf15f7abf 100644
--- a/gnu/usr.bin/ld/m68k/md.c
+++ b/gnu/usr.bin/ld/m68k/md.c
@@ -1,4 +1,4 @@
-/* * $OpenBSD: md.c,v 1.5 2000/02/01 21:01:39 espie Exp $*/
+/* * $OpenBSD: md.c,v 1.6 2002/07/15 21:05:57 marc Exp $*/
/*
* Copyright (c) 1993 Paul Kranenburg
* All rights reserved.
@@ -13,7 +13,7 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Paul Kranenburg.
+ * This product includes software developed by Paul Kranenburg.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
diff --git a/gnu/usr.bin/ld/m68k/md.h b/gnu/usr.bin/ld/m68k/md.h
index 768e2311d91..f1a7585e5fb 100644
--- a/gnu/usr.bin/ld/m68k/md.h
+++ b/gnu/usr.bin/ld/m68k/md.h
@@ -1,4 +1,4 @@
-/* * $OpenBSD: md.h,v 1.3 2000/02/01 21:01:39 espie Exp $*/
+/* * $OpenBSD: md.h,v 1.4 2002/07/15 21:05:57 marc Exp $*/
/*
* - m68k dependent definitions
*/
@@ -99,13 +99,13 @@ typedef struct jmpslot {
#define get_byte(p) ( ((unsigned char *)(p))[0] )
#define get_short(p) ( ( ((unsigned char *)(p))[0] << 8) | \
- ( ((unsigned char *)(p))[1] ) \
+ ( ((unsigned char *)(p))[1] ) \
)
#define get_long(p) ( ( ((unsigned char *)(p))[0] << 24) | \
( ((unsigned char *)(p))[1] << 16) | \
( ((unsigned char *)(p))[2] << 8 ) | \
- ( ((unsigned char *)(p))[3] ) \
+ ( ((unsigned char *)(p))[3] ) \
)
#define put_byte(p, v) { ((unsigned char *)(p))[0] = ((unsigned long)(v)); }
@@ -113,7 +113,7 @@ typedef struct jmpslot {
#define put_short(p, v) { ((unsigned char *)(p))[0] = \
((((unsigned long)(v)) >> 8) & 0xff); \
((unsigned char *)(p))[1] = \
- ((((unsigned long)(v)) ) & 0xff); }
+ ((((unsigned long)(v)) ) & 0xff); }
#define put_long(p, v) { ((unsigned char *)(p))[0] = \
((((unsigned long)(v)) >> 24) & 0xff); \
@@ -122,7 +122,7 @@ typedef struct jmpslot {
((unsigned char *)(p))[2] = \
((((unsigned long)(v)) >> 8) & 0xff); \
((unsigned char *)(p))[3] = \
- ((((unsigned long)(v)) ) & 0xff); }
+ ((((unsigned long)(v)) ) & 0xff); }
#ifdef NEED_SWAP
@@ -154,7 +154,7 @@ void md_swapout_jmpslot __P((jmpslot_t *, int));
#define md_swap_short(x) ( (((x) >> 8) & 0xff) | (((x) & 0xff) << 8) )
-#define md_swap_long(x) ( (((x) >> 24) & 0xff ) | (((x) >> 8 ) & 0xff00 ) | \
+#define md_swap_long(x) ( (((x) >> 24) & 0xff ) | (((x) >> 8 ) & 0xff00 ) | \
(((x) << 8 ) & 0xff0000) | (((x) << 24) & 0xff000000))
#else /* We need not swap, but must pay attention to alignment: */
diff --git a/gnu/usr.bin/ld/m88k/md.c b/gnu/usr.bin/ld/m88k/md.c
index 28bb79140ee..1f838c3fb22 100644
--- a/gnu/usr.bin/ld/m88k/md.c
+++ b/gnu/usr.bin/ld/m88k/md.c
@@ -1,4 +1,4 @@
-/* * $OpenBSD: md.c,v 1.2 2001/11/25 04:20:40 miod Exp $*/
+/* * $OpenBSD: md.c,v 1.3 2002/07/15 21:05:57 marc Exp $*/
/*
* Copyright (c) 1993 Paul Kranenburg
* All rights reserved.
@@ -13,7 +13,7 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Paul Kranenburg.
+ * This product includes software developed by Paul Kranenburg.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
@@ -436,7 +436,7 @@ int n;
case RELOC_PC16:
case RELOC_PC26:
r->r_pcrel =1;
-/* r->r_baserel =1; */
+/* r->r_baserel =1; */
break;
case RELOC_32:
/* r->r_jmptable =1; */
diff --git a/gnu/usr.bin/ld/m88k/md.h b/gnu/usr.bin/ld/m88k/md.h
index 5fde82c7a78..bf59628f562 100644
--- a/gnu/usr.bin/ld/m88k/md.h
+++ b/gnu/usr.bin/ld/m88k/md.h
@@ -1,4 +1,4 @@
-/* * $OpenBSD: md.h,v 1.4 2001/12/24 03:13:55 miod Exp $*/
+/* * $OpenBSD: md.h,v 1.5 2002/07/15 21:05:57 marc Exp $*/
/*
* - m88k dependent definitions
*/
@@ -72,22 +72,22 @@ typedef struct jmpslot {
/* m88k */
enum reloc_type {
- RELOC_LO16, /* lo16(sym) */
- RELOC_HI16, /* hi16(sym) */
- RELOC_PC16, /* bb0, bb1, bcnd */
- RELOC_PC26, /* br, bsr */
- RELOC_32, /* jump tables, etc */
- RELOC_IW16, /* global access through linker regs 28 */
- NO_RELOC,
+ RELOC_LO16, /* lo16(sym) */
+ RELOC_HI16, /* hi16(sym) */
+ RELOC_PC16, /* bb0, bb1, bcnd */
+ RELOC_PC26, /* br, bsr */
+ RELOC_32, /* jump tables, etc */
+ RELOC_IW16, /* global access through linker regs 28 */
+ NO_RELOC,
RELOC_GLOB_DAT,
RELOC_JMP_SLOT,
RELOC_RELATIVE
};
#if 0
struct relocation_info_m88k {
- unsigned int r_address; /* offset in text or data segment */
- unsigned int r_symbolnum : 24, /* ordinal number of add symbol */
- r_extern : 1, /* 1 if need to add symbol to value */
+ unsigned int r_address; /* offset in text or data segment */
+ unsigned int r_symbolnum : 24, /* ordinal number of add symbol */
+ r_extern : 1, /* 1 if need to add symbol to value */
r_baserel : 1,
r_pcrel : 1,
r_jmptable : 1,
@@ -97,13 +97,13 @@ struct relocation_info_m88k {
};
#endif
struct r_relocation_info_m88k {
- unsigned int r_address; /* offset in text or data segment */
- unsigned int r_type : 4,
+ unsigned int r_address; /* offset in text or data segment */
+ unsigned int r_type : 4,
r_jmptable : 1,
r_pcrel : 1,
r_baserel : 1,
- r_extern : 1, /* 1 if need to add symbol to value */
- r_symbolnum : 24; /* ordinal number of add symbol */
+ r_extern : 1, /* 1 if need to add symbol to value */
+ r_symbolnum : 24; /* ordinal number of add symbol */
int r_addend;
};
@@ -125,7 +125,7 @@ struct r_relocation_info_m88k {
#define md_swapout_symbols(s,n)
#define md_swapin_zsymbols(s,n)
#define md_swapout_zsymbols(s,n)
-#define md_swapin_reloc(r,n) md_in_reloc(r,n)
+#define md_swapin_reloc(r,n) md_in_reloc(r,n)
#define md_swapout_reloc(r,n)
#define md_swapin__dynamic(l)
#define md_swapout__dynamic(l)
@@ -149,12 +149,12 @@ struct r_relocation_info_m88k {
#define get_byte(p) ( ((unsigned char *)(p))[0] )
#define get_short(p) ( ( ((unsigned char *)(p))[0] << 8) | \
- ( ((unsigned char *)(p))[1] ) \
+ ( ((unsigned char *)(p))[1] ) \
)
#define get_long(p) ( ( ((unsigned char *)(p))[0] << 24) | \
( ((unsigned char *)(p))[1] << 16) | \
( ((unsigned char *)(p))[2] << 8 ) | \
- ( ((unsigned char *)(p))[3] ) \
+ ( ((unsigned char *)(p))[3] ) \
)
#define put_byte(p, v) { ((unsigned char *)(p))[0] = ((unsigned long)(v)); }
@@ -162,7 +162,7 @@ struct r_relocation_info_m88k {
#define put_short(p, v) { ((unsigned char *)(p))[0] = \
((((unsigned long)(v)) >> 8) & 0xff); \
((unsigned char *)(p))[1] = \
- ((((unsigned long)(v)) ) & 0xff); }
+ ((((unsigned long)(v)) ) & 0xff); }
#define put_long(p, v) { ((unsigned char *)(p))[0] = \
((((unsigned long)(v)) >> 24) & 0xff); \
@@ -171,16 +171,16 @@ struct r_relocation_info_m88k {
((unsigned char *)(p))[2] = \
((((unsigned long)(v)) >> 8) & 0xff); \
((unsigned char *)(p))[3] = \
- ((((unsigned long)(v)) ) & 0xff); }
+ ((((unsigned long)(v)) ) & 0xff); }
#define put_b26(p, v) { ((unsigned char *)(p))[0] = \
((((unsigned long)(v)) >> 24) & 0x03 | \
- ((unsigned char *)(p))[0] & 0xfc); \
+ ((unsigned char *)(p))[0] & 0xfc); \
((unsigned char *)(p))[1] = \
((((unsigned long)(v)) >> 16) & 0xff); \
((unsigned char *)(p))[2] = \
((((unsigned long)(v)) >> 8) & 0xff); \
((unsigned char *)(p))[3] = \
- ((((unsigned long)(v)) ) & 0xff); }
+ ((((unsigned long)(v)) ) & 0xff); }
#ifdef NEED_SWAP
@@ -213,7 +213,7 @@ void md_swapout_jmpslot __P((jmpslot_t *, int));
#define md_swap_short(x) ( (((x) >> 8) & 0xff) | (((x) & 0xff) << 8) )
-#define md_swap_long(x) ( (((x) >> 24) & 0xff ) | (((x) >> 8 ) & 0xff00 ) | \
+#define md_swap_long(x) ( (((x) >> 24) & 0xff ) | (((x) >> 8 ) & 0xff00 ) | \
(((x) << 8 ) & 0xff0000) | (((x) << 24) & 0xff000000))
#else /* We need not swap, but must pay attention to alignment: */
diff --git a/gnu/usr.bin/ld/ns32k/md.c b/gnu/usr.bin/ld/ns32k/md.c
index ada12be39d7..10ecd59a011 100644
--- a/gnu/usr.bin/ld/ns32k/md.c
+++ b/gnu/usr.bin/ld/ns32k/md.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: md.c,v 1.3 1998/03/26 19:47:14 niklas Exp $ */
+/* $OpenBSD: md.c,v 1.4 2002/07/15 21:05:57 marc Exp $ */
/* $NetBSD: md.c,v 1.6 1994/11/30 06:20:42 phil Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -14,7 +14,7 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Paul Kranenburg.
+ * This product includes software developed by Paul Kranenburg.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
@@ -81,7 +81,7 @@ static void
put_imm(addr, val, n)
unsigned char *addr;
unsigned long val;
-char n;
+char n;
{
addr += (n - 1);
while (n--) {
@@ -96,12 +96,12 @@ char n;
static unsigned long
get_imm(addr, n)
unsigned char *addr;
-int n;
+int n;
{
int val = 0;
while (n--)
- val = val * 256 + *addr++;
+ val = val * 256 + *addr++;
return val;
}
diff --git a/gnu/usr.bin/ld/ns32k/md.h b/gnu/usr.bin/ld/ns32k/md.h
index b6deca783fe..408f98ae5d7 100644
--- a/gnu/usr.bin/ld/ns32k/md.h
+++ b/gnu/usr.bin/ld/ns32k/md.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: md.h,v 1.4 2000/02/01 21:01:41 espie Exp $ */
+/* $OpenBSD: md.h,v 1.5 2002/07/15 21:05:57 marc Exp $ */
/* $NetBSD: md.h,v 1.3 1996/02/22 00:20:06 pk Exp $ */
/*
@@ -126,7 +126,7 @@ void md_swapout_jmpslot __P((jmpslot_t *, int));
# define md_swap_short(x) ( (((x) >> 8) & 0xff) | (((x) & 0xff) << 8) )
-# define md_swap_long(x) ( (((x) >> 24) & 0xff ) | (((x) >> 8 ) & 0xff00 ) | \
+# define md_swap_long(x) ( (((x) >> 24) & 0xff ) | (((x) >> 8 ) & 0xff00 ) | \
(((x) << 8 ) & 0xff0000) | (((x) << 24) & 0xff000000) )
# else /* We need not swap, but must pay attention to alignment: */
diff --git a/gnu/usr.bin/ld/rrs.c b/gnu/usr.bin/ld/rrs.c
index b76c4e9dd4a..29fc410cf3f 100644
--- a/gnu/usr.bin/ld/rrs.c
+++ b/gnu/usr.bin/ld/rrs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rrs.c,v 1.7 2000/09/21 12:03:12 espie Exp $*/
+/* $OpenBSD: rrs.c,v 1.8 2002/07/15 21:05:56 marc Exp $*/
/*
* Copyright (c) 1993 Paul Kranenburg
* All rights reserved.
@@ -13,7 +13,7 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Paul Kranenburg.
+ * This product includes software developed by Paul Kranenburg.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
@@ -93,55 +93,55 @@ struct shobj {
/*
RRS text segment:
+-------------------+ <-- sdt_rel (rrs_text_start)
- | |
- | relocation |
- | |
+ | |
+ | relocation |
+ | |
+-------------------+ <-- <sdt>.sdt_hash
- | |
+ | |
| hash buckets |
- | |
+ | |
+-------------------+ <-- <sdt>.sdt_nzlist
- | |
- | symbols |
- | |
+ | |
+ | symbols |
+ | |
+-------------------+ <-- <sdt>.sdt_strings
- | |
- | strings |
- | |
+ | |
+ | strings |
+ | |
+-------------------+ <-- <sdt>.sdt_sods
- | |
- | shobjs |
- | |
+ | |
+ | shobjs |
+ | |
+-------------------+
- | |
+ | |
| shobjs strings | <-- <shobj>.sod_name
- | |
+ | |
+-------------------+
RRS data segment:
+-------------------+ <-- __DYNAMIC (rrs_data_start)
- | |
- | _dymamic |
- | |
+ | |
+ | _dymamic |
+ | |
+-------------------+ <-- __DYNAMIC.d_debug
- | |
- | so_debug |
- | |
+ | |
+ | so_debug |
+ | |
+-------------------+ <-- __DYNAMIC.d_un.d_sdt
- | |
- | sdt |
- | |
+ | |
+ | sdt |
+ | |
+-------------------+ <-- sdt_got
- | |
- | _GOT_ | <-- _GLOBAL_OFFSET_TABLE_
- | | ( == sdt_got + got_origin)
- | |
+ | |
+ | _GOT_ | <-- _GLOBAL_OFFSET_TABLE_
+ | | ( == sdt_got + got_origin)
+ | |
+-------------------+ <-- sdt_plt
- | |
- | PLT |
- | |
+ | |
+ | PLT |
+ | |
+-------------------+
*/
diff --git a/gnu/usr.bin/ld/rtld/malloc.c b/gnu/usr.bin/ld/rtld/malloc.c
index 4e09f9cb48e..e611c370cc6 100644
--- a/gnu/usr.bin/ld/rtld/malloc.c
+++ b/gnu/usr.bin/ld/rtld/malloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: malloc.c,v 1.3 2002/07/10 17:28:16 marc Exp $ */
+/* $OpenBSD: malloc.c,v 1.4 2002/07/15 21:05:57 marc Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -35,7 +35,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)malloc.c 5.11 (Berkeley) 2/23/91";*/
-static char *rcsid = "$OpenBSD: malloc.c,v 1.3 2002/07/10 17:28:16 marc Exp $";
+static char *rcsid = "$OpenBSD: malloc.c,v 1.4 2002/07/15 21:05:57 marc Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -153,8 +153,8 @@ void *
malloc(nbytes)
size_t nbytes;
{
- union overhead *op;
- int bucket, n;
+ union overhead *op;
+ int bucket, n;
unsigned amt;
/*
@@ -166,10 +166,10 @@ malloc(nbytes)
if (morepages(NPOOLPAGES) == 0)
return NULL;
op = (union overhead *)(pagepool_start);
- n = n - sizeof (*op) - ((int)op & (n - 1));
+ n = n - sizeof (*op) - ((int)op & (n - 1));
if (n < 0)
n += pagesz;
- if (n) {
+ if (n) {
pagepool_start += n;
}
bucket = 0;
@@ -208,17 +208,17 @@ malloc(nbytes)
* If nothing in hash bucket right now,
* request more memory from the system.
*/
- if ((op = nextf[bucket]) == NULL) {
- morecore(bucket);
- if ((op = nextf[bucket]) == NULL)
- return (NULL);
+ if ((op = nextf[bucket]) == NULL) {
+ morecore(bucket);
+ if ((op = nextf[bucket]) == NULL)
+ return (NULL);
}
/* remove from linked list */
- nextf[bucket] = op->ov_next;
+ nextf[bucket] = op->ov_next;
op->ov_magic = MAGIC;
op->ov_index = bucket;
#ifdef MSTATS
- nmalloc[bucket]++;
+ nmalloc[bucket]++;
#endif
#ifdef RCHECK
/*
@@ -227,9 +227,9 @@ malloc(nbytes)
*/
op->ov_size = (nbytes + RSLOP - 1) & ~(RSLOP - 1);
op->ov_rmagic = RMAGIC;
- *(u_short *)((caddr_t)(op + 1) + op->ov_size) = RMAGIC;
+ *(u_short *)((caddr_t)(op + 1) + op->ov_size) = RMAGIC;
#endif
- return ((char *)(op + 1));
+ return ((char *)(op + 1));
}
/*
@@ -239,10 +239,10 @@ static void
morecore(bucket)
int bucket;
{
- union overhead *op;
+ union overhead *op;
int sz; /* size of desired block */
- int amt; /* amount to allocate */
- int nblks; /* how many blocks we get */
+ int amt; /* amount to allocate */
+ int nblks; /* how many blocks we get */
/*
* sbrk_size <= 0 only for big, FLUFFY, requests (about
@@ -257,7 +257,7 @@ morecore(bucket)
#endif
if (sz < pagesz) {
amt = pagesz;
- nblks = amt / sz;
+ nblks = amt / sz;
} else {
amt = sz + pagesz;
nblks = 1;
@@ -272,39 +272,39 @@ morecore(bucket)
* Add new memory allocated to that on
* free list for this hash bucket.
*/
- nextf[bucket] = op;
- while (--nblks > 0) {
+ nextf[bucket] = op;
+ while (--nblks > 0) {
op->ov_next = (union overhead *)((caddr_t)op + sz);
op = (union overhead *)((caddr_t)op + sz);
- }
+ }
}
void
free(cp)
void *cp;
{
- int size;
+ int size;
union overhead *op;
- if (cp == NULL)
- return;
+ if (cp == NULL)
+ return;
op = (union overhead *)((caddr_t)cp - sizeof (union overhead));
#ifdef DEBUG
- ASSERT(op->ov_magic == MAGIC); /* make sure it was in use */
+ ASSERT(op->ov_magic == MAGIC); /* make sure it was in use */
#else
if (op->ov_magic != MAGIC)
return; /* sanity */
#endif
#ifdef RCHECK
- ASSERT(op->ov_rmagic == RMAGIC);
+ ASSERT(op->ov_rmagic == RMAGIC);
ASSERT(*(u_short *)((caddr_t)(op + 1) + op->ov_size) == RMAGIC);
#endif
- size = op->ov_index;
- ASSERT(size < NBUCKETS);
+ size = op->ov_index;
+ ASSERT(size < NBUCKETS);
op->ov_next = nextf[size]; /* also clobbers ov_magic */
- nextf[size] = op;
+ nextf[size] = op;
#ifdef MSTATS
- nmalloc[size]--;
+ nmalloc[size]--;
#endif
}
@@ -326,14 +326,14 @@ realloc(cp, nbytes)
void *cp;
size_t nbytes;
{
- u_int onb;
+ u_int onb;
int i;
union overhead *op;
- char *res;
+ char *res;
int was_alloced = 0;
- if (cp == NULL)
- return (malloc(nbytes));
+ if (cp == NULL)
+ return (malloc(nbytes));
op = (union overhead *)((caddr_t)cp - sizeof (union overhead));
if (op->ov_magic == MAGIC) {
was_alloced++;
@@ -380,11 +380,11 @@ realloc(cp, nbytes)
} else
free(cp);
}
- if ((res = malloc(nbytes)) == NULL)
- return (NULL);
- if (cp != res) /* common optimization if "compacting" */
+ if ((res = malloc(nbytes)) == NULL)
+ return (NULL);
+ if (cp != res) /* common optimization if "compacting" */
bcopy(cp, res, (nbytes < onb) ? nbytes : onb);
- return (res);
+ return (res);
}
/*
@@ -422,24 +422,24 @@ findbucket(freep, srchlen)
mstats(s)
char *s;
{
- int i, j;
- union overhead *p;
- int totfree = 0,
- totused = 0;
-
- fprintf(stderr, "Memory allocation statistics %s\nfree:\t", s);
- for (i = 0; i < NBUCKETS; i++) {
- for (j = 0, p = nextf[i]; p; p = p->ov_next, j++)
- ;
- fprintf(stderr, " %d", j);
- totfree += j * (1 << (i + 3));
- }
- fprintf(stderr, "\nused:\t");
- for (i = 0; i < NBUCKETS; i++) {
- fprintf(stderr, " %d", nmalloc[i]);
- totused += nmalloc[i] * (1 << (i + 3));
- }
- fprintf(stderr, "\n\tTotal in use: %d, total free: %d\n",
+ int i, j;
+ union overhead *p;
+ int totfree = 0,
+ totused = 0;
+
+ fprintf(stderr, "Memory allocation statistics %s\nfree:\t", s);
+ for (i = 0; i < NBUCKETS; i++) {
+ for (j = 0, p = nextf[i]; p; p = p->ov_next, j++)
+ ;
+ fprintf(stderr, " %d", j);
+ totfree += j * (1 << (i + 3));
+ }
+ fprintf(stderr, "\nused:\t");
+ for (i = 0; i < NBUCKETS; i++) {
+ fprintf(stderr, " %d", nmalloc[i]);
+ totused += nmalloc[i] * (1 << (i + 3));
+ }
+ fprintf(stderr, "\n\tTotal in use: %d, total free: %d\n",
totused, totfree);
}
#endif
diff --git a/gnu/usr.bin/ld/rtld/rtld.c b/gnu/usr.bin/ld/rtld/rtld.c
index c0b59ffdb1e..cce7475cc5d 100644
--- a/gnu/usr.bin/ld/rtld/rtld.c
+++ b/gnu/usr.bin/ld/rtld/rtld.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld.c,v 1.24 2002/07/10 17:28:16 marc Exp $ */
+/* $OpenBSD: rtld.c,v 1.25 2002/07/15 21:05:57 marc Exp $ */
/* $NetBSD: rtld.c,v 1.43 1996/01/14 00:35:17 pk Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -14,7 +14,7 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Paul Kranenburg.
+ * This product includes software developed by Paul Kranenburg.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
@@ -524,7 +524,7 @@ alloc_link_map(path, sodp, parent, addr, size, dp)
*/
static void
free_link_map(smp)
- struct so_map *smp;
+ struct so_map *smp;
{
if ((LM_PRIVATE(smp)->spd_flags & RTLD_DL) != 0) {
@@ -619,8 +619,8 @@ again:
}
if ((addr = mmap(0, hdr.a_text + hdr.a_data + hdr.a_bss,
- PROT_READ|PROT_EXEC,
- MAP_COPY, fd, 0)) == (caddr_t)-1) {
+ PROT_READ|PROT_EXEC,
+ MAP_COPY, fd, 0)) == (caddr_t)-1) {
(void)close(fd);
return NULL;
}
@@ -677,8 +677,8 @@ unmap_object(smp)
return;
}
- *pp = smp->som_next; /* make list skip it */
- if (link_map_tail == &smp->som_next) /* and readjust tail pointer */
+ *pp = smp->som_next; /* make list skip it */
+ if (link_map_tail == &smp->som_next) /* and readjust tail pointer */
link_map_tail = pp;
/* unmap from address space */
@@ -1432,7 +1432,7 @@ build_sod(name, sodp)
char *realname, *tok, *etok, *cp;
/* default is an absolute or relative path */
- sodp->sod_name = (long)strdup(name); /* strtok is destructive */
+ sodp->sod_name = (long)strdup(name); /* strtok is destructive */
sodp->sod_library = 0;
sodp->sod_major = sodp->sod_minor = 0;
diff --git a/gnu/usr.bin/ld/shlib.c b/gnu/usr.bin/ld/shlib.c
index 721bc2fbc36..1456a172115 100644
--- a/gnu/usr.bin/ld/shlib.c
+++ b/gnu/usr.bin/ld/shlib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: shlib.c,v 1.11 2002/07/10 17:28:16 marc Exp $ */
+/* $OpenBSD: shlib.c,v 1.12 2002/07/15 21:05:56 marc Exp $ */
/* $NetBSD: shlib.c,v 1.13 1998/04/04 01:00:29 fvdl Exp $ */
/*
@@ -15,7 +15,7 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Paul Kranenburg.
+ * This product includes software developed by Paul Kranenburg.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
@@ -233,9 +233,9 @@ int n1, n2;
* major and minor version numbers.
*
* MAJOR == -1 && MINOR == -1 --> find highest version
- * MAJOR != -1 && MINOR == -1 --> find highest minor version
- * MAJOR == -1 && MINOR != -1 --> invalid
- * MAJOR != -1 && MINOR != -1 --> find highest micro version
+ * MAJOR != -1 && MINOR == -1 --> find highest minor version
+ * MAJOR == -1 && MINOR != -1 --> invalid
+ * MAJOR != -1 && MINOR != -1 --> find highest micro version
*/
/* Not interested in devices right now... */
@@ -266,7 +266,7 @@ int do_dot_a;
for (i = 0; i < n_search_dirs; i++) {
DIR *dd = opendir(search_dirs[i]);
struct dirent *dp;
- char *path = NULL;
+ char *path = NULL;
if (dd == NULL)
continue;
diff --git a/gnu/usr.bin/ld/sparc/md.c b/gnu/usr.bin/ld/sparc/md.c
index 1114f7cb6cb..aec03c36294 100644
--- a/gnu/usr.bin/ld/sparc/md.c
+++ b/gnu/usr.bin/ld/sparc/md.c
@@ -1,4 +1,4 @@
-/* * $OpenBSD: md.c,v 1.8 2002/07/10 17:28:16 marc Exp $*/
+/* * $OpenBSD: md.c,v 1.9 2002/07/15 21:05:57 marc Exp $*/
/*
* Copyright (c) 1993 Paul Kranenburg
* All rights reserved.
@@ -13,7 +13,7 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Paul Kranenburg.
+ * This product includes software developed by Paul Kranenburg.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
diff --git a/gnu/usr.bin/ld/sparc/md.h b/gnu/usr.bin/ld/sparc/md.h
index 93675ebe787..be78b854c15 100644
--- a/gnu/usr.bin/ld/sparc/md.h
+++ b/gnu/usr.bin/ld/sparc/md.h
@@ -1,4 +1,4 @@
-/* * $OpenBSD: md.h,v 1.6 2000/02/01 21:01:42 espie Exp $*/
+/* * $OpenBSD: md.h,v 1.7 2002/07/15 21:05:57 marc Exp $*/
/*
* Copyright (c) 1993 Paul Kranenburg
* All rights reserved.
@@ -13,7 +13,7 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Paul Kranenburg.
+ * This product includes software developed by Paul Kranenburg.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
@@ -78,7 +78,7 @@
}
#undef relocation_info
-#define relocation_info reloc_info_sparc
+#define relocation_info reloc_info_sparc
#define r_symbolnum r_index
#endif /* __NetBSD__ || __OpenBSD__ */
@@ -235,18 +235,18 @@ void md_swapout_jmpslot __P((jmpslot_t *, int));
#define md_swap_short(x) ( (((x) >> 8) & 0xff) | (((x) & 0xff) << 8) )
-#define md_swap_long(x) ( (((x) >> 24) & 0xff ) | (((x) >> 8 ) & 0xff00 ) | \
+#define md_swap_long(x) ( (((x) >> 24) & 0xff ) | (((x) >> 8 ) & 0xff00 ) | \
(((x) << 8 ) & 0xff0000) | (((x) << 24) & 0xff000000))
#define get_byte(p) ( ((unsigned char *)(p))[0] )
#define get_short(p) ( ( ((unsigned char *)(p))[1] << 8) | \
- ( ((unsigned char *)(p))[0] ) \
+ ( ((unsigned char *)(p))[0] ) \
)
#define get_long(p) ( ( ((unsigned char *)(p))[3] << 24) | \
( ((unsigned char *)(p))[2] << 16) | \
( ((unsigned char *)(p))[1] << 8 ) | \
- ( ((unsigned char *)(p))[0] ) \
+ ( ((unsigned char *)(p))[0] ) \
)
#define put_byte(p, v) { ((unsigned char *)(p))[0] = ((unsigned long)(v)); }
@@ -254,7 +254,7 @@ void md_swapout_jmpslot __P((jmpslot_t *, int));
#define put_short(p, v) { ((unsigned char *)(p))[1] = \
((((unsigned long)(v)) >> 8) & 0xff); \
((unsigned char *)(p))[0] = \
- ((((unsigned long)(v)) ) & 0xff); }
+ ((((unsigned long)(v)) ) & 0xff); }
#define put_long(p, v) { ((unsigned char *)(p))[3] = \
((((unsigned long)(v)) >> 24) & 0xff); \
@@ -263,7 +263,7 @@ void md_swapout_jmpslot __P((jmpslot_t *, int));
((unsigned char *)(p))[1] = \
((((unsigned long)(v)) >> 8) & 0xff); \
((unsigned char *)(p))[0] = \
- ((((unsigned long)(v)) ) & 0xff); }
+ ((((unsigned long)(v)) ) & 0xff); }
#else /* We need not swap, but must pay attention to alignment: */
@@ -273,13 +273,13 @@ void md_swapout_jmpslot __P((jmpslot_t *, int));
#define get_byte(p) ( ((unsigned char *)(p))[0] )
#define get_short(p) ( ( ((unsigned char *)(p))[0] << 8) | \
- ( ((unsigned char *)(p))[1] ) \
+ ( ((unsigned char *)(p))[1] ) \
)
#define get_long(p) ( ( ((unsigned char *)(p))[0] << 24) | \
( ((unsigned char *)(p))[1] << 16) | \
( ((unsigned char *)(p))[2] << 8 ) | \
- ( ((unsigned char *)(p))[3] ) \
+ ( ((unsigned char *)(p))[3] ) \
)
@@ -288,7 +288,7 @@ void md_swapout_jmpslot __P((jmpslot_t *, int));
#define put_short(p, v) { ((unsigned char *)(p))[0] = \
((((unsigned long)(v)) >> 8) & 0xff); \
((unsigned char *)(p))[1] = \
- ((((unsigned long)(v)) ) & 0xff); }
+ ((((unsigned long)(v)) ) & 0xff); }
#define put_long(p, v) { ((unsigned char *)(p))[0] = \
((((unsigned long)(v)) >> 24) & 0xff); \
@@ -297,7 +297,7 @@ void md_swapout_jmpslot __P((jmpslot_t *, int));
((unsigned char *)(p))[2] = \
((((unsigned long)(v)) >> 8) & 0xff); \
((unsigned char *)(p))[3] = \
- ((((unsigned long)(v)) ) & 0xff); }
+ ((((unsigned long)(v)) ) & 0xff); }
#endif /* NEED_SWAP */
diff --git a/gnu/usr.bin/ld/symseg.h b/gnu/usr.bin/ld/symseg.h
index 41f1701e0a2..7cb72a6f4b9 100644
--- a/gnu/usr.bin/ld/symseg.h
+++ b/gnu/usr.bin/ld/symseg.h
@@ -1,4 +1,4 @@
-/* * $OpenBSD: symseg.h,v 1.2 1998/03/26 19:46:28 niklas Exp $*/
+/* * $OpenBSD: symseg.h,v 1.3 2002/07/15 21:05:56 marc Exp $*/
/*-
*
* This code is derived from software copyrighted by the Free Software
@@ -251,7 +251,7 @@ struct block
this pointer may be zero when the correct value should be
the second special block (for symbols whose scope is one compilation).
This is because the compiler ouptuts the special blocks at the
- very end, after the other blocks. */
+ very end, after the other blocks. */
struct block *superblock;
/* Number of local symbols. */
int nsyms;
@@ -307,7 +307,7 @@ enum address_class
and for extern symbols within functions.
Inside GDB, this is changed to LOC_STATIC once the
real address is obtained from a loader symbol. */
- LOC_CONST_BYTES /* Value is a constant byte-sequence. */
+ LOC_CONST_BYTES /* Value is a constant byte-sequence. */
};
struct symbol
@@ -325,7 +325,7 @@ struct symbol
union
{
long value;
- struct block *block; /* for LOC_BLOCK */
+ struct block *block; /* for LOC_BLOCK */
char *bytes; /* for LOC_CONST_BYTES */
}
value;
diff --git a/gnu/usr.bin/ld/vax/md.c b/gnu/usr.bin/ld/vax/md.c
index 31c625078b7..482316d1659 100644
--- a/gnu/usr.bin/ld/vax/md.c
+++ b/gnu/usr.bin/ld/vax/md.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: md.c,v 1.3 1998/05/11 20:27:17 niklas Exp $ */
+/* $OpenBSD: md.c,v 1.4 2002/07/15 21:05:57 marc Exp $ */
/* $NetBSD: md.c,v 1.1 1995/10/19 13:10:19 ragge Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -14,7 +14,7 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Paul Kranenburg.
+ * This product includes software developed by Paul Kranenburg.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
diff --git a/gnu/usr.bin/ld/vax/md.h b/gnu/usr.bin/ld/vax/md.h
index 174004350a9..50d6a700ba9 100644
--- a/gnu/usr.bin/ld/vax/md.h
+++ b/gnu/usr.bin/ld/vax/md.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: md.h,v 1.7 2000/04/30 03:53:35 bjc Exp $ */
+/* $OpenBSD: md.h,v 1.8 2002/07/15 21:05:57 marc Exp $ */
/* $NetBSD: md.h,v 1.1 1995/10/19 13:10:20 ragge Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -14,7 +14,7 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Paul Kranenburg.
+ * This product includes software developed by Paul Kranenburg.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
@@ -154,11 +154,11 @@ typedef struct jmpslot {
#define get_byte(p) ( ((unsigned char *)(p))[0] )
-#define get_short(p) ( ( ((unsigned char *)(p))[0] ) | \
+#define get_short(p) ( ( ((unsigned char *)(p))[0] ) | \
( ((unsigned char *)(p))[1] << 8) \
)
-#define get_long(p) ( ( ((unsigned char *)(p))[0] ) | \
+#define get_long(p) ( ( ((unsigned char *)(p))[0] ) | \
( ((unsigned char *)(p))[1] << 8 ) | \
( ((unsigned char *)(p))[2] << 16) | \
( ((unsigned char *)(p))[3] << 24) \
@@ -167,12 +167,12 @@ typedef struct jmpslot {
#define put_byte(p, v) { ((unsigned char *)(p))[0] = ((unsigned long)(v)); }
#define put_short(p, v) { ((unsigned char *)(p))[0] = \
- ((((unsigned long)(v)) ) & 0xff); \
+ ((((unsigned long)(v)) ) & 0xff); \
((unsigned char *)(p))[1] = \
((((unsigned long)(v)) >> 8) & 0xff); }
#define put_long(p, v) { ((unsigned char *)(p))[0] = \
- ((((unsigned long)(v)) ) & 0xff); \
+ ((((unsigned long)(v)) ) & 0xff); \
((unsigned char *)(p))[1] = \
((((unsigned long)(v)) >> 8) & 0xff); \
((unsigned char *)(p))[2] = \
@@ -210,7 +210,7 @@ void md_swapout_jmpslot __P((jmpslot_t *, int));
#define md_swap_short(x) ( (((x) >> 8) & 0xff) | (((x) & 0xff) << 8) )
-#define md_swap_long(x) ( (((x) >> 24) & 0xff ) | (((x) >> 8 ) & 0xff00 ) | \
+#define md_swap_long(x) ( (((x) >> 24) & 0xff ) | (((x) >> 8 ) & 0xff00 ) | \
(((x) << 8 ) & 0xff0000) | (((x) << 24) & 0xff000000))
#else /* We need not swap, but must pay attention to alignment: */
diff --git a/gnu/usr.bin/ld/warnings.c b/gnu/usr.bin/ld/warnings.c
index 73c5eae4e2d..04aba6f9364 100644
--- a/gnu/usr.bin/ld/warnings.c
+++ b/gnu/usr.bin/ld/warnings.c
@@ -1,4 +1,4 @@
-/* * $OpenBSD: warnings.c,v 1.5 2002/07/10 17:28:16 marc Exp $*/
+/* * $OpenBSD: warnings.c,v 1.6 2002/07/15 21:05:56 marc Exp $*/
/*
*/
@@ -96,7 +96,7 @@ static void list_file_locals __P((struct file_entry *, FILE *));
void
print_symbols(outfile)
- FILE *outfile;
+ FILE *outfile;
{
fprintf(outfile, "\nFiles:\n\n");
each_file(describe_file_sections, (void *)outfile);
@@ -126,7 +126,7 @@ print_symbols(outfile)
static void
describe_file_sections(entry, outfile)
struct file_entry *entry;
- FILE *outfile;
+ FILE *outfile;
{
fprintf(outfile, " ");
print_file_name(entry, outfile);
@@ -341,7 +341,7 @@ init_debug_scan(use_data_symbols, entry)
static int
address_to_line(address, state_pointer)
- unsigned long address;
+ unsigned long address;
/* Next must be passed by reference! */
struct line_debug_entry state_pointer[3];
{
@@ -398,8 +398,8 @@ address_to_line(address, state_pointer)
static void
do_relocation_warnings(entry, data_segment, outfile, nlist_bitvector)
struct file_entry *entry;
- int data_segment;
- FILE *outfile;
+ int data_segment;
+ FILE *outfile;
unsigned char *nlist_bitvector;
{
struct relocation_info *rp, *erp;
@@ -501,7 +501,7 @@ do_relocation_warnings(entry, data_segment, outfile, nlist_bitvector)
/* If errfmt == 0, errmsg has already been defined. */
if (errfmt != 0) {
- char *nm;
+ char *nm;
nm = g->name;
errmsg = (char *)
@@ -574,7 +574,7 @@ do_file_warnings (entry, outfile)
struct nlist *np;
symbol *g;
- g = entry->symbols[i].symbol;
+ g = entry->symbols[i].symbol;
np = &entry->symbols[i].nzlist.nlist;
if (g == NULL)
diff --git a/gnu/usr.bin/ld/xbits.c b/gnu/usr.bin/ld/xbits.c
index 8c3e64b8852..0d7e911738b 100644
--- a/gnu/usr.bin/ld/xbits.c
+++ b/gnu/usr.bin/ld/xbits.c
@@ -1,4 +1,4 @@
-/* * $OpenBSD: xbits.c,v 1.2 1998/03/26 19:46:31 niklas Exp $*/
+/* * $OpenBSD: xbits.c,v 1.3 2002/07/15 21:05:56 marc Exp $*/
/*
* Copyright (c) 1993 Paul Kranenburg
* All rights reserved.
@@ -13,7 +13,7 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Paul Kranenburg.
+ * This product includes software developed by Paul Kranenburg.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*