From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3087 invoked by alias); 26 Jul 2011 21:23:01 -0000 Received: (qmail 3076 invoked by uid 22791); 26 Jul 2011 21:23:00 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-qy0-f169.google.com (HELO mail-qy0-f169.google.com) (209.85.216.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 26 Jul 2011 21:22:42 +0000 Received: by qyk32 with SMTP id 32so2179889qyk.0 for ; Tue, 26 Jul 2011 14:22:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.86.72 with SMTP id r8mr4714296qcl.84.1311715361709; Tue, 26 Jul 2011 14:22:41 -0700 (PDT) Received: by 10.229.98.193 with HTTP; Tue, 26 Jul 2011 14:22:41 -0700 (PDT) In-Reply-To: References: Date: Tue, 26 Jul 2011 23:05:00 -0000 Message-ID: Subject: Re: [PATCH] BFD vector for elf32-i386-nacl From: "H.J. Lu" To: Roland McGrath Cc: binutils@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2011-07/txt/msg00222.txt.bz2 On Tue, Jul 26, 2011 at 2:20 PM, Roland McGrath wrote: > elf_i386_link_hash_table is slightly overloaded for such uses (the > is_vxworks and plt0_pad_byte fields), but IMHO that is a bad kludge. =A0T= he > main purpose of that structure is for actual per-object data specific to > the backend. =A0What I've added is constant per-backend data that will ne= ver > vary across objects and it would be wasteful to duplicate it in the struct > elf_i386_link_hash_table for each individual object. > Then can you move some fields from elf_i386_link_hash_table to elf_i386_backend_data? Thanks. > > > On 7/26/11, H.J. Lu wrote: >> On Tue, Jul 26, 2011 at 1:56 PM, Roland McGrath wr= ote: >>> This patch adds the BFD target vector for the new target elf32-i386-nac= l. >>> This is to support Native Client (http://code.google.com/p/nativeclient= /), >>> which is a new pseudo-operating system that uses vanilla ELF but has a >>> significantly nonstandard ABI. =A0(It is already known to config.sub as >>> 'nacl'.) >>> >>> This is far from being complete support for this target, but it should >>> be everything that will be needed in BFD proper. =A0It's gotten only the >>> lightest testing, and of course the target-specific details are subject >>> to potential fixes or changes later. >>> >>> I'm floating this early primarily to get feedback about the >>> parameterization I've added to the shared elf32-i386.c code. >>> The approach I took seems pretty clean to me, and moreso than >>> e.g. the way vxworks was handled. >>> >>> I have tested that the i686-linux target still passes check-binutils and >>> check-ld. =A0I'm not sure that tests much about correct PLT generation, >>> which is the only area of the shared code really touched here. =A0If th= ere >>> are other good ways to test that (short of rebuilding a whole OS with >>> this linker), please let me know. >>> >>> Ok for trunk? >>> >>> Thanks, >>> Roland >>> >>> >>> bfd/ >>> 2011-07-25 =A0Roland McGrath =A0 >>> >>> =A0 =A0 =A0 =A0* elf32-i386.c (NACL_PLT_ENTRY_SIZE, NACLMASK): New macr= os. >>> =A0 =A0 =A0 =A0(elf_i386_nacl_plt0_entry): New variable. >>> =A0 =A0 =A0 =A0(elf_i386_plt_entry): New variable. >>> =A0 =A0 =A0 =A0(elf_i386_nacl_pic_plt0_entry): New variable. >>> =A0 =A0 =A0 =A0(elf_i386_nacl_pic_plt_entry): New variable. >>> =A0 =A0 =A0 =A0(elf_i386_nacl_arch_bed): New variable. >>> =A0 =A0 =A0 =A0(elf_backend_arch_data): New macro setting for elf_i386_= nacl_vec >>> stanza. >>> =A0 =A0 =A0 =A0(elf_backend_plt_alignment): Likewise. >>> >>> =A0 =A0 =A0 =A0* elf32-i386.c (struct elf_i386_backend_data): New type. >> >> We have elf_i386_link_hash_table for similar purpose. =A0Is that >> possible to put elf_i386_backend_data fields there? >> >> >> H.J. >> > --=20 H.J.