aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2016-11-08 22:41:11 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2016-11-08 22:41:11 +0000
commitb5b4f379e0e3193eece6bd52d6e74d3992a6df4f (patch)
treec0fff686b351a2658130440be43d7bb58a4a9ee3 /libexec
parent8fc77fff81ed32ae03ed910735e06fe15b4c8d0e (diff)
downloadsrc-b5b4f379e0e3193eece6bd52d6e74d3992a6df4f.tar.gz
src-b5b4f379e0e3193eece6bd52d6e74d3992a6df4f.zip
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
Notes
Notes: svn path=/head/; revision=308456
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rtld-elf/rtld.c4
-rw-r--r--libexec/rtld-elf/sparc64/reloc.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index fe25e59ec65a..6c8aff44bf9d 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -713,8 +713,8 @@ _rtld_bind(Obj_Entry *obj, Elf_Size reloff)
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)
diff --git a/libexec/rtld-elf/sparc64/reloc.c b/libexec/rtld-elf/sparc64/reloc.c
index 242fb8e4d948..f8534e8712f9 100644
--- a/libexec/rtld-elf/sparc64/reloc.c
+++ b/libexec/rtld-elf/sparc64/reloc.c
@@ -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;
}