From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3547 invoked by alias); 26 Jun 2006 22:21:31 -0000 Received: (qmail 3539 invoked by uid 22791); 26 Jun 2006 22:21:30 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.12) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 26 Jun 2006 22:21:24 +0000 Received: from lois.corp.google.com (lois.corp.google.com [172.24.0.50]) by smtp-out.google.com with ESMTP id k5QML5LO000650; Mon, 26 Jun 2006 15:21:05 -0700 Received: from smtp.google.com (angband.corp.google.com [192.168.15.227]) by lois.corp.google.com with ESMTP id k5QMKtQf013017 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 26 Jun 2006 15:20:55 -0700 Received: from localhost.localdomain.google.com (adsl-71-133-8-30.dsl.pltn13.pacbell.net [71.133.8.30]) (authenticated bits=0) by smtp.google.com (8.13.7/8.13.6) with ESMTP id k5QMKsbR017839 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 26 Jun 2006 15:20:55 -0700 To: Amit Gud Cc: binutils@sourceware.org, bug-binutils@gnu.org, Vivek Goyal Subject: Re: relocation entries for absolute symbols References: <44A05DA5.7070507@redhat.com> From: Ian Lance Taylor Date: Tue, 27 Jun 2006 07:29:00 -0000 In-Reply-To: <44A05DA5.7070507@redhat.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00399.txt.bz2 Amit Gud writes: > I'm compiling the GNU/Linux kernel as a shared library and I've found > that relocation entries are created even for absolute symbols. Is > there any work-around for this, or is it a known bug? That is correct behaviour if the symbol is globally visible. In a shared library, by default, any symbol may be overridden by the main executable. That means that a relocation entry is required. One fix would be to force the symbol to be hidden using an attribute or a linker script. Ian