From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] [WIP] Port feature/native-comp to Windows. Date: Sat, 09 May 2020 16:46:46 +0000 Message-ID: References: <5eb5b953.1c69fb81.a67ce.a764@mx.google.com> <83lfm1dq4y.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="16887"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: nicolasbertolo@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 09 18:47:34 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jXSdR-0004Ge-U9 for ged-emacs-devel@m.gmane-mx.org; Sat, 09 May 2020 18:47:33 +0200 Original-Received: from localhost ([::1]:37624 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXSdQ-0002S3-GK for ged-emacs-devel@m.gmane-mx.org; Sat, 09 May 2020 12:47:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXSck-0001tI-KU for emacs-devel@gnu.org; Sat, 09 May 2020 12:46:50 -0400 Original-Received: from mx.sdf.org ([205.166.94.20]:57656) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXScj-0007F8-5W; Sat, 09 May 2020 12:46:50 -0400 Original-Received: from sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 049GkkT5000477 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Sat, 9 May 2020 16:46:46 GMT Original-Received: (from akrl@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 049Gkk2T009028; Sat, 9 May 2020 16:46:46 GMT In-Reply-To: <83lfm1dq4y.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 May 2020 19:33:49 +0300") Received-SPF: pass client-ip=205.166.94.20; envelope-from=akrl@sdf.org; helo=mx.sdf.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/09 11:50:32 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:249506 Archived-At: Eli Zaretskii writes: >> From: Andrea Corallo >> Date: Sat, 09 May 2020 16:27:18 +0000 >> Cc: "emacs-devel@gnu.org" >>=20 >> Nicolas B=C3=A9rtolo writes: >>=20 >> > PS: I don't understand why the freloc table is necessary. Is it imposs= ible to >> > rely on the dynamic linker to solve that when calling dlopen()? >>=20 >> The problem is that being Emacs an executable we do not export the >> symbols to be used by the dynamic linker. > > You mean, the symbols of primitives that compiled Elisp code calls? Yes >> I think it should be possible (depending on the tool-chain) but I never >> tried. What I'm not sure of is how much is it portable given is not a >> common scenario. Because typically afterwards the answer comes up to be >> "not enough" at the time I decided to handle it inside, the generated >> code should be similar. > > But that is even less portable, isn't it? Or am I missing something? No should be portable, the mechanism is very simple, we have just some memory in the .eln (static variables) that we fill with the right pointers during load. Andrea --=20 akrl@sdf.org