From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18683 invoked by alias); 16 Mar 2005 16:39:46 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 18267 invoked from network); 16 Mar 2005 16:39:22 -0000 Received: from unknown (205.217.158.180) by sourceware.org with QMTP; 16 Mar 2005 16:39:22 -0000 Received: (qmail 30061 invoked by uid 10); 16 Mar 2005 16:39:21 -0000 Received: (qmail 24575 invoked by uid 500); 16 Mar 2005 16:39:12 -0000 Mail-Followup-To: julian@codesourcery.com, drow@false.org, binutils@sources.redhat.com, rearnsha@gcc.gnu.org To: Richard Earnshaw Cc: Julian Brown , Daniel Jacobowitz , binutils@sources.redhat.com Subject: Re: [PATCH] Fix thumb calls via PLT on ARM/SymbianOS References: <42383FF3.4080604@codesourcery.com> <1110982992.19581.35.camel@pc960.cambridge.arm.com> <20050316144218.GA27174@nevyn.them.org> <42384770.8030104@codesourcery.com> <1110990497.19581.51.camel@pc960.cambridge.arm.com> From: Ian Lance Taylor Date: Wed, 16 Mar 2005 17:16:00 -0000 In-Reply-To: <1110990497.19581.51.camel@pc960.cambridge.arm.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-03/txt/msg00451.txt.bz2 Richard Earnshaw writes: > On Wed, 2005-03-16 at 16:10, Ian Lance Taylor wrote: > > Julian Brown writes: > > > > > Would it be better to add a --target-arch (or something) flag to > > > binutils at this point? That would tidy up a previous patch of mine, > > > too. I don't know if any other targets have, or need, such an option. > > > > I think the linker should support a command line option to do what > > OUTPUT_ARCH does in a linker script. > > I'm not convinced, but then I'm not entirely sure what OUTPUT_ARCH > does. > > It appears that OUTPUT_ARCH uses bfd variant names, but the problem is > that in the past this has worked by (ab)using bits in the ELF header > which simply aren't available in the EABI. There's also a potential > disaster in this area of the exploding cross-product: the core > architecture is just one dimension in the matrix. OUTPUT_ARCH lets you specify an architecture. For ARM, this will be one of the entries found in arch_info_struct in bfd/cpu-arm.c. Of course that list can be adjusted. I think the ELF header issue is irrelevant here. That is a matter of how the architecture is represented in the output file. It's obviously convenient to represent the architecture correctly in the output file so that it can be recognized by something reading the file, but that is not a requirement, and the information does not have to be in the ELF header. > > Perhaps the thing to do would be > > to redefine the -A/--architecture option, which is only used for the > > Intel i960. -A currently affects library search order, which we would > > not want for the new option. However, I doubt that anybody uses the > > i960 any more, and even if they do, they probably don't use the -A > > option. > > I'd really like to be able to just pass -march through from the > compiler. Anything solution that needs any remapping beyond a common > prefix substitution in a gcc spec file is just a disaster waiting to > happen. The linker already has a -m option, used to specify the emulation to use, so -march itself would not work. But I wouldn't be opposed to adding an option which just set the machine name. I would have to be convinced about adding something which bypassed the existing BFD architecture/machine machinery. Ian