From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22814 invoked by alias); 8 Aug 2012 11:23:21 -0000 Received: (qmail 22802 invoked by uid 22791); 8 Aug 2012 11:23:20 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Aug 2012 11:23:02 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q78BN1iC002119 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 8 Aug 2012 07:23:01 -0400 Received: from fche.csb (vpn-11-235.rdu.redhat.com [10.11.11.235]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q78BN0b9025166; Wed, 8 Aug 2012 07:23:01 -0400 Received: by fche.csb (Postfix, from userid 2569) id 2F8B358130; Wed, 8 Aug 2012 07:23:00 -0400 (EDT) To: Ian Lance Taylor Cc: Fumiaki Isoya , gcc@gcc.gnu.org Subject: Re: The Extension to ELF References: <5021FB65.2010704@gmail.com> From: fche@redhat.com (Frank Ch. Eigler) Date: Wed, 08 Aug 2012 11:23:00 -0000 In-Reply-To: (Ian Lance Taylor's message of "Tue, 7 Aug 2012 23:31:50 -0700") Message-ID: User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2012-08/txt/msg00077.txt.bz2 Ian Lance Taylor writes: > [...] > ELF is designed to permit fast program loading at runtime, and to > permit fast linking. Changing symbol and relocation values to take > general expressions works against that goal. > [...] It may interest you to know that, for an older Cygnus project (mep), we implemented a facility called computed/complex relocations, as an ELF extension. This is a way of encoding general symbol/arithmetic expressions to be evaluated at link time and substituted into the binary output. (It may be similar to the vms-alpha ETIR facility.) This has been merged into gnu binutils some time ago, though is not widely known, and only used by a single cgen-based gas port. See the OBJ_COMPLEX_RELC conditionals in gas/*, the BSF_*RELC/STT_RELC logic in bfd/*. - FChE