From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10785 invoked by alias); 21 May 2006 22:30:08 -0000 Received: (qmail 10776 invoked by uid 22791); 21 May 2006 22:30:08 -0000 X-Spam-Check-By: sourceware.org Received: from smtp102.sbc.mail.mud.yahoo.com (HELO smtp102.sbc.mail.mud.yahoo.com) (68.142.198.201) by sourceware.org (qpsmtpd/0.31) with SMTP; Sun, 21 May 2006 22:30:06 +0000 Received: (qmail 29672 invoked from network); 21 May 2006 22:30:03 -0000 Received: from unknown (HELO lucon.org) (hjjean@sbcglobal.net@71.146.87.95 with login) by smtp102.sbc.mail.mud.yahoo.com with SMTP; 21 May 2006 22:30:03 -0000 Received: by lucon.org (Postfix, from userid 1000) id 420F8641A3; Sun, 21 May 2006 15:30:02 -0700 (PDT) Date: Mon, 22 May 2006 08:45:00 -0000 From: "H. J. Lu" To: binutils@sources.redhat.com Subject: RFC: Remove output_target in ld Message-ID: <20060521223002.GB16551@lucon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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/msg00367.txt.bz2 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. H.J.