Главная страница


ru.unix.bsd

 
 - RU.UNIX.BSD ------------------------------------------------------------------
 From : Eugeny A. Krestnikoff                2:5020/400     29 Jul 2002  01:04:56
 To : Alexander Kabaev
 Subject : Re: OO 1.0 for BSD
 -------------------------------------------------------------------------------- 
 
 Alexander Kabaev <ak03@gte.com> изрек:
 
 >
 > Я в принципе не знаю, что есть 4.6-RELEASE-p1. И знать не желаю, пока по
 > долгу службы не понадобится. Версия lockdflt.c из rtld-elf - более точный 
 > указатель.
 >
 
 Дык, на время написания мессаги система была обновлена - так что теперь
 наверное не смогу сказать, надо глядеть в cvs'web.... кстати именно
 их я и патчил согласно инструкциям из Makefile editors/openoffice:
 
 ===== begin rtld-elf.diff ========================================
 Patch made by Matt Dillon <dillon@freebsd.org>
 
 This patch fixes the soffice install. If you get a message
 about missing files during user installation, your system
 is affected and you have to install this patch.
 
 1.) Apply the patch: cd /usr/src && patch < rtld-elf.diff
 2.) cd /usr/src/libexec/rtld-elf
 3.) make depend && make && make install
 
 If you have questions, contact Martin Blapp <mbr@freebsd.org>
 
 - --- libexec/rtld-elf/i386/reloc.c.orig  Mon Jun 10 13:16:37 2002
 +++ libexec/rtld-elf/i386/reloc.c  Mon Jun 10 13:39:56 2002
 @@ -115,10 +115,19 @@
    const Elf_Rel *rellim;
    const Elf_Rel *rel;
    SymCache *cache;
 +  int bytes = obj->nchains * sizeof(SymCache);
 +  int r = -1;
 +
 +  /*
 +   * The dynamic loader may be called from a thread, we have
 +         * limited amounts of stack available so we cannot use alloca().
 +         */
 +  cache = mmap(NULL, bytes, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0);
 +  if (cache == MAP_FAILED)
 +     cache = NULL;
  
 -  cache = (SymCache *)alloca(obj->nchains * sizeof(SymCache));
    if (cache != NULL)
 -      memset(cache, 0, obj->nchains * sizeof(SymCache));
 +     memset(cache, 0, bytes);
  
    rellim = (const Elf_Rel *) ((caddr_t) obj->rel + obj->relsize);
    for (rel = obj->rel;  rel < rellim;  rel++) {
 @@ -137,7 +146,7 @@
           def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj,
             false, cache);
           if (def == NULL)
 -      return -1;
 +      goto done;
  
           *where += (Elf_Addr) (defobj->relocbase + def->st_value);
       }
 @@ -156,7 +165,7 @@
           def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj,
             false, cache);
           if (def == NULL)
 -      return -1;
 +      goto done;
  
           *where +=
             (Elf_Addr) (defobj->relocbase + def->st_value) -
 @@ -174,7 +183,7 @@
       if (!obj->mainprog) {
           _rtld_error("%s: Unexpected R_386_COPY relocation"
             " in shared library", obj->path);
 -         return -1;
 +      goto done;
       }
       break;
  
 @@ -186,7 +195,7 @@
           def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj,
             false, cache);
           if (def == NULL)
 -      return -1;
 +      goto done;
  
           *where = (Elf_Addr) (defobj->relocbase + def->st_value);
       }
 @@ -200,10 +209,14 @@
       _rtld_error("%s: Unsupported relocation type %d"
         " in non-PLT relocations\n", obj->path,
         ELF_R_TYPE(rel->r_info));
 -     return -1;
 +     goto done;
        }
    }
 -    return 0;
 +  if (cache)
 +     munmap(cache, bytes);
 +  r = 0;
 +  done:
 +     return(r);
  }
  
  /* Process the PLT relocations. */
 ===== end rtld-elf.diff ========================================
 
 ===== begin rtld-elf-patch2.diff ===============================
 - --- libexec/rtld-elf/i386/lockdflt.c.orig   Fri Jul  5 00:17:27 2002
 +++ libexec/rtld-elf/i386/lockdflt.c  Fri Jul  5 00:17:58 2002
 @@ -191,7 +191,6 @@
    if (cmpxchgl(0, WAFLAG, &l->lock) == 0)
        break;
    sigprocmask(SIG_SETMASK, &tmp_oldsigmask, NULL);
 -  nanosleep(&usec, NULL);
      }
      oldsigmask = tmp_oldsigmask;
  }
 ===== end rtld-elf-patch2.diff ===============================
 
 -- 
 *** Eugeny A. Krestnikoff - человек без паспорта ***
 --- ifmail v.2.15dev5
  * Origin: node SVYAZ (2:5020/400)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 Re: OO 1.0 for BSD   Alexander Kabaev   23 Jul 2002 18:07:42 
 Re: OO 1.0 for BSD   Eugeny A. Krestnikoff   23 Jul 2002 23:48:22 
 Re: OO 1.0 for BSD   Alexander Kabaev   25 Jul 2002 21:06:47 
 Re: OO 1.0 for BSD   Eugeny A. Krestnikoff   29 Jul 2002 01:04:56 
Архивное /ru.unix.bsd/27535e708d411.html, оценка 3 из 5, голосов 10
Яндекс.Метрика
Valid HTML 4.01 Transitional