From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: wip-linker: Refactor ELF linker and loader Date: Sat, 18 May 2013 17:05:34 +0200 Message-ID: <1368889540-27139-1-git-send-email-wingo@pobox.com> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1368890651 24214 80.91.229.3 (18 May 2013 15:24:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 May 2013 15:24:11 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat May 18 17:24:11 2013 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UdizS-0006TU-S9 for guile-devel@m.gmane.org; Sat, 18 May 2013 17:24:10 +0200 Original-Received: from localhost ([::1]:56063 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdizS-0004iv-8O for guile-devel@m.gmane.org; Sat, 18 May 2013 11:24:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdizP-0004ij-Fz for guile-devel@gnu.org; Sat, 18 May 2013 11:24:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UdizO-0002zY-CD for guile-devel@gnu.org; Sat, 18 May 2013 11:24:07 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:63734 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UdizO-0002zR-84 for guile-devel@gnu.org; Sat, 18 May 2013 11:24:06 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id AA26EABB8 for ; Sat, 18 May 2013 11:24:05 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to :subject:date:message-id; s=sasl; bh=+aKYUNmBKO8uWAjUD161jsxyPcU =; b=N/WdqBYuXULuAUYDEmO4V3JzQnosUOHPfTm+wMQe1AFA6sPLcFRFlz07UTi yfwbmuT++plPE32hOGGCiCFXGz629xQUWm26iTsYnq27KhCAudUhdgcDZfZbhaBi fhuTKtwgQTLM//TEKrbkQI/I4xeCwMBaCSyeXflVaFu9xUic= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:subject :date:message-id; q=dns; s=sasl; b=FM93/BQk7xh+oVgzVMUc5H9lDos/V KssdVefCvV8SUl1XjINFQIybc1k0FMjoNI70lMvWdefECVQ92Ci089nD9J6VLiip IpZvgL9DsPAXVPdjhERfkk/Dvm6dioxPRPLFHgxmJS1sqiP0YY1nV53QMZlvAYUH EqofL7Kerqljr4= Original-Received: from a-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id A0F48ABB7 for ; Sat, 18 May 2013 11:24:05 -0400 (EDT) Original-Received: from badger (unknown [88.160.190.192]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id E24FCABB6 for ; Sat, 18 May 2013 11:24:01 -0400 (EDT) X-Mailer: git-send-email 1.7.10.4 X-Pobox-Relay-ID: F9D9EFC4-BFCE-11E2-BAA2-9F710E5B5709-02397024!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 208.72.237.25 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:16375 Archived-At: Hi, This patch series is the first from wip-rtl that I'm going to try to merge to master. You can look at it in gitk or whatever if you prefer; I've pushed it as wip-linker. Note that compared to wip-rtl, this is a more cleaned-up patchset. The summary is that I split the linker out of the ELF module, then adapt the linker to create files that can be mapped directly into memory. Then we change the loader to expect this kind of file, and provide a way to look up the ELF image associated with a given procedure. This will later allow us to get debugging information for a procedure. Note that all of this code applies to the existing .go files, since in master, .go files are actually ELF. I've also added a small test for sanity's sake. That said though, this is all just refactoring -- the RTL patches (to come later) are what really benefit by having a good linker and loader. This is the first time I've tried git-send-email, so perhaps something goes wrong. In any case, the intention is to allow folks to comment easily on the code; we'll see how that goes. Comments welcome! I'd especially like to hear impressions from Ludo and Mark. Cheers, Andy