From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24089 invoked by alias); 22 May 2006 00:28:31 -0000 Received: (qmail 24081 invoked by uid 22791); 22 May 2006 00:28:31 -0000 X-Spam-Check-By: sourceware.org Received: from smtp103.sbc.mail.mud.yahoo.com (HELO smtp103.sbc.mail.mud.yahoo.com) (68.142.198.202) by sourceware.org (qpsmtpd/0.31) with SMTP; Mon, 22 May 2006 00:28:18 +0000 Received: (qmail 80137 invoked from network); 22 May 2006 00:28:17 -0000 Received: from unknown (HELO lucon.org) (hjjean@sbcglobal.net@71.146.87.95 with login) by smtp103.sbc.mail.mud.yahoo.com with SMTP; 22 May 2006 00:28:16 -0000 Received: by lucon.org (Postfix, from userid 1000) id 7CF6D641A3; Sun, 21 May 2006 17:28:15 -0700 (PDT) Date: Mon, 22 May 2006 08:49:00 -0000 From: "H. J. Lu" To: binutils@sources.redhat.com Subject: Re: RFC: Remove output_target in ld Message-ID: <20060522002815.GA17421@lucon.org> References: <20060521223002.GB16551@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060521223002.GB16551@lucon.org> User-Agent: Mutt/1.4.2.1i 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-05/txt/msg00368.txt.bz2 On Sun, May 21, 2006 at 03:30:02PM -0700, H. J. Lu wrote: > ld has both output_target and ld_emulation, which has a target_name > field. Both of them are supposed to specify the output target name. > However, they aren't consistent, especially when a linker supports > different endians. Why do we need output_target? Can we set > ld_emulation correctly and use ld_emulation->target_name to replace > output_target. Also ld supports the GNUTARGET enviroment variable. > But we don't use it to set ld_emulation. I'd like to modify ld to > make ld_emulation consistent: > > 1. Initialize ld_emulation properly with > a. GNUTARGET. > b. -m EMULATION. > and correct endian, based on -EL/-BL. > 2. Use ld_emulation->target_name to identify the output target. > I realized that emulation may be just a subset of supported targets. Can we generate little endian ELF with big endian emulation? If yes, how do we do it? H.J.