summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/ld/sparc/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/ld/sparc/md.c')
-rw-r--r--gnu/usr.bin/ld/sparc/md.c72
1 files changed, 21 insertions, 51 deletions
diff --git a/gnu/usr.bin/ld/sparc/md.c b/gnu/usr.bin/ld/sparc/md.c
index aec03c36294..78a8ad4ab71 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.9 2002/07/15 21:05:57 marc Exp $*/
+/* * $OpenBSD: md.c,v 1.10 2002/07/19 19:28:12 marc Exp $*/
/*
* Copyright (c) 1993 Paul Kranenburg
* All rights reserved.
@@ -89,8 +89,7 @@ static int reloc_target_bitsize[] = {
};
static __inline void
-iflush(sp)
- jmpslot_t *sp;
+iflush(jmpslot_t *sp)
{
/* for a CROSS_LINKER, no rtld, so iflush is a nop, which is fortunate */
#ifndef CROSS_LINKER
@@ -105,19 +104,14 @@ iflush(sp)
* ADDR unused by SPARC impl.
*/
long
-md_get_addend(r, addr)
- struct relocation_info *r;
- unsigned char *addr;
+md_get_addend(struct relocation_info *r, unsigned char *addr)
{
return r->r_addend;
}
void
-md_relocate(r, relocation, addr, relocatable_output)
- struct relocation_info *r;
- long relocation;
- unsigned char *addr;
- int relocatable_output;
+md_relocate(struct relocation_info *r, long relocation, unsigned char *addr,
+ int relocatable_output)
{
unsigned long mask;
@@ -176,9 +170,7 @@ md_relocate(r, relocation, addr, relocatable_output)
* On the Sparc the relocation offsets are stored in the r_addend member.
*/
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)
{
r->r_type = rp->r_type;
r->r_addend = rp->r_addend;
@@ -208,10 +200,7 @@ md_make_reloc(rp, r, 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)
{
u_long fudge = (u_long) -(sizeof(sp->opcode1) + offset);
sp->opcode1 = SAVE;
@@ -231,10 +220,7 @@ md_make_jmpslot(sp, offset, index)
* OFFSET unused on Sparc.
*/
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)
{
/*
* Here comes a RELOC_{LO10,HI22} relocation pair
@@ -253,9 +239,8 @@ md_fix_jmpslot(sp, offset, addr)
* Update the relocation record for a 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)
{
if (type & RELTYPE_RELATIVE)
r->r_type = RELOC_RELATIVE;
@@ -269,9 +254,8 @@ md_make_jmpreloc(rp, r, type)
* Set relocation type for a GOT RRS 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)
{
/*
* GOT value resolved (symbolic or entry point): R_32
@@ -291,17 +275,14 @@ md_make_gotreloc(rp, r, 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)
{
r->r_type = RELOC_COPY_DAT;
r->r_addend = 0;
}
void
-md_set_breakpoint(where, savep)
- long where;
- long *savep;
+md_set_breakpoint(long where, long *savep)
{
*savep = *(long *)where;
*(long *)where = TRAP;
@@ -313,9 +294,7 @@ md_set_breakpoint(where, savep)
* 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__)
N_SETMAGIC((*hp), magic, MID_MACHINE, flags);
@@ -339,8 +318,7 @@ md_init_header(hp, magic, flags)
* Check for acceptable foreign machine Ids
*/
int
-md_midcompat(hp)
- struct exec *hp;
+md_midcompat(struct exec *hp)
{
#if defined(__NetBSD__) || defined(__OpenBSD__)
#define SUN_M_SPARC 3
@@ -357,8 +335,7 @@ md_midcompat(hp)
*/
void
-md_swapin_exec_hdr(h)
-struct exec *h;
+md_swapin_exec_hdr(struct exec *h)
{
int skip = 0;
@@ -369,8 +346,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;
@@ -383,9 +359,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;
@@ -400,9 +374,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;
@@ -417,9 +389,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->opcode1 = md_swap_long(j->opcode1);