From nobody Sun Jul 03 17:05:51 2022 X-Original-To: toolchain@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 A5DFF8A1366 for ; Sun, 3 Jul 2022 17:05:51 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lbb1C3LJFz4lQQ for ; Sun, 3 Jul 2022 17:05:51 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 4F5262851F for ; Sun, 3 Jul 2022 17:05:51 +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 263H5pph090894 for ; Sun, 3 Jul 2022 17:05:51 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 263H5pBq090893 for toolchain@FreeBSD.org; Sun, 3 Jul 2022 17:05:51 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: toolchain@FreeBSD.org Subject: [Bug 265008] 'undefined symbol: environ' when a shared library is built which shouldn't happen according to environ(7) Date: Sun, 03 Jul 2022 17:05:51 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 13.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: marklmi26-fbsd@yahoo.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: toolchain@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Maintenance of FreeBSD s integrated toolchain List-Archive: https://lists.freebsd.org/archives/freebsd-toolchain List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656867951; 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=/uQ998hjc1mKQpfdUiaNMtXL5Aj/kv0U7RewIWAtKnA=; b=wkXc5vjJ8rQi1e8aKdZSkXwsXQpiTxBNI1Wy/r6bgWDwaHuXsVla/XDZf+RpH4ubngQ7LI P7OPNrK8RIqd7JINqQPNWT/Zpd4fhWbAcNc6gplc3Vv28nlTWri7Dw6nm9qNP5uIgLPQC0 Q1fA5taDiAJt9ii25FFcrQBZzDhqqLB3EUOhuB3sT7pKCQ+IbTgwTj05UeQHBqIjNwJaYt acOH5t+95MuP9z2Fw3GOrlserRWDTPbxvnlC7hY5usFWHzw5ibmub7uhfmsHH2fgf3Oe3B 0yzOReLwSah9snKKaL7flywG/E3CscDeXkZ5U1DJUCBNOSQVu2HFvQq23tpOSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656867951; a=rsa-sha256; cv=none; b=bu6HpcLVYvyEF4H8VWNtdt4X66AmYmOZ0DNMHCn8RzYjDdj+613yuRcq91O0YQYqbXV51o dlyGfoAcEdwN98LvUf70LynhzFDD+PbGlukZ6Kqo11i+qnLusa9L5pYzXjHK5848QgSd1x 2xB4fi6JDLPHJpD4dZiioW7xYNZh5sbXFCupHpjiCQbwpizCWAKsPlkmV8szEWcg+6cofR JhFUxn2qrERSich7YAW1KXyS3Wy8Bc+ZqAJm0iwSapI9Xtt//ThW1vlTh/gCWTxLPpxKmS vLfVBXg2YkVfPGBaUVbNd2ao7IiUbZYub7P28uPjMZktvXWGcMb1BJ7S0kizzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265008 Mark Millard changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marklmi26-fbsd@yahoo.com --- Comment #2 from Mark Millard --- (In reply to Yuri Victorovich from comment #1) What about: QUOTE An array of strings, called the environment is made available to each process by execve(2) when a process begins. END QUOTE makes you think a link-time definition binding would be available for the .so being built so that -Wl,--no-undefined could be used? Is there some other wording that I missed that implies "shouldn't happen according to environ(7)" for linking .so files? environ is implicit/automatic in the likes of: # more trivial.c // # cc -o trival trivial.c int main() { } # cc -o trivial trivial.c # nm trivial | grep environ 0000000000203aa0 B environ There should end up being only one definition, even when a so is involved at run time with the program, not separate definitions in multiple places. In fact: # ldd trivial trivial: libc.so.7 =3D> /lib/libc.so.7 (0x200000) [preloaded] [vdso] (0x7fffffffe000) # nm /lib/libc.so.7 | grep environ U environ So even /lib/libc.so.7 has it as undefined in order to pick up the one definition at load time (not link time). --=20 You are receiving this mail because: You are the assignee for the bug.=