From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12046 invoked by alias); 27 Jul 2011 22:13:41 -0000 Received: (qmail 12038 invoked by uid 22791); 27 Jul 2011 22:13:40 -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,TW_FX 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; Wed, 27 Jul 2011 22:13:24 +0000 Received: by qyk32 with SMTP id 32so2988408qyk.0 for ; Wed, 27 Jul 2011 15:13:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.99.145 with SMTP id u17mr254313qcn.236.1311804803408; Wed, 27 Jul 2011 15:13:23 -0700 (PDT) Received: by 10.229.98.193 with HTTP; Wed, 27 Jul 2011 15:13:23 -0700 (PDT) In-Reply-To: References: Date: Wed, 27 Jul 2011 22:35:00 -0000 Message-ID: Subject: Re: [PATCH] clean up elf32-i386-vxworks hooking mechanism 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/msg00246.txt.bz2 On Wed, Jul 27, 2011 at 2:49 PM, Roland McGrath wrote: > This cleans up the BFD elf32-i386 target vector to put its > backend-specific parameters into a new struct hung off of struct > elf_backend_data rather than overloading struct elf_i386_link_hash_table > for this purpose. =A0The latter is actual dynamic state. =A0The former is > just a constant table that varies by particular backend. > > I tested that this showed no regressions for --target=3Di686-wrs-vxworks > compared to the unmodified trunk. =A0However, since I don't actually have > vxworks, I'm not sure how thorough my testing really was. =A0To be able to > do any tests at all, I built gcc --target=3Di686-wrs-vxworks from the 4.6 > branch. =A0But I was not able to do a really usable build, i.e. no libgcc, > just gcc itself (--enable-languages=3Dc). =A0The results (both before and > after this bfd change) look like this: > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=3D=3D=3D binutils Summary= =3D=3D=3D > > =A0 =A0 =A0 =A0# of expected passes =A0 =A0 =A0 =A0 =A0 =A072 > =A0 =A0 =A0 =A0# of expected failures =A0 =A0 =A0 =A0 =A01 > =A0 =A0 =A0 =A0# of untested testcases =A0 =A0 =A0 =A0 8 > =A0 =A0 =A0 =A0# of unsupported tests =A0 =A0 =A0 =A0 =A09 > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=3D=3D=3D ld Summary =3D= =3D=3D > > =A0 =A0 =A0 =A0# of expected passes =A0 =A0 =A0 =A0 =A0 =A058 > =A0 =A0 =A0 =A0# of expected failures =A0 =A0 =A0 =A0 =A05 > =A0 =A0 =A0 =A0# of untested testcases =A0 =A0 =A0 =A0 12 > =A0 =A0 =A0 =A0# of unsupported tests =A0 =A0 =A0 =A0 =A013 > > Ok for trunk? > > > Thanks, > Roland > > > bfd/ > 2011-07-27 =A0Roland McGrath =A0 > > =A0 =A0 =A0 =A0* elf32-i386.c (struct elf_i386_backend_data): New type. > =A0 =A0 =A0 =A0(get_elf_i386_backend_data): New macro. > =A0 =A0 =A0 =A0(elf_i386_arch_bed): New variable. > =A0 =A0 =A0 =A0(elf_backend_arch_data): New macro. > =A0 =A0 =A0 =A0(struct elf_i386_link_hash_table): Remove plt0_pad_byte an= d is_vxworks. > =A0 =A0 =A0 =A0(elf_i386_link_hash_table_create): Don't initialize them. > =A0 =A0 =A0 =A0(elf_i386_create_dynamic_sections): Find is_vxworks flags = in > =A0 =A0 =A0 =A0elf_i386_backend_data, not elf_i386_link_hash_table. > =A0 =A0 =A0 =A0(elf_i386_adjust_dynamic_symbol): Likewise. > =A0 =A0 =A0 =A0(elf_i386_allocate_dynrelocs): Likewise. > =A0 =A0 =A0 =A0(elf_i386_readonly_dynrelocs): Likewise. > =A0 =A0 =A0 =A0(elf_i386_size_dynamic_sections): Likewise. > =A0 =A0 =A0 =A0(elf_i386_relocate_section): Likewise. > =A0 =A0 =A0 =A0(elf_i386_finish_dynamic_symbol): Likewise. > =A0 =A0 =A0 =A0(elf_i386_finish_dynamic_sections): Likewise. =A0Same for = plt0_pad_byte. > =A0 =A0 =A0 =A0(elf_i386_vxworks_link_hash_table_create): Function remove= d. > =A0 =A0 =A0 =A0(elf_i386_vxworks_arch_bed): New variable. > =A0 =A0 =A0 =A0(elf_backend_arch_data): New macro in elf32-i386-vxworks s= tanza. > > =A0 =A0 =A0 =A0* elf-bfd.h (elf_backend_data): New member arch_backend_da= ta. > =A0 =A0 =A0 =A0* elfxx-target.h (elf_backend_arch_data): New macro. > =A0 =A0 =A0 =A0(elfNN_bed): Use it as initializer for the new member. > elf32-i386.c change is OK. Thanks. --=20 H.J.