OSDN Git Service

eat extraneous ; and insert some whitespace where it belongs
authorMike Frysinger <vapier@gentoo.org>
Mon, 19 Jun 2006 22:15:42 +0000 (22:15 -0000)
committerMike Frysinger <vapier@gentoo.org>
Mon, 19 Jun 2006 22:15:42 +0000 (22:15 -0000)
12 files changed:
ldso/ldso/arm/dl-sysdep.h
ldso/ldso/arm/elfinterp.c
ldso/ldso/cris/elfinterp.c
ldso/ldso/frv/elfinterp.c
ldso/ldso/ldso.c
ldso/ldso/m68k/elfinterp.c
ldso/ldso/mips/dl-debug.h
ldso/ldso/mips/dl-sysdep.h
ldso/ldso/mips/elfinterp.c
ldso/ldso/powerpc/elfinterp.c
ldso/ldso/sh/elfinterp.c
ldso/ldso/x86_64/elfinterp.c

index 839e927..5935738 100644 (file)
@@ -19,25 +19,25 @@ static inline unsigned long arm_modulus(unsigned long m, unsigned long p)
 {
        unsigned long i,t,inc;
        i=p; t=0;
-       while(!(i&(1<<31))) {
+       while (!(i&(1<<31))) {
                i<<=1;
                t++;
        }
        t--;
-       for(inc=t;inc>2;inc--) {
+       for (inc=t;inc>2;inc--) {
                i=p<<inc;
-               if(i&(1<<31))
+               if (i&(1<<31))
                        break;
-               while(m>=i) {
+               while (m>=i) {
                        m-=i;
                        i<<=1;
-                       if(i&(1<<31))
+                       if (i&(1<<31))
                                break;
-                       if(i<p)
+                       if (i<p)
                                break;
                }
        }
-       while(m>=p) {
+       while (m>=p) {
                m-=p;
        }
        return m;
index 1656264..4ccfba7 100644 (file)
@@ -69,7 +69,7 @@ unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
                _dl_dprintf(2, "%s: Incorrect relocation type in jump relocations\n",
                        _dl_progname);
                _dl_exit(1);
-       };
+       }
 
        /* Address of jump instruction to fix up */
        instr_addr = ((unsigned long) this_reloc->r_offset +
@@ -83,14 +83,14 @@ unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
                _dl_dprintf(2, "%s: can't resolve symbol '%s'\n",
                        _dl_progname, symname);
                _dl_exit(1);
-       };
+       }
 #if defined (__SUPPORT_LD_DEBUG__)
        if ((unsigned long) got_addr < 0x40000000)
        {
                if (_dl_debug_bindings)
                {
                        _dl_dprintf(_dl_debug_file, "\nresolve function: %s", symname);
-                       if(_dl_debug_detail) _dl_dprintf(_dl_debug_file,
+                       if (_dl_debug_detail) _dl_dprintf(_dl_debug_file,
                                        "\tpatch %x ==> %x @ %x", *got_addr, new_addr, got_addr);
                }
        }
@@ -275,7 +275,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
                                return -1; /*call _dl_exit(1) */
                }
 #if defined (__SUPPORT_LD_DEBUG__)
-               if(_dl_debug_reloc && _dl_debug_detail)
+               if (_dl_debug_reloc && _dl_debug_detail)
                        _dl_dprintf(_dl_debug_file, "\tpatch: %x ==> %x @ %x", old_val, *reloc_addr, reloc_addr);
        }
 
@@ -308,7 +308,7 @@ _dl_do_lazy_reloc (struct elf_resolve *tpnt, struct dyn_elf *scope,
                                return -1; /*call _dl_exit(1) */
                }
 #if defined (__SUPPORT_LD_DEBUG__)
-               if(_dl_debug_reloc && _dl_debug_detail)
+               if (_dl_debug_reloc && _dl_debug_detail)
                        _dl_dprintf(_dl_debug_file, "\tpatch: %x ==> %x @ %x", old_val, *reloc_addr, reloc_addr);
        }
 
index abf4167..7c71df8 100644 (file)
@@ -188,7 +188,7 @@ _dl_do_reloc(struct elf_resolve *tpnt, struct dyn_elf *scope,
                if (unlikely(!symbol_addr && ELF32_ST_BIND(symtab[symtab_index].st_info) != STB_WEAK)) {
                        _dl_dprintf(2, "%s: can't resolve symbol '%s'\n", _dl_progname, symname);
                        _dl_exit(1);
-               };
+               }
 
                symbol_addr += rpnt->r_addend;
        }
index 60ba138..958a898 100644 (file)
@@ -95,7 +95,7 @@ _dl_linux_resolver (struct elf_resolve *tpnt, int reloc_entry)
                if (_dl_debug_bindings)
                {
                        _dl_dprintf(_dl_debug_file, "\nresolve function: %s", symname);
-                       if(_dl_debug_detail)
+                       if (_dl_debug_detail)
                                _dl_dprintf(_dl_debug_file, 
                                            "\n\tpatched (%x,%x) ==> (%x,%x) @ %x\n",
                                            got_entry->entry_point, got_entry->got_value,
@@ -276,7 +276,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
                return -1; /*call _dl_exit(1) */
        }
 #if defined (__SUPPORT_LD_DEBUG__)
-       if(_dl_debug_reloc && _dl_debug_detail) {
+       if (_dl_debug_reloc && _dl_debug_detail) {
                _dl_dprintf(_dl_debug_file, "\tpatched: %x ==> %x @ %x", old_val, reloc_value, reloc_addr);
                switch (reloc_type) {
                case R_FRV_FUNCDESC_VALUE:
@@ -331,7 +331,7 @@ _dl_do_lazy_reloc (struct elf_resolve *tpnt,
                                return -1; /*call _dl_exit(1) */
                }
 #if defined (__SUPPORT_LD_DEBUG__)
-       if(_dl_debug_reloc && _dl_debug_detail)
+       if (_dl_debug_reloc && _dl_debug_detail)
                _dl_dprintf(_dl_debug_file, "\tpatched: %x ==> %x @ %x", old_val, reloc_addr->entry_point, reloc_addr);
 #endif
        return 0;
index 26f8770..2234623 100644 (file)
@@ -692,7 +692,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr,
                }
        }
 #ifdef __SUPPORT_LD_DEBUG__
-       if(_dl_debug) {
+       if (_dl_debug) {
                _dl_dprintf(_dl_debug_file, "\nINIT/FINI order and dependencies:\n");
                for (i = 0; i < nlist; i++) {
                        struct init_fini_list *tmp;
@@ -908,7 +908,7 @@ static int _dl_suid_ok(void)
        gid = _dl_getgid();
        egid = _dl_getegid();
 
-       if(uid == euid && gid == egid) {
+       if (uid == euid && gid == egid) {
                return 1;
        }
        return 0;
index e0e1440..8f7364f 100644 (file)
@@ -190,7 +190,7 @@ _dl_do_reloc(struct elf_resolve *tpnt, struct dyn_elf *scope,
                if (unlikely(!symbol_addr && ELF_ST_BIND(sym->st_info) != STB_WEAK)) {
                        _dl_dprintf(2, "%s: can't resolve symbol '%s'\n", _dl_progname, symname);
                        _dl_exit(1);
-               };
+               }
        }
 
 #if defined (__SUPPORT_LD_DEBUG__)
index f2a3865..07a2add 100644 (file)
 
 static const char *_dl_reltypes_tab[] =
 {
-               [0]             "R_MIPS_NONE",  "R_MIPS_16",    "R_MIPS_32",
-               [3]             "R_MIPS_REL32", "R_MIPS_26",    "R_MIPS_HI16",
-               [6]             "R_MIPS_LO16",  "R_MIPS_GPREL16",       "R_MIPS_LITERAL",
-               [9]             "R_MIPS_GOT16", "R_MIPS_PC16",  "R_MIPS_CALL16",
-               [12]    "R_MIPS_GPREL32",
-               [16]    "R_MIPS_SHIFT5",        "R_MIPS_SHIFT6",        "R_MIPS_64",
-               [19]    "R_MIPS_GOT_DISP",      "R_MIPS_GOT_PAGE",      "R_MIPS_GOT_OFST",
-               [22]    "R_MIPS_GOT_HI16",      "R_MIPS_GOT_LO16",      "R_MIPS_SUB",
-               [25]    "R_MIPS_INSERT_A",      "R_MIPS_INSERT_B",      "R_MIPS_DELETE",
-               [28]    "R_MIPS_HIGHER",        "R_MIPS_HIGHEST",       "R_MIPS_CALL_HI16",
-               [31]    "R_MIPS_CALL_LO16",     "R_MIPS_SCN_DISP",      "R_MIPS_REL16",
-               [34]    "R_MIPS_ADD_IMMEDIATE", "R_MIPS_PJUMP", "R_MIPS_RELGOT",
-               [37]    "R_MIPS_JALR",
+       [0]             "R_MIPS_NONE",  "R_MIPS_16",    "R_MIPS_32",
+       [3]             "R_MIPS_REL32", "R_MIPS_26",    "R_MIPS_HI16",
+       [6]             "R_MIPS_LO16",  "R_MIPS_GPREL16",       "R_MIPS_LITERAL",
+       [9]             "R_MIPS_GOT16", "R_MIPS_PC16",  "R_MIPS_CALL16",
+       [12]    "R_MIPS_GPREL32",
+       [16]    "R_MIPS_SHIFT5",        "R_MIPS_SHIFT6",        "R_MIPS_64",
+       [19]    "R_MIPS_GOT_DISP",      "R_MIPS_GOT_PAGE",      "R_MIPS_GOT_OFST",
+       [22]    "R_MIPS_GOT_HI16",      "R_MIPS_GOT_LO16",      "R_MIPS_SUB",
+       [25]    "R_MIPS_INSERT_A",      "R_MIPS_INSERT_B",      "R_MIPS_DELETE",
+       [28]    "R_MIPS_HIGHER",        "R_MIPS_HIGHEST",       "R_MIPS_CALL_HI16",
+       [31]    "R_MIPS_CALL_LO16",     "R_MIPS_SCN_DISP",      "R_MIPS_REL16",
+       [34]    "R_MIPS_ADD_IMMEDIATE", "R_MIPS_PJUMP", "R_MIPS_RELGOT",
+       [37]    "R_MIPS_JALR",
 };
index 77edcd9..5f4dfad 100644 (file)
@@ -19,9 +19,9 @@
 do { \
 if (dpnt->d_tag == DT_MIPS_GOTSYM) \
      dynamic[DT_MIPS_GOTSYM_IDX] = dpnt->d_un.d_val; \
-else if(dpnt->d_tag == DT_MIPS_LOCAL_GOTNO) \
+else if (dpnt->d_tag == DT_MIPS_LOCAL_GOTNO) \
      dynamic[DT_MIPS_LOCAL_GOTNO_IDX] = dpnt->d_un.d_val; \
-else if(dpnt->d_tag == DT_MIPS_SYMTABNO) \
+else if (dpnt->d_tag == DT_MIPS_SYMTABNO) \
      dynamic[DT_MIPS_SYMTABNO_IDX] = dpnt->d_un.d_val; \
 else if (dpnt->d_tag == DT_MIPS_RLD_MAP) \
      *(Elf32_Addr *)(dpnt->d_un.d_ptr) =  (Elf32_Addr) debug_addr; \
index 966e164..d7aae35 100644 (file)
@@ -70,7 +70,7 @@ unsigned long __dl_runtime_resolve(unsigned long sym_index,
        if (_dl_debug_bindings)
        {
                _dl_dprintf(_dl_debug_file, "\nresolve function: %s", symname);
-               if(_dl_debug_detail) _dl_dprintf(_dl_debug_file,
+               if (_dl_debug_detail) _dl_dprintf(_dl_debug_file,
                                "\n\tpatched %x ==> %x @ %x\n", *got_addr, new_addr, got_addr);
        }
        if (!_dl_debug_nofixups) {
@@ -160,11 +160,11 @@ int _dl_parse_relocation_information(struct dyn_elf *xpnt,
 #endif
                                _dl_exit(1);
                        }
-               };
+               }
 
-       };
+       }
 #if defined (__SUPPORT_LD_DEBUG__)
-       if(_dl_debug_reloc && _dl_debug_detail && reloc_addr)
+       if (_dl_debug_reloc && _dl_debug_detail && reloc_addr)
                _dl_dprintf(_dl_debug_file, "\tpatched: %x ==> %x @ %x\n", old_val, *reloc_addr, reloc_addr);
 #endif
 
@@ -193,12 +193,12 @@ void _dl_perform_mips_global_got_relocations(struct elf_resolve *tpnt, int lazy)
                i = tpnt->dynamic_info[DT_MIPS_SYMTABNO_IDX] - tpnt->dynamic_info[DT_MIPS_GOTSYM_IDX];
 
 #if defined (__SUPPORT_LD_DEBUG__)
-               if(_dl_debug_reloc)
+               if (_dl_debug_reloc)
                        _dl_dprintf(2, "_dl_perform_mips_global_got_relocations for '%s'\n", tpnt->libname);
 #endif
                tmp_lazy = lazy && !tpnt->dynamic_info[DT_BIND_NOW];
                /* Relocate the global GOT entries for the object */
-               while(i--) {
+               while (i--) {
                        if (sym->st_shndx == SHN_UNDEF) {
                                if (ELF32_ST_TYPE(sym->st_info) == STT_FUNC && sym->st_value && tmp_lazy) {
                                        *got_entry = sym->st_value + (unsigned long) tpnt->loadaddr;
index d0fa862..d2a1642 100644 (file)
@@ -125,14 +125,14 @@ unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
        if (unlikely(ELF32_R_TYPE(this_reloc->r_info) != R_PPC_JMP_SLOT)) {
                _dl_dprintf(2, "%s: Incorrect relocation type in jump relocation\n", _dl_progname);
                _dl_exit(1);
-       };
+       }
 #endif
 
        /* Address of dump instruction to fix up */
        reloc_addr = (Elf32_Addr *) (tpnt->loadaddr + this_reloc->r_offset);
 
 #if defined (__SUPPORT_LD_DEBUG__)
-       if(_dl_debug_reloc && _dl_debug_detail)
+       if (_dl_debug_reloc && _dl_debug_detail)
                _dl_dprintf(_dl_debug_file, "\n\tResolving symbol %s %x --> ", symname, (Elf32_Addr)reloc_addr);
 #endif
 
@@ -142,10 +142,10 @@ unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
        if (unlikely(!finaladdr)) {
                _dl_dprintf(2, "%s: can't resolve symbol '%s' in lib '%s'.\n", _dl_progname, symname, tpnt->libname);
                _dl_exit(1);
-       };
+       }
        finaladdr += this_reloc->r_addend;
 #if defined (__SUPPORT_LD_DEBUG__)
-       if(_dl_debug_reloc && _dl_debug_detail)
+       if (_dl_debug_reloc && _dl_debug_detail)
                _dl_dprintf(_dl_debug_file, "%x\n", finaladdr);
 #endif
        delta = finaladdr - (Elf32_Word)reloc_addr;
@@ -246,7 +246,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
        }
        case R_PPC_COPY:
 #if defined (__SUPPORT_LD_DEBUG__)
-               if(_dl_debug_move)
+               if (_dl_debug_move)
                        _dl_dprintf(_dl_debug_file,"\n%s move %x bytes from %x to %x",
                                    symname, symtab[symtab_index].st_size,
                                    symbol_addr, reloc_addr);
@@ -264,7 +264,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
 #if 0
                {
                        Elf32_Sword delta = finaladdr - (Elf32_Word)reloc_addr;
-                       if(unlikely(delta<<6>>6 != delta)) {
+                       if (unlikely(delta<<6>>6 != delta)) {
                                _dl_dprintf(2, "%s: symbol '%s' R_PPC_REL24 is out of range.\n\t"
                                                "Compile shared libraries with -fPIC!\n",
                                                _dl_progname, symname);
@@ -287,7 +287,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
                if (symtab_index)
                        _dl_dprintf(2, "'%s'\n", symname);
                return -1;
-       };
+       }
 
        /* instructions were modified */
        PPC_DCBST(reloc_addr);
@@ -296,7 +296,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
        PPC_ISYNC;
  out_nocode:
 #if defined (__SUPPORT_LD_DEBUG__)
-       if(_dl_debug_reloc && _dl_debug_detail)
+       if (_dl_debug_reloc && _dl_debug_detail)
                _dl_dprintf(_dl_debug_file, "\tpatched: %x ==> %x @ %x", old_val, *reloc_addr, reloc_addr);
 #endif
        return 0;
index b37bf12..c34acdf 100644 (file)
@@ -87,7 +87,7 @@ unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
        if ((unsigned long) got_addr < 0x20000000) {
                if (_dl_debug_bindings) {
                        _dl_dprintf(_dl_debug_file, "\nresolve function: %s", symname);
-                       if(_dl_debug_detail) _dl_dprintf(_dl_debug_file,
+                       if (_dl_debug_detail) _dl_dprintf(_dl_debug_file,
                                        "\n\tpatched %x ==> %x @ %x\n", *got_addr, new_addr, got_addr);
                }
        }
@@ -198,7 +198,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
                case R_SH_COPY:
                        if (symbol_addr) {
 #if defined (__SUPPORT_LD_DEBUG__)
-                               if(_dl_debug_move)
+                               if (_dl_debug_move)
                                        _dl_dprintf(_dl_debug_file,"\n%s move %x bytes from %x to %x",
                                                    symname, symtab[symtab_index].st_size,
                                                    symbol_addr, reloc_addr);
@@ -222,7 +222,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
                        return -1; /*call _dl_exit(1) */
        }
 #if defined (__SUPPORT_LD_DEBUG__)
-           if(_dl_debug_reloc && _dl_debug_detail)
+           if (_dl_debug_reloc && _dl_debug_detail)
                _dl_dprintf(_dl_debug_file, "\tpatched: %x ==> %x @ %x", old_val, *reloc_addr, reloc_addr);
 #endif
 
@@ -259,7 +259,7 @@ _dl_do_lazy_reloc (struct elf_resolve *tpnt, struct dyn_elf *scope,
                        return -1; /*call _dl_exit(1) */
        }
 #if defined (__SUPPORT_LD_DEBUG__)
-       if(_dl_debug_reloc && _dl_debug_detail)
+       if (_dl_debug_reloc && _dl_debug_detail)
                _dl_dprintf(_dl_debug_file, "\tpatched: %x ==> %x @ %x", old_val, *reloc_addr, reloc_addr);
 #endif
        return 0;
index ef0fcb4..e78a809 100644 (file)
@@ -190,7 +190,7 @@ _dl_do_reloc(struct elf_resolve *tpnt, struct dyn_elf *scope,
                if (unlikely(!symbol_addr && ELF_ST_BIND(sym->st_info) != STB_WEAK)) {
                        _dl_dprintf(2, "%s: can't resolve symbol '%s'\n", _dl_progname, symname);
                        _dl_exit(1);
-               };
+               }
        }
 
 #if defined (__SUPPORT_LD_DEBUG__)