From patchwork Wed Sep 11 21:03:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 34500 Received: (qmail 93971 invoked by alias); 11 Sep 2019 21:05:09 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 93954 invoked by uid 89); 11 Sep 2019 21:05:09 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:901, H*r:sk:mail-pf, HX-HELO:sk:mail-pf X-HELO: mail-pf1-f196.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=Q8ffwq9DLdFOIUHarbzwHCg7UeoMZsMRIOwgMKe32e0=; b=i0iAhOVWqAW0qgpc7whi+crv3bupjPIDrSk+g+4cN4LqkovdrfUf2dpno2wnXndRNb zNkI8N3Pb7v1rmnp48X9FDLk4DiYJnkZi6m3QXGgIn+rphfOQkV+gKsv68EgxaMswAjQ NMWwkTlMcYGpT53YAE/4G5I+zgEOSqyAPnPjZI1MXfYIYmjCiq3JfRyL4kaLEbCOR6Ki yHpwhdrEyWXovaAR3uAUZfxs2RwfWM+JFlV+/pfv9cBfvszbRl0Eg8l85GBCur5e6hvH CWTOnVE53+IBYRTypJQmwI6MGROXtp8qWb70NypSsW+Ih6PHjwntCiLY3qK8GbLyE2+Y n8AQ== Return-Path: From: Isaku Yamahata To: libc-alpha@sourceware.org Cc: isaku.yamahata@intel.com, Isaku Yamahata Subject: [RFC PATCH 01/11] x86-64, elf: make elf_machine_lazy_rel() ignore R_X86_64_NONE Date: Wed, 11 Sep 2019 14:03:59 -0700 Message-Id: In-Reply-To: References: In-Reply-To: References: This adds a check of R_X86_64_NONE to ignore it on lazy relocation to elf_machine_lazy_rel(). LibOS may also do relocation and change the relocation entry to NONE. So elf_machine_lazy_rel() may see R_X86_64_NONE in this code path in addition to elf_machine_rela(). Signed-off-by: Isaku Yamahata --- sysdeps/x86_64/dl-machine.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h index 95a13b35b5..50db45c082 100644 --- a/sysdeps/x86_64/dl-machine.h +++ b/sysdeps/x86_64/dl-machine.h @@ -578,6 +578,8 @@ elf_machine_lazy_rel (struct link_map *map, value = ((ElfW(Addr) (*) (void)) value) (); *reloc_addr = value; } + else if (__glibc_unlikely (r_type == R_X86_64_NONE)) + return; else _dl_reloc_bad_type (map, r_type, 1); }