From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14111 invoked by alias); 9 Sep 2009 15:14:21 -0000 Received: (qmail 13918 invoked by uid 22791); 9 Sep 2009 15:14:18 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 09 Sep 2009 15:14:13 +0000 Received: from spaceape14.eur.corp.google.com (spaceape14.eur.corp.google.com [172.28.16.148]) by smtp-out.google.com with ESMTP id n89FEBf7025572 for ; Wed, 9 Sep 2009 16:14:11 +0100 Received: from qw-out-2122.google.com (qwe3.prod.google.com [10.241.194.3]) by spaceape14.eur.corp.google.com with ESMTP id n89FE8M7013488 for ; Wed, 9 Sep 2009 08:14:08 -0700 Received: by qw-out-2122.google.com with SMTP id 3so1094501qwe.61 for ; Wed, 09 Sep 2009 08:14:08 -0700 (PDT) Received: by 10.224.87.75 with SMTP id v11mr259432qal.236.1252509247958; Wed, 09 Sep 2009 08:14:07 -0700 (PDT) Received: from localhost.localdomain.google.com (dhcp-172-22-126-192.mtv.corp.google.com [172.22.126.192]) by mx.google.com with ESMTPS id 4sm30481qwe.55.2009.09.09.08.14.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 09 Sep 2009 08:14:07 -0700 (PDT) To: "Jan Beulich" Cc: Subject: Re: division in ld scripts References: <4AA7CBF202000078000141F9@vpn.id2.novell.com> <4AA7CBF202000078000141F9@vpn.id2.novell.com> <4AA7DEFE0200007800014261@vpn.id2.novell.com> From: Ian Lance Taylor Date: Wed, 09 Sep 2009 15:14:00 -0000 In-Reply-To: <4AA7DEFE0200007800014261@vpn.id2.novell.com> (Jan Beulich's message of "Wed\, 09 Sep 2009 15\:59\:42 +0100") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00263.txt.bz2 "Jan Beulich" writes: >>>> Ian Lance Taylor 09.09.09 16:48 >>> >>"Jan Beulich" writes: >> >>> Is it known/intended/documented that using the division operator (/) in >>> ld scripts requires a blank to follow, at least in some cases (see below)? >>> All other operators seem to behave as expected (apart from the missing >>> but unlikely to be needed ^), while / results in a "syntax error" failure. >> >>The linker language is kind of a mess. The problem here is that '/' can >>appear in a file name, so the whole string gets picked up as a file name >>rather than a number. I think it would be pretty hard to change without >>breaking existing scripts. > > But why would that "can appear in a file name" argument not also apply > to the other operators? Especially '-' shouldn't be that uncommon, albeit > perhaps not at the beginning of a file name. Yes, the issue is which characters the linker script language will permit at the start of a file name. I was wrong in saying that the whole string gets picked up as a file name. What gets picked up as a file name is the part starting with the slash. The characters which are permitted at the start of a file name are, from ldlex.l: FILENAMECHAR1 [_a-zA-Z\/\.\\\$\_\~] Ian