From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13462 Path: news.gmane.org!.POSTED!not-for-mail From: Gernot Reisinger Newsgroups: gmane.linux.lib.musl.general Subject: Question regarding dynamic loader Date: Wed, 21 Nov 2018 14:55:19 +0100 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000f8f1ed057b2d1b60" X-Trace: blaine.gmane.org 1542808445 7357 195.159.176.226 (21 Nov 2018 13:54:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 21 Nov 2018 13:54:05 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-13478-gllmg-musl=m.gmane.org@lists.openwall.com Wed Nov 21 14:54:01 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1gPSx7-0001mT-27 for gllmg-musl@m.gmane.org; Wed, 21 Nov 2018 14:54:01 +0100 Original-Received: (qmail 29957 invoked by uid 550); 21 Nov 2018 13:56:08 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 29920 invoked from network); 21 Nov 2018 13:56:08 -0000 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=c7WBdcOt2iqB2TbFuNy5TDaDAcIAxoRqg07OkI3JbEI=; b=RByekcaKrJmA4PRvCdhcie+PXbQNG/xPe7Z2joBfFnmmoLuYw1BoSNJiMORIpTTe30 NAoTVUqEB/I7XS3/F5cl+tmX79vifar1rUFeaTaFx4qMVJ3JBfODDk0fo0T8zjeVhMhe KFehRiOBOstGBt6WCEdSq6hFeXOyCpFyqebr9/Ax6LonzrF2YxLej9hgqhmRrCWiCDjG v9A8wUfN5eL7+uxotM2NKOLRRFQMiKqGVZOZEpJs+fExm22lNMY/7DzCEa1ae8HftS3i m3ixoSzia8bzwGUFAvCKaXfpB1HZrGPEVhiicqdE5UW+E0Hcg/6kwVK/SNfzZLU8DPiC dwFw== X-Gm-Message-State: AA+aEWbkmNuPLNG4QLiKlgTkV/5Gz1tkR3FpAegqAEdsIYFjxVP/0Aze rQqO91HfnHVG4neKWcWiJSK86H/CmdddZNP+Dw/1z6I1 X-Google-Smtp-Source: AFSGD/WVQ2+tqG43zwCPeV/EnV9tHKSbyubVCAnKK6P+iX5p3syFGhiAO08PAnOIZD/YFDxqSY7EGDLHVxEEj6h4lTo= X-Received: by 2002:a2e:478f:: with SMTP id u137-v6mr4080138lja.142.1542808556595; Wed, 21 Nov 2018 05:55:56 -0800 (PST) Xref: news.gmane.org gmane.linux.lib.musl.general:13462 Archived-At: --000000000000f8f1ed057b2d1b60 Content-Type: text/plain; charset="UTF-8" Hi, I recently stumbled upon an issue with preloading a shared object into a Go application (see related Go ticket https://github.com/golang/go/issues/28909 ). In short - Go comes with an internal linker which will not link crt code to the application. The entry point will directly execute Go standard library code. As musl libc calls shared object constructors in crt code, the shared objects constructors subsequently will never be invoked. Things will work on glibc systems / processes. it It seems to be a subtle - but in this case wide reaching - behavioral difference to glibc. I wonder if calling constructor functions from crt code is an intended musl libc behavior. My personal - non expert - gut feeling considers glibc behavior "more correct". Is there a chance that musl will change this behavior? br Gernot --000000000000f8f1ed057b2d1b60 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,
I recently stumbled upon an issue= with preloading a shared object into a Go application (see related Go tick= et https://github.com= /golang/go/issues/28909).=C2=A0

In short - Go = comes with an internal linker which will not link crt code to the applicati= on. The entry point will directly execute Go standard library code. As musl= libc calls shared object constructors in crt code, the shared objects cons= tructors subsequently will never be invoked. Things will work on glibc syst= ems / processes. it It seems to be a subtle - but in this case wide reachin= g - behavioral difference to glibc.

I wonder if ca= lling constructor functions from crt code is an intended musl libc behavior= . My personal - non expert - gut feeling considers glibc behavior "mor= e correct". Is there a chance that musl will change this behavior?=C2= =A0
br
Gernot
--000000000000f8f1ed057b2d1b60--