Date: Sat, 15 Oct 2011 12:05:31 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r226383 - stable/8/libexec/rtld-elf/i386 Message-ID: <201110151205.p9FC5VBU012537@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sat Oct 15 12:05:31 2011 New Revision: 226383 URL: http://svn.freebsd.org/changeset/base/226383 Log: MFC r226156: Handle the R_386_TLS_TPOFF32 relocation. Modified: stable/8/libexec/rtld-elf/i386/reloc.c Directory Properties: stable/8/libexec/rtld-elf/ (props changed) Modified: stable/8/libexec/rtld-elf/i386/reloc.c ============================================================================== --- stable/8/libexec/rtld-elf/i386/reloc.c Sat Oct 15 12:02:55 2011 (r226382) +++ stable/8/libexec/rtld-elf/i386/reloc.c Sat Oct 15 12:05:31 2011 (r226383) @@ -207,9 +207,11 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry break; case R_386_TLS_TPOFF: + case R_386_TLS_TPOFF32: { const Elf_Sym *def; const Obj_Entry *defobj; + Elf_Addr add; def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, false, cache); @@ -231,8 +233,11 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry goto done; } } - - *where += (Elf_Addr) (def->st_value - defobj->tlsoffset); + add = (Elf_Addr) (def->st_value - defobj->tlsoffset); + if (ELF_R_TYPE(rel->r_info) == R_386_TLS_TPOFF) + *where += add; + else + *where -= add; } break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110151205.p9FC5VBU012537>