summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/ld/vax
diff options
context:
space:
mode:
authorMarco S Hyman <marc@cvs.openbsd.org>2002-07-19 19:28:13 +0000
committerMarco S Hyman <marc@cvs.openbsd.org>2002-07-19 19:28:13 +0000
commit4949dbe071951e4093685c0e84a63dc5451eca45 (patch)
tree531eb3504f538dd7365ed53dd7799f381ed067ea /gnu/usr.bin/ld/vax
parent2cb47dcca29852637cb080135bb980889a2e08f4 (diff)
convert functions from K&R style to prototype style.
Function arg types have not yet been fixed. OK fgs@, espie@
Diffstat (limited to 'gnu/usr.bin/ld/vax')
-rw-r--r--gnu/usr.bin/ld/vax/md-static-funcs.c11
-rw-r--r--gnu/usr.bin/ld/vax/md.c66
2 files changed, 23 insertions, 54 deletions
diff --git a/gnu/usr.bin/ld/vax/md-static-funcs.c b/gnu/usr.bin/ld/vax/md-static-funcs.c
index bac3ef8f340..c156eee51bf 100644
--- a/gnu/usr.bin/ld/vax/md-static-funcs.c
+++ b/gnu/usr.bin/ld/vax/md-static-funcs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: md-static-funcs.c,v 1.1 1996/07/27 10:39:58 maja Exp $ */
+/* $OpenBSD: md-static-funcs.c,v 1.2 2002/07/19 19:28:12 marc Exp $ */
/* $NetBSD: md-static-funcs.c,v 1.1 1995/10/19 13:10:17 ragge Exp $ */
/*
* Called by ld.so when onanating.
@@ -6,12 +6,9 @@
*/
static void
-md_relocate_simple(r, relocation, addr)
-struct relocation_info *r;
-long relocation;
-char *addr;
+md_relocate_simple(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/vax/md.c b/gnu/usr.bin/ld/vax/md.c
index 482316d1659..eb8797cdafa 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.4 2002/07/15 21:05:57 marc Exp $ */
+/* $OpenBSD: md.c,v 1.5 2002/07/19 19:28:12 marc Exp $ */
/* $NetBSD: md.c,v 1.1 1995/10/19 13:10:19 ragge Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -49,9 +49,7 @@
* from address ADDR
*/
long
-md_get_addend(rp, addr)
-struct relocation_info *rp;
-unsigned char *addr;
+md_get_addend(struct relocation_info *rp, unsigned char *addr)
{
switch (RELOC_TARGET_SIZE(rp)) {
case 0:
@@ -70,11 +68,8 @@ unsigned char *addr;
* Put RELOCATION at ADDR according to relocation record RP.
*/
void
-md_relocate(rp, relocation, addr, relocatable_output)
-struct relocation_info *rp;
-long relocation;
-unsigned char *addr;
-int relocatable_output;
+md_relocate(struct relocation_info *rp, long relocation, unsigned char *addr,
+ int relocatable_output)
{
switch (RELOC_TARGET_SIZE(rp)) {
case 0:
@@ -97,9 +92,7 @@ int relocatable_output;
* Set RRS relocation type.
*/
int
-md_make_reloc(rp, r, type)
-struct relocation_info *rp, *r;
-int type;
+md_make_reloc(struct relocation_info *rp, struct relocation_info *r, int type)
{
/* Relocation size */
r->r_length = rp->r_length;
@@ -121,10 +114,7 @@ int type;
* to the binder slot (which is at offset 0 of the PLT).
*/
void
-md_make_jmpslot(sp, offset, index)
-jmpslot_t *sp;
-long offset;
-long index;
+md_make_jmpslot(jmpslot_t *sp, long offset, long index)
{
/*
* On VAX a branch offset given in immediate mode is relative to
@@ -150,10 +140,7 @@ long index;
* further RRS relocations will be necessary for such a jmpslot.
*/
void
-md_fix_jmpslot(sp, offset, addr)
-jmpslot_t *sp;
-long offset;
-u_long addr;
+md_fix_jmpslot(jmpslot_t *sp, long offset, u_long addr)
{
u_long fudge = addr - (sizeof(sp->opcode) + sizeof(sp->addr) + offset);
@@ -171,9 +158,8 @@ u_long addr;
* Update the relocation record for a RRS jmpslot.
*/
void
-md_make_jmpreloc(rp, r, type)
-struct relocation_info *rp, *r;
-int type;
+md_make_jmpreloc(struct relocation_info *rp, struct relocation_info *r,
+ int type)
{
jmpslot_t *sp;
@@ -197,9 +183,8 @@ int type;
* Set relocation type for a RRS GOT relocation.
*/
void
-md_make_gotreloc(rp, r, type)
-struct relocation_info *rp, *r;
-int type;
+md_make_gotreloc(struct relocation_info *rp, struct relocation_info *r,
+ int type)
{
r->r_baserel = 1;
if (type & RELTYPE_RELATIVE)
@@ -213,8 +198,7 @@ int type;
* Set relocation type for a RRS copy operation.
*/
void
-md_make_cpyreloc(rp, r)
-struct relocation_info *rp, *r;
+md_make_cpyreloc(struct relocation_info *rp, struct relocation_info *r)
{
/* Relocation size */
r->r_length = 2;
@@ -223,9 +207,7 @@ struct relocation_info *rp, *r;
}
void
-md_set_breakpoint(where, savep)
-long where;
-long *savep;
+md_set_breakpoint(long where, long *savep)
{
*savep = *(long *)where;
*(char *)where = TRAP; /* !!! fixit !!! */
@@ -242,9 +224,7 @@ int netzmagic;
* obtained from subsequent N_*() macro evaluations.
*/
void
-md_init_header(hp, magic, flags)
-struct exec *hp;
-int magic, flags;
+md_init_header(struct exec *hp, int magic, int flags)
{
#if defined(__NetBSD__) || defined(__OpenBSD__)
if (oldmagic || magic == QMAGIC)
@@ -274,8 +254,7 @@ int magic, flags;
*/
void
-md_swapin_exec_hdr(h)
-struct exec *h;
+md_swapin_exec_hdr(struct exec *h)
{
int skip = 0;
@@ -286,8 +265,7 @@ struct exec *h;
}
void
-md_swapout_exec_hdr(h)
-struct exec *h;
+md_swapout_exec_hdr(struct exec *h)
{
/* NetBSD/OpenBSD: Always leave magic alone */
int skip = 1;
@@ -301,9 +279,7 @@ struct exec *h;
void
-md_swapin_reloc(r, n)
-struct relocation_info *r;
-int n;
+md_swapin_reloc(struct relocation_info *r, int n)
{
int bits;
@@ -324,9 +300,7 @@ int n;
}
void
-md_swapout_reloc(r, n)
-struct relocation_info *r;
-int n;
+md_swapout_reloc(struct relocation_info *r, int n)
{
int bits;
@@ -347,9 +321,7 @@ int n;
}
void
-md_swapout_jmpslot(j, n)
-jmpslot_t *j;
-int n;
+md_swapout_jmpslot(jmpslot_t *j, int n)
{
for (; n; n--, j++) {
j->opcode = md_swap_short(j->opcode);