summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/ld/rrs.c
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/rrs.c
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/rrs.c')
-rw-r--r--gnu/usr.bin/ld/rrs.c85
1 files changed, 28 insertions, 57 deletions
diff --git a/gnu/usr.bin/ld/rrs.c b/gnu/usr.bin/ld/rrs.c
index 29fc410cf3f..489637d8623 100644
--- a/gnu/usr.bin/ld/rrs.c
+++ b/gnu/usr.bin/ld/rrs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rrs.c,v 1.8 2002/07/15 21:05:56 marc Exp $*/
+/* $OpenBSD: rrs.c,v 1.9 2002/07/19 19:28:11 marc Exp $*/
/*
* Copyright (c) 1993 Paul Kranenburg
* All rights reserved.
@@ -146,7 +146,7 @@ RRS data segment:
*/
static int
-dlopen_is_used()
+dlopen_is_used(void)
{
symbol *sym;
struct localsymbol *lsp;
@@ -175,8 +175,7 @@ dlopen_is_used()
* Return 1 if ENTRY was added to the list.
*/
int
-rrs_add_shobj(entry)
- struct file_entry *entry;
+rrs_add_shobj(struct file_entry *entry)
{
struct shobj **p;
@@ -192,9 +191,7 @@ rrs_add_shobj(entry)
}
void
-alloc_rrs_reloc(entry, sp)
- struct file_entry *entry;
- symbol *sp;
+alloc_rrs_reloc(struct file_entry *entry, symbol *sp)
{
#ifdef DEBUG
printf("alloc_rrs_reloc: %s in %s\n", sp->name, get_file_name(entry));
@@ -203,9 +200,7 @@ printf("alloc_rrs_reloc: %s in %s\n", sp->name, get_file_name(entry));
}
void
-alloc_rrs_segment_reloc(entry, r)
- struct file_entry *entry;
- struct relocation_info *r;
+alloc_rrs_segment_reloc(struct file_entry *entry, struct relocation_info *r)
{
#ifdef DEBUG
printf("alloc_rrs_segment_reloc at %#x in %s\n",
@@ -215,9 +210,7 @@ printf("alloc_rrs_segment_reloc at %#x in %s\n",
}
void
-alloc_rrs_jmpslot(entry, sp)
- struct file_entry *entry;
- symbol *sp;
+alloc_rrs_jmpslot(struct file_entry *entry, symbol *sp)
{
if (sp->flags & GS_HASJMPSLOT)
return;
@@ -228,10 +221,8 @@ alloc_rrs_jmpslot(entry, sp)
}
void
-alloc_rrs_gotslot(entry, r, lsp)
- struct file_entry *entry;
- struct relocation_info *r;
- struct localsymbol *lsp;
+alloc_rrs_gotslot(struct file_entry *entry, struct relocation_info *r,
+ struct localsymbol *lsp)
{
symbol *sp = lsp->symbol;
@@ -276,9 +267,7 @@ alloc_rrs_gotslot(entry, r, lsp)
}
void
-alloc_rrs_cpy_reloc(entry, sp)
- struct file_entry *entry;
- symbol *sp;
+alloc_rrs_cpy_reloc(struct file_entry *entry, symbol *sp)
{
if (sp->flags & GS_CPYRELOCRESERVED)
return;
@@ -290,7 +279,7 @@ printf("alloc_rrs_copy: %s in %s\n", sp->name, get_file_name(entry));
}
static struct relocation_info *
-rrs_next_reloc()
+rrs_next_reloc(void)
{
struct relocation_info *r;
@@ -307,7 +296,7 @@ static unsigned long total_text_relocs = 0;
/* called at cleanup time */
void
-rrs_summarize_warnings()
+rrs_summarize_warnings(void)
{
if (total_text_relocs >= TEXT_RELOC_THRESHOLD)
warnx("Total: %lu RRS text relocations",
@@ -323,11 +312,8 @@ rrs_summarize_warnings()
* written to a.out.
*/
int
-claim_rrs_reloc(entry, rp, sp, relocation)
- struct file_entry *entry;
- struct relocation_info *rp;
- symbol *sp;
- long *relocation;
+claim_rrs_reloc(struct file_entry *entry, struct relocation_info *rp,
+ symbol *sp, long *relocation)
{
struct relocation_info *r = rrs_next_reloc();
@@ -360,11 +346,8 @@ printf("claim_rrs_reloc: %s in %s\n", sp->name, get_file_name(entry));
* Claim a jmpslot. Setup RRS relocation if claimed for the first time.
*/
long
-claim_rrs_jmpslot(entry, rp, sp, addend)
- struct file_entry *entry;
- struct relocation_info *rp;
- symbol *sp;
- long addend;
+claim_rrs_jmpslot(struct file_entry *entry, struct relocation_info *rp,
+ symbol *sp, long addend)
{
struct relocation_info *r;
@@ -431,11 +414,8 @@ printf("claim_rrs_jmpslot: %s: %s(%d) -> offset %x\n",
* Return offset into the GOT allocated to this symbol.
*/
long
-claim_rrs_gotslot(entry, rp, lsp, addend)
- struct file_entry *entry;
- struct relocation_info *rp;
- struct localsymbol *lsp;
- long addend;
+claim_rrs_gotslot(struct file_entry *entry, struct relocation_info *rp,
+ struct localsymbol *lsp, long addend)
{
struct relocation_info *r;
symbol *sp = lsp->symbol;
@@ -549,11 +529,8 @@ printf("claim_rrs_gotslot: %s(%d,%#x) slot offset %#x, addend %#x\n",
* the GOT.
*/
long
-claim_rrs_internal_gotslot(entry, rp, lsp, addend)
- struct file_entry *entry;
- struct relocation_info *rp;
- struct localsymbol *lsp;
- long addend;
+claim_rrs_internal_gotslot(struct file_entry *entry, struct relocation_info *rp,
+ struct localsymbol *lsp, long addend)
{
struct relocation_info *r;
@@ -609,10 +586,8 @@ printf("claim_rrs_internal_gotslot: %s: slot offset %#x, addend = %#x\n",
}
void
-claim_rrs_cpy_reloc(entry, rp, sp)
- struct file_entry *entry;
- struct relocation_info *rp;
- symbol *sp;
+claim_rrs_cpy_reloc(struct file_entry *entry, struct relocation_info *rp,
+ symbol *sp)
{
struct relocation_info *r;
@@ -638,9 +613,7 @@ printf("claim_rrs_copy: %s: %s -> %x\n",
}
void
-claim_rrs_segment_reloc(entry, rp)
- struct file_entry *entry;
- struct relocation_info *rp;
+claim_rrs_segment_reloc(struct file_entry *entry, struct relocation_info *rp)
{
struct relocation_info *r = rrs_next_reloc();
@@ -661,9 +634,7 @@ printf("claim_rrs_segment_reloc: %s at %#x\n",
* NOTE: the hash value computation must match the one in rtld.
*/
void
-rrs_insert_hash(cp, index)
- char *cp;
- int index;
+rrs_insert_hash(char *cp, int index)
{
int hashval = 0;
struct rrs_hash *hp;
@@ -702,7 +673,7 @@ rrs_insert_hash(cp, index)
* goes into a.out.
*/
void
-consider_rrs_section_lengths()
+consider_rrs_section_lengths(void)
{
int n;
struct shobj *shp, **shpp;
@@ -886,7 +857,7 @@ consider_rrs_section_lengths()
}
void
-relocate_rrs_addresses()
+relocate_rrs_addresses(void)
{
int gotsize;
@@ -977,7 +948,7 @@ relocate_rrs_addresses()
}
void
-write_rrs_data()
+write_rrs_data(void)
{
long pos;
@@ -1019,7 +990,7 @@ write_rrs_data()
}
void
-write_rrs_text()
+write_rrs_text(void)
{
long pos;
int i;
@@ -1268,7 +1239,7 @@ write_rrs_text()
}
void
-write_rrs()
+write_rrs(void)
{
/*