From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17594 invoked by alias); 24 Oct 2010 04:34:17 -0000 Received: (qmail 16892 invoked by uid 22791); 24 Oct 2010 04:34:15 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_05,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 24 Oct 2010 04:34:10 +0000 Received: (qmail 8220 invoked from network); 24 Oct 2010 04:34:08 -0000 Received: from unknown (HELO ?192.168.0.105?) (mitchell@127.0.0.2) by mail.codesourcery.com with ESMTPA; 24 Oct 2010 04:34:08 -0000 Message-ID: <4CC3B74D.5030501@codesourcery.com> Date: Sun, 24 Oct 2010 04:34:00 -0000 From: Mark Mitchell User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.11) Gecko/20101013 Thunderbird/3.1.5 MIME-Version: 1.0 To: Hans-Peter Nilsson CC: hp@axis.com, iant@google.com, binutils@sourceware.org Subject: Re: RFC: COMDAT group names become anonymouse local symbols References: <201010240334.o9O3YtxO031508@ignucius.se.axis.com> In-Reply-To: <201010240334.o9O3YtxO031508@ignucius.se.axis.com> Content-Type: multipart/mixed; boundary="------------060008050300070408060308" 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: 2010-10/txt/msg00395.txt.bz2 This is a multi-part message in MIME format. --------------060008050300070408060308 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 614 On 10/23/2010 8:34 PM, Hans-Peter Nilsson wrote: >> Does that mean adding a new entry to struct format_ops? > > That's it. I didn't say, because I'm not familiar too with this > code. :) I only discovered it and fixed a few bugs eons ago. I'm traveling tomorrow, so might not get a chance to finish this up. (I need to test a few different configurations to convince myself I've filled in the various blanks correctly.) Here's a preliminary patch which seems to pass the LD testsuite for cris-elf. Does it work for you? Thank you, -- Mark Mitchell CodeSourcery mark@codesourcery.com (650) 331-3385 x713 --------------060008050300070408060308 Content-Type: text/plain; name="gas.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gas.patch" Content-length: 4736 Index: gas/obj.h =================================================================== RCS file: /cvs/src/src/gas/obj.h,v retrieving revision 1.13 diff -c -5 -p -r1.13 obj.h *** gas/obj.h 2 Nov 2009 11:59:14 -0000 1.13 --- gas/obj.h 24 Oct 2010 04:31:40 -0000 *************** struct format_ops { *** 70,79 **** --- 70,80 ---- void (*ecoff_set_ext) (symbolS *, struct ecoff_extr *); void (*read_begin_hook) (void); void (*symbol_new_hook) (symbolS *); void (*symbol_clone_hook) (symbolS *, symbolS *); + void (*adjust_symtab) (void); }; extern const struct format_ops elf_format_ops; extern const struct format_ops ecoff_format_ops; extern const struct format_ops coff_format_ops; Index: gas/config/obj-aout.c =================================================================== RCS file: /cvs/src/src/gas/config/obj-aout.c,v retrieving revision 1.29 diff -c -5 -p -r1.29 obj-aout.c *** gas/config/obj-aout.c 28 Jun 2010 14:06:56 -0000 1.29 --- gas/config/obj-aout.c 24 Oct 2010 04:31:40 -0000 *************** const struct format_ops aout_format_ops *** 308,318 **** obj_aout_sec_sym_ok_for_reloc, aout_pop_insert, 0, /* ecoff_set_ext. */ 0, /* read_begin_hook. */ 0, /* symbol_new_hook. */ ! 0 /* symbol_clone_hook. */ }; const pseudo_typeS aout_pseudo_table[] = { {"line", obj_aout_line, 0}, /* Source code line number. */ --- 308,319 ---- obj_aout_sec_sym_ok_for_reloc, aout_pop_insert, 0, /* ecoff_set_ext. */ 0, /* read_begin_hook. */ 0, /* symbol_new_hook. */ ! 0, /* symbol_clone_hook. */ ! 0 /* adjust_symtab. */ }; const pseudo_typeS aout_pseudo_table[] = { {"line", obj_aout_line, 0}, /* Source code line number. */ Index: gas/config/obj-coff.c =================================================================== RCS file: /cvs/src/src/gas/config/obj-coff.c,v retrieving revision 1.107 diff -c -5 -p -r1.107 obj-coff.c *** gas/config/obj-coff.c 8 Oct 2010 14:00:50 -0000 1.107 --- gas/config/obj-coff.c 24 Oct 2010 04:31:40 -0000 *************** const struct format_ops coff_format_ops *** 1941,1947 **** 0, /* sec_sym_ok_for_reloc */ coff_pop_insert, 0, /* ecoff_set_ext */ coff_obj_read_begin_hook, coff_obj_symbol_new_hook, ! coff_obj_symbol_clone_hook }; --- 1941,1948 ---- 0, /* sec_sym_ok_for_reloc */ coff_pop_insert, 0, /* ecoff_set_ext */ coff_obj_read_begin_hook, coff_obj_symbol_new_hook, ! coff_obj_symbol_clone_hook, ! coff_obj_adjust_symtab }; Index: gas/config/obj-ecoff.c =================================================================== RCS file: /cvs/src/src/gas/config/obj-ecoff.c,v retrieving revision 1.20 diff -c -5 -p -r1.20 obj-ecoff.c *** gas/config/obj-ecoff.c 2 Nov 2009 11:49:48 -0000 1.20 --- gas/config/obj-ecoff.c 24 Oct 2010 04:31:40 -0000 *************** const struct format_ops ecoff_format_ops *** 313,319 **** ecoff_sec_sym_ok_for_reloc, ecoff_pop_insert, ecoff_set_ext, ecoff_read_begin_hook, ecoff_symbol_new_hook, ! ecoff_symbol_clone_hook }; --- 313,320 ---- ecoff_sec_sym_ok_for_reloc, ecoff_pop_insert, ecoff_set_ext, ecoff_read_begin_hook, ecoff_symbol_new_hook, ! ecoff_symbol_clone_hook, ! 0 /* adjust_symtab. */ }; Index: gas/config/obj-elf.c =================================================================== RCS file: /cvs/src/src/gas/config/obj-elf.c,v retrieving revision 1.132 diff -c -5 -p -r1.132 obj-elf.c *** gas/config/obj-elf.c 23 Oct 2010 18:05:08 -0000 1.132 --- gas/config/obj-elf.c 24 Oct 2010 04:31:41 -0000 *************** const struct format_ops elf_format_ops = *** 2444,2450 **** #else 0, /* ecoff_set_ext */ #endif elf_obj_read_begin_hook, elf_obj_symbol_new_hook, ! 0 }; --- 2444,2451 ---- #else 0, /* ecoff_set_ext */ #endif elf_obj_read_begin_hook, elf_obj_symbol_new_hook, ! 0, ! elf_adjust_symtab }; Index: gas/config/obj-multi.h =================================================================== RCS file: /cvs/src/src/gas/config/obj-multi.h,v retrieving revision 1.15 diff -c -5 -p -r1.15 obj-multi.h *** gas/config/obj-multi.h 2 Nov 2009 11:49:48 -0000 1.15 --- gas/config/obj-multi.h 24 Oct 2010 04:31:41 -0000 *************** *** 89,98 **** --- 89,103 ---- #define obj_sec_sym_ok_for_reloc(A) \ (this_format->sec_sym_ok_for_reloc \ ? (*this_format->sec_sym_ok_for_reloc) (A) \ : 0) + #define obj_adjust_symtab() \ + (this_format->adjust_symtab \ + ? (*this_format->adjust_symtab) () \ + : (void) 0) + #define S_GET_SIZE \ (*this_format->s_get_size) #define S_SET_SIZE(S, N) \ (this_format->s_set_size \ --------------060008050300070408060308--