diff options
author | 2014-12-22 13:32:51 +0000 | |
---|---|---|
committer | 2014-12-22 13:32:51 +0000 | |
commit | 2ced79f661f3dce8768255c390210943a86029be (patch) | |
tree | 7e9dd954579452b53a57d308d254f80e853427cc /lib | |
parent | Now does not need to be initialized event.value. (diff) | |
download | wireguard-openbsd-2ced79f661f3dce8768255c390210943a86029be.tar.xz wireguard-openbsd-2ced79f661f3dce8768255c390210943a86029be.zip |
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')
-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++; } } |