diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-12-22 13:32:52 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-12-22 13:32:52 +0000 |
commit | 00e6076b8410f18082a2dd67a91602fd27401d1c (patch) | |
tree | c128998290a7a44daf2d0d4ecb3c51e3845e8b86 /lib/csu | |
parent | 94c4048344f679c87d3142218d32dd8f2aad5a6c (diff) |
When skipping a relocation because the referenced symbol is undefined, make
sure we move on to the next relocation entry.
While there, also skip relocations for REL architectures.
Diffstat (limited to 'lib/csu')
-rw-r--r-- | lib/csu/boot.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/csu/boot.h b/lib/csu/boot.h index a5422d4cf15..60d778ef037 100644 --- a/lib/csu/boot.h +++ b/lib/csu/boot.h @@ -1,4 +1,4 @@ -/* $OpenBSD: boot.h,v 1.1 2014/12/22 03:51:08 kurt Exp $ */ +/* $OpenBSD: boot.h,v 1.2 2014/12/22 13:32:51 kettenis Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -172,7 +172,7 @@ _dl_boot_bind(const long sp, long *dl_data, Elf_Dyn *dynamicp) rp = (Elf_Rel *)(dynld.Dyn.info[DT_REL]); rs = dynld.dyn.relsz; - for (i = 0; i < rs; i += sizeof (Elf_Rel)) { + for (i = 0; i < rs; i += sizeof (Elf_Rel), rp++) { Elf_Addr *ra; const Elf_Sym *sp; @@ -187,12 +187,15 @@ _dl_boot_bind(const long sp, long *dl_data, Elf_Dyn *dynamicp) _dl_wrstderr((char *)dynld.dyn.strtab + sp->st_name); #endif +#ifdef RCRT0 + continue; +#else _dl_exit(5); +#endif } ra = (Elf_Addr *)(rp->r_offset + loff); RELOC_REL(rp, sp, ra, loff); - rp++; } } @@ -214,7 +217,7 @@ _dl_boot_bind(const long sp, long *dl_data, Elf_Dyn *dynamicp) rp = NULL; rs = 0; } - for (i = 0; i < rs; i += sizeof (Elf_RelA)) { + for (i = 0; i < rs; i += sizeof (Elf_RelA), rp++) { Elf_Addr *ra; const Elf_Sym *sp; @@ -236,7 +239,6 @@ _dl_boot_bind(const long sp, long *dl_data, Elf_Dyn *dynamicp) ra = (Elf_Addr *)(rp->r_offset + loff); RELOC_RELA(rp, sp, ra, loff, dynld.dyn.pltgot); - rp++; } } |