diff options
author | ab196087 <none@none> | 2007-10-05 09:04:23 -0700 |
---|---|---|
committer | ab196087 <none@none> | 2007-10-05 09:04:23 -0700 |
commit | f3324781c875e2f9865c291e43f86ee710b0c145 (patch) | |
tree | e40126b8346b53e3502d08b7e962e34e44e77fb4 /usr/src/uts/sparc/krtld/kobj_reloc.c | |
parent | 8259acd8641e32a891a4ad20a6479c529bb052c3 (diff) | |
download | illumos-gate-f3324781c875e2f9865c291e43f86ee710b0c145.tar.gz |
6610591 do_reloc() should not require unused arguments
Diffstat (limited to 'usr/src/uts/sparc/krtld/kobj_reloc.c')
-rw-r--r-- | usr/src/uts/sparc/krtld/kobj_reloc.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/usr/src/uts/sparc/krtld/kobj_reloc.c b/usr/src/uts/sparc/krtld/kobj_reloc.c index fd3846a383..eda18f35a1 100644 --- a/usr/src/uts/sparc/krtld/kobj_reloc.c +++ b/usr/src/uts/sparc/krtld/kobj_reloc.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -173,7 +173,7 @@ do_relocate( #ifdef KOBJ_DEBUG if (kobj_debug & D_RELOCATIONS) { _kobj_printf(ops, "krtld:\ttype\t\t\toffset\t addend" - " symbol\n"); + " symbol\n"); _kobj_printf(ops, "krtld:\t\t\t\t\t value\n"); } #endif @@ -191,9 +191,9 @@ do_relocate( for (i = 0; i < mp->hdr.e_shnum; i++, shp++) { if (shp->sh_addr == baseaddr) { if ((shp->sh_flags & SHF_ALLOC) && - !(shp->sh_flags & SHF_WRITE)) + !(shp->sh_flags & SHF_WRITE)) destination = (Addr)mp->destination + - (baseaddr - (Addr)mp->text); + (baseaddr - (Addr)mp->text); break; } } @@ -256,7 +256,7 @@ do_relocate( * value is base address of this object */ symref = (Sym *) - (mp->symtbl+(stndx * mp->symhdr->sh_entsize)); + (mp->symtbl+(stndx * mp->symhdr->sh_entsize)); if (ELF_ST_BIND(symref->st_info) == STB_LOCAL) { /* *** this is different for .o and .so */ value = symref->st_value; @@ -276,11 +276,8 @@ do_relocate( if (symref->st_shndx == SHN_UNDEF && tnf_reloc_resolve(mp->strings + - symref->st_name, &symref->st_value, - &addend, - off, - &probelist, - &taglist) != 0) { + symref->st_name, &symref->st_value, + &addend, off, &probelist, &taglist) != 0) { if (ELF_ST_BIND(symref->st_info) != STB_WEAK) { _kobj_printf(ops, @@ -304,7 +301,7 @@ do_relocate( value += addend; if (IS_EXTOFFSET(rtype)) { value += - (Word) ELF_R_TYPE_DATA(((Rela *)reladdr)->r_info); + (Word) ELF_R_TYPE_DATA(((Rela *)reladdr)->r_info); } /* @@ -324,9 +321,9 @@ do_relocate( _kobj_printf(ops, " 0x%8llx\n", value); } #endif - if (do_reloc(rtype, (unsigned char *)off, (Xword *)&value, + if (do_reloc_krtld(rtype, (unsigned char *)off, (Xword *)&value, (const char *)mp->strings + symref->st_name, - mp->filename, 0) == 0) + mp->filename) == 0) err = 1; } /* end of while loop */ @@ -349,7 +346,7 @@ do_relocations(struct module *mp) /* do the relocations */ for (shn = 1; shn < mp->hdr.e_shnum; shn++) { rshp = (Shdr *) - (mp->shdrs + shn * mp->hdr.e_shentsize); + (mp->shdrs + shn * mp->hdr.e_shentsize); if (rshp->sh_type == SHT_REL) { _kobj_printf(ops, "%s can't process type SHT_REL\n", mp->filename); @@ -381,7 +378,7 @@ do_relocations(struct module *mp) #ifdef KOBJ_DEBUG if (kobj_debug & D_RELOCATIONS) { _kobj_printf(ops, "krtld: relocating: file=%s ", - mp->filename); + mp->filename); _kobj_printf(ops, " section=%d\n", shn); } #endif |