From nobody Mon Apr 07 00:14:52 2025 X-Original-To: threads@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZW8q05PCRz5sHC4 for ; Mon, 07 Apr 2025 00:14:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZW8q02zK2z3h4t for ; Mon, 07 Apr 2025 00:14:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743984892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GPZEbPVDJ8OcBfI2/dUCTgQEpAAark7HTkvbUxFUOqA=; b=dElbM2vWpvxUypROAwMBW9d0rfKpi0o7E4ieZ92kZc5YE6Favukj1Ea/LrOB2x+9SKhZpH OvUpr3Qzbn9NgnDu96zBXECvRhqHdtthLYIbdvNCv/HaWgAtnIgsllZ/DOM+dzadG/5fSy wvNlvTsLTglmLPH7GSlJHlnxycnL2LZePrFpijqLMDxuSd3enWa7xCIjphv70pui2S2Lu3 XyzE4Rtl9kYePplhZ+VknaNozo6AJYJeo9YfxiMRC6ZcoAAZW97Iq/yNRxkmJpCeifrJS4 JGvwn2DmmK0m4qkmdDqx1IJGuQiyv3Yb1fYRL0lSWK5zgrzzPXFZc0NI/Q17iw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1743984892; a=rsa-sha256; cv=none; b=PqcB+xXnmd2TyFxS2rjYQZMPMbRv2H5e9BTM+/AAKnkgk6WO4g78j05tVQv5rVot46iaBs j70QmHT8A91CmhUYxllyVjXUdsFdSIHpLIIsT5sVDb5g6TBuQULtvC7MpLOJXrZSROedYG pRy/EdhPuwIjOO6BErOZya7IgG5C8XEdtFzzFkk7A4hwyVL3WmvKhrvifCv+sVctQiZofW yuyx+DxKqr31e0KQaLnIWA27PqXywOEb1KTtHiZ1bglYVy5jqkGWZ9YOOuBtPc4IGrX+Gv iH//+0aSHId6xOllgPJsZq719DV61BHGL/Zrueu4mBo/icjpFtSjmn9FBZqZDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1743984892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GPZEbPVDJ8OcBfI2/dUCTgQEpAAark7HTkvbUxFUOqA=; b=XYPUzXKQcJNEazVvO+4/KR9aBv1bgPUSEO0mm5+96ZuVC5a/AkjfIwAZKC86HWCg4tdo+4 rGmaTppconZE/j2gMmwUrtAeCH1TAhHFauaaHMwy6pkTgCnqbVf1F57QQV71Y6KvyYNGfe h5WtukpB2y8nAyULqtFBjl/lALOJW51SQukrp6+FIlCCH5eBgYv5Ztq1DOZ1wWu907cpp0 w3oe1ukriCc0NlGXhA0GTJWw48CciQIGkcke2L5xcZv+zhDOEUAUq2DIPidhJeNDCK7hoh +1P7wQvjbDttH3blBShMJkPl/5+RWyV2raVoHKNGvl30/K818KkPel30NrbWGA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZW8q026jcz7d9 for ; Mon, 07 Apr 2025 00:14:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 5370EqNs031330 for ; Mon, 7 Apr 2025 00:14:52 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 5370Eq4i031329 for threads@FreeBSD.org; Mon, 7 Apr 2025 00:14:52 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: threads@FreeBSD.org Subject: [Bug 192686] Segfaults using combinations of -pie -pthread -lm(|_p) when profiling Date: Mon, 07 Apr 2025 00:14:52 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: 11.4-RELEASE X-Bugzilla-Keywords: needs-qa X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: mpysw@vip.163.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: threads@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Threading List-Archive: https://lists.freebsd.org/archives/freebsd-threads List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-threads@freebsd.org Sender: owner-freebsd-threads@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D192686 yu shan wei changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mpysw@vip.163.com --- Comment #5 from yu shan wei --- [1]> clang -pg -pie -pthread -lm profile.c && ./a.out ld: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC >>> defined in /tmp/profile-387333.o >>> referenced by profile.c >>> /tmp/profile-387333.o:(main) ld: error: relocation R_X86_64_64 cannot be used against symbol 'main'; recompile with -fPIC >>> defined in /tmp/profile-387333.o >>> referenced by crt1_s.S:69 (/usr/src/lib/csu/amd64/crt1_s.S:69) >>> /usr/lib/gcrt1.o:(_start) ld: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC >>> defined in /usr/lib/gcrt1.o >>> referenced by crt1_s.S:72 (/usr/src/lib/csu/amd64/crt1_s.S:72) >>> /usr/lib/gcrt1.o:(_start) ld: error: relocation R_X86_64_64 cannot be used against symbol 'etext'; recompile with -fPIC >>> defined in >>> referenced by crt1_s.S:73 (/usr/src/lib/csu/amd64/crt1_s.S:73) >>> /usr/lib/gcrt1.o:(_start) clang: error: linker command failed with exit code 1 (use -v to see invocat= ion) [2]> clang -pg -pie -pthread -lm_p profile.c && ./a.out clang -pg -pie -pthread -lm_p profile.c && ./a.out ld: error: unable to find library -lm_p clang -pg -pie -pthread -lmp profile.c && ./a.out ld: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC >>> defined in /tmp/profile-8d9771.o >>> referenced by profile.c >>> /tmp/profile-8d9771.o:(main) ld: error: relocation R_X86_64_64 cannot be used against symbol 'main'; recompile with -fPIC >>> defined in /tmp/profile-8d9771.o >>> referenced by crt1_s.S:69 (/usr/src/lib/csu/amd64/crt1_s.S:69) >>> /usr/lib/gcrt1.o:(_start) ld: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC >>> defined in /usr/lib/gcrt1.o >>> referenced by crt1_s.S:72 (/usr/src/lib/csu/amd64/crt1_s.S:72) >>> /usr/lib/gcrt1.o:(_start) ld: error: relocation R_X86_64_64 cannot be used against symbol 'etext'; recompile with -fPIC >>> defined in >>> referenced by crt1_s.S:73 (/usr/src/lib/csu/amd64/crt1_s.S:73) >>> /usr/lib/gcrt1.o:(_start) clang: error: linker command failed with exit code 1 (use -v to see invocat= ion) [3]> clang -pg -pthread -lm profile.c && ./a.out success [4]> clang -pg -pthread -lm_p profile.c && ./a.out clang -pg -pthread -lm_p profile.c && ./a.out success [5]> clang -pg -pthread -lm profile.c && ./a.out success [6]> clang -pg -pie -pthread profile.c && ./a.out ld: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC >>> defined in /tmp/profile-1d081e.o >>> referenced by profile.c >>> /tmp/profile-1d081e.o:(main) ld: error: relocation R_X86_64_64 cannot be used against symbol 'main'; recompile with -fPIC >>> defined in /tmp/profile-1d081e.o >>> referenced by crt1_s.S:69 (/usr/src/lib/csu/amd64/crt1_s.S:69) >>> /usr/lib/gcrt1.o:(_start) ld: error: relocation R_X86_64_64 cannot be used against local symbol; recompile with -fPIC >>> defined in /usr/lib/gcrt1.o >>> referenced by crt1_s.S:72 (/usr/src/lib/csu/amd64/crt1_s.S:72) >>> /usr/lib/gcrt1.o:(_start) ld: error: relocation R_X86_64_64 cannot be used against symbol 'etext'; recompile with -fPIC >>> defined in >>> referenced by crt1_s.S:73 (/usr/src/lib/csu/amd64/crt1_s.S:73) >>> /usr/lib/gcrt1.o:(_start) clang: error: linker command failed with exit code 1 (use -v to see invocat= ion) FreeBSD 14.2 --=20 You are receiving this mail because: You are the assignee for the bug.=