Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jul 2020 20:19:56 +0000 (UTC)
From:      Leandro Lupori <luporl@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r363376 - stable/11/libexec/rtld-elf
Message-ID:  <202007202019.06KKJucB035039@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: luporl
Date: Mon Jul 20 20:19:56 2020
New Revision: 363376
URL: https://svnweb.freebsd.org/changeset/base/363376

Log:
  MFC r362958
  
  Handle non-PLT GNU IFUNC relocations in rtld

Modified:
  stable/11/libexec/rtld-elf/rtld.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/libexec/rtld-elf/rtld.c
==============================================================================
--- stable/11/libexec/rtld-elf/rtld.c	Mon Jul 20 18:22:38 2020	(r363375)
+++ stable/11/libexec/rtld-elf/rtld.c	Mon Jul 20 20:19:56 2020	(r363376)
@@ -3039,12 +3039,15 @@ resolve_object_ifunc(Obj_Entry *obj, bool bind_now, in
 	if (obj->ifuncs_resolved)
 		return (0);
 	obj->ifuncs_resolved = true;
-	if (!obj->irelative && !((obj->bind_now || bind_now) && obj->gnu_ifunc))
+	if (!obj->irelative && !((obj->bind_now || bind_now) &&
+	    obj->gnu_ifunc) && !obj->non_plt_gnu_ifunc)
 		return (0);
 	if (obj_disable_relro(obj) == -1 ||
 	    (obj->irelative && reloc_iresolve(obj, lockstate) == -1) ||
 	    ((obj->bind_now || bind_now) && obj->gnu_ifunc &&
 	    reloc_gnu_ifunc(obj, flags, lockstate) == -1) ||
+	    (obj->non_plt_gnu_ifunc && reloc_non_plt(obj, &obj_rtld,
+	    flags | SYMLOOK_IFUNC, lockstate) == -1) ||
 	    obj_enforce_relro(obj) == -1)
 		return (-1);
 	return (0);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007202019.06KKJucB035039>