Date: Tue, 8 Nov 2016 22:41:12 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308456 - in head/libexec/rtld-elf: . sparc64 Message-ID: <201611082241.uA8MfCJN036142@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Tue Nov 8 22:41:11 2016 New Revision: 308456 URL: https://svnweb.freebsd.org/changeset/base/308456 Log: Pass the correct flag to find_symdef() from _rtld_bind(). When symbol versioning was added to rtld, the boolean 'in_plt' argument to find_symdef() was converted to a bitmask of flags. The first flag added was 'SYMLOOK_IN_PLT' which replaced the 'in_plt' bool. This happened to still work by accident as SYMLOOK_IN_PLT had the value of 1 which is the same as 'true', so there should be no functional change. Tested on: amd64 Reviewed by: kan MFC after: 2 weeks Sponsored by: DARPA / AFRL Modified: head/libexec/rtld-elf/rtld.c head/libexec/rtld-elf/sparc64/reloc.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Tue Nov 8 21:57:49 2016 (r308455) +++ head/libexec/rtld-elf/rtld.c Tue Nov 8 22:41:11 2016 (r308456) @@ -713,8 +713,8 @@ _rtld_bind(Obj_Entry *obj, Elf_Size relo rel = (const Elf_Rel *) ((caddr_t) obj->pltrela + reloff); where = (Elf_Addr *) (obj->relocbase + rel->r_offset); - def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, true, NULL, - &lockstate); + def = find_symdef(ELF_R_SYM(rel->r_info), obj, &defobj, SYMLOOK_IN_PLT, + NULL, &lockstate); if (def == NULL) rtld_die(); if (ELF_ST_TYPE(def->st_info) == STT_GNU_IFUNC) Modified: head/libexec/rtld-elf/sparc64/reloc.c ============================================================================== --- head/libexec/rtld-elf/sparc64/reloc.c Tue Nov 8 21:57:49 2016 (r308455) +++ head/libexec/rtld-elf/sparc64/reloc.c Tue Nov 8 22:41:11 2016 (r308456) @@ -503,7 +503,7 @@ reloc_plt(Obj_Entry *obj) assert(ELF64_R_TYPE_ID(rela->r_info) == R_SPARC_JMP_SLOT); where = (Elf_Addr *)(obj->relocbase + rela->r_offset); def = find_symdef(ELF_R_SYM(rela->r_info), obj, &defobj, - true, NULL, lockstate); + SYMLOOK_IN_PLT, NULL, lockstate); value = (Elf_Addr)(defobj->relocbase + def->st_value); *where = value; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611082241.uA8MfCJN036142>