diff options
Diffstat (limited to 'gnu/usr.bin/ld/vax/md.c')
-rw-r--r-- | gnu/usr.bin/ld/vax/md.c | 66 |
1 files changed, 19 insertions, 47 deletions
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); |