发信人: huanghwh(五云人)
整理人: hackerbay(2002-09-06 16:48:52), 站内信件
|
【 在 huanghwh 的大作中提到:】
:【 在 ebiss 的大作中提到:】
::你好厉害
::据说编译这个东西,要6G硬盘 :)
::......
:-g才要这么多.
:......
系统补丁可以这样打,不需要make world了:
from [email protected]
1.) Apply the patch
2.) cd /src/libexec/rtld-elf/
3.) make depend && make && make install
4.) cd /usr/ports/editors/openoffice
5.) make deinstall, make reinstall
Martin
Index: i386/reloc.c
===================================================================
RCS file: /home/ncvs/src/libexec/rtld-elf/i386/reloc.c,v
retrieving revision 1.6.2.1
diff -u -r1.6.2.1 reloc.c
--- i386/reloc.c 11 May 2001 00:57:25 -0000 1.6.2.1
+++ i386/reloc.c 9 Jun 2002 22:34:09 -0000
@@ -115,10 +115,18 @@
const Elf_Rel *rellim;
const Elf_Rel *rel;
SymCache *cache;
+ int bytes = obj->nchains * sizeof(SymCache);
+ int r = -1;
- cache = (SymCache *)alloca(obj->nchains * sizeof(SymCache));
+ /*
+ * 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;
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 +145,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 +164,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 +182,7 @@
if (!obj->mainprog) {
_rtld_error("%s: Unexpected R_386_COPY relocation"
" in shared library", obj->path);
- return -1;
+ goto done;
}
break;
@@ -186,7 +194,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 +208,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. */
|
|