From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1039) id 05EB43858D20; Thu, 25 Apr 2024 15:21:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 05EB43858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1714058489; bh=SNKgZD4tfwivxWZF3O2sNmNYK42+Plw9KhqeOY6wKgM=; h=From:To:Subject:Date:From; b=l8gbdx80YWh0aPRJXJbyNswTCQtXw/0BDDcf+Y1AWcwZq/oVDeH+NNGE8dPblG8uG eu0EiNVog2Zj9cFDGM6TCQZsqQOd0yUEutut2zWP0LfJjTZUU2Sh/zNeq2pPmAt7p3 CauKPoWBjvM0NKufmx2mImaKnmkJGtmqMI6kOHIU= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: H.J. Lu To: glibc-cvs@sourceware.org Subject: [glibc/release/2.38/master] elf: Also compile dl-misc.os with $(rtld-early-cflags) X-Act-Checkin: glibc X-Git-Author: H.J. Lu X-Git-Refname: refs/heads/release/2.38/master X-Git-Oldrev: 71af8ca864345d39b746d5cee84b94b430fad5db X-Git-Newrev: e9f05fa1c62c8044ff025963498063f73eb51c5f Message-Id: <20240425152129.05EB43858D20@sourceware.org> Date: Thu, 25 Apr 2024 15:21:28 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e9f05fa1c62c8044ff025963498063f73eb51c5f commit e9f05fa1c62c8044ff025963498063f73eb51c5f Author: H.J. Lu Date: Thu Apr 25 08:06:52 2024 -0700 elf: Also compile dl-misc.os with $(rtld-early-cflags) Also compile dl-misc.os with $(rtld-early-cflags) to avoid Program received signal SIGILL, Illegal instruction. 0x00007ffff7fd36ea in _dl_strtoul (nptr=nptr@entry=0x7fffffffe2c9 "2", endptr=endptr@entry=0x7fffffffd728) at dl-misc.c:156 156 bool positive = true; (gdb) bt #0 0x00007ffff7fd36ea in _dl_strtoul (nptr=nptr@entry=0x7fffffffe2c9 "2", endptr=endptr@entry=0x7fffffffd728) at dl-misc.c:156 #1 0x00007ffff7fdb1a9 in tunable_initialize ( cur=cur@entry=0x7ffff7ffbc00 , strval=strval@entry=0x7fffffffe2c9 "2", len=len@entry=1) at dl-tunables.c:131 #2 0x00007ffff7fdb3a2 in parse_tunables (valstring=) at dl-tunables.c:258 #3 0x00007ffff7fdb5d9 in __GI___tunables_init (envp=0x7fffffffdd58) at dl-tunables.c:288 #4 0x00007ffff7fe44c3 in _dl_sysdep_start ( start_argptr=start_argptr@entry=0x7fffffffdcb0, dl_main=dl_main@entry=0x7ffff7fe5f80 ) at ../sysdeps/unix/sysv/linux/dl-sysdep.c:110 #5 0x00007ffff7fe5cae in _dl_start_final (arg=0x7fffffffdcb0) at rtld.c:494 #6 _dl_start (arg=0x7fffffffdcb0) at rtld.c:581 #7 0x00007ffff7fe4b38 in _start () (gdb) when setting GLIBC_TUNABLES in glibc compiled with APX. Reviewed-by: Florian Weimer (cherry picked from commit 049b7684c912dd32b67b1b15b0f43bf07d5f512e) Diff: --- elf/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/elf/Makefile b/elf/Makefile index 1a05a6aaca..c2af11b92c 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -166,6 +166,7 @@ CFLAGS-.op += $(call elide-stack-protector,.op,$(elide-routines.os)) CFLAGS-.os += $(call elide-stack-protector,.os,$(all-rtld-routines)) # Add the requested compiler flags to the early startup code. +CFLAGS-dl-misc.os += $(rtld-early-cflags) CFLAGS-dl-printf.os += $(rtld-early-cflags) CFLAGS-dl-setup_hash.os += $(rtld-early-cflags) CFLAGS-dl-sysdep.os += $(rtld-early-cflags)