svn commit: r226215 - stable/9/libexec/rtld-elf/i386
Konstantin Belousov
kib at FreeBSD.org
Mon Oct 10 14:48:19 UTC 2011
Author: kib
Date: Mon Oct 10 14:48:18 2011
New Revision: 226215
URL: http://svn.freebsd.org/changeset/base/226215
Log:
MFC r226156:
Handle the R_386_TLS_TPOFF32 relocation.
Approved by: re (bz)
Modified:
stable/9/libexec/rtld-elf/i386/reloc.c
Directory Properties:
stable/9/libexec/rtld-elf/ (props changed)
Modified: stable/9/libexec/rtld-elf/i386/reloc.c
==============================================================================
--- stable/9/libexec/rtld-elf/i386/reloc.c Mon Oct 10 14:46:40 2011 (r226214)
+++ stable/9/libexec/rtld-elf/i386/reloc.c Mon Oct 10 14:48:18 2011 (r226215)
@@ -213,9 +213,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, lockstate);
@@ -237,8 +239,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;
More information about the svn-src-stable-9
mailing list