public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Mitchell <mark@codesourcery.com>
To: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
Cc: hp@axis.com, iant@google.com, binutils@sourceware.org
Subject: Re: RFC: COMDAT group names become anonymouse local symbols
Date: Sun, 24 Oct 2010 04:34:00 -0000	[thread overview]
Message-ID: <4CC3B74D.5030501@codesourcery.com> (raw)
In-Reply-To: <201010240334.o9O3YtxO031508@ignucius.se.axis.com>

[-- Attachment #1: Type: text/plain, Size: 614 bytes --]

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

[-- Attachment #2: gas.patch --]
[-- Type: text/plain, Size: 4736 bytes --]

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			\

  reply	other threads:[~2010-10-24  4:34 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-19 20:08 Mark Mitchell
2010-10-20 18:05 ` Cary Coutant
2010-10-20 18:19   ` Mark Mitchell
2010-10-21  6:12     ` Cary Coutant
2010-10-21  0:18 ` Alan Modra
2010-10-21  0:31   ` Mark Mitchell
2010-10-21  1:04     ` Ian Lance Taylor
2010-10-21  4:41       ` Mark Mitchell
2010-10-21  5:19         ` H.J. Lu
2010-10-21  5:27           ` Mark Mitchell
2010-10-21  5:41             ` H.J. Lu
2010-10-21  5:42               ` Mark Mitchell
2010-10-21  6:24         ` Alan Modra
2010-10-21 16:41           ` Mark Mitchell
2010-10-21 18:50             ` Daniel Jacobowitz
2010-10-21 20:22               ` Mark Mitchell
2010-10-21 22:19                 ` Alan Modra
2010-10-21 22:41                   ` Mark Mitchell
2010-10-21 23:11                     ` Alan Modra
2010-10-22  3:23                       ` Mark Mitchell
2010-10-22  4:33                         ` Alan Modra
2010-10-22  6:10                           ` Mark Mitchell
2010-10-22  7:16                             ` Alan Modra
2010-10-22 15:34                               ` Mark Mitchell
2010-10-23  8:16                                 ` Alan Modra
2010-10-23 18:05                                   ` Mark Mitchell
2010-10-24  1:15                                     ` Hans-Peter Nilsson
2010-10-24  1:43                                       ` Mark Mitchell
2010-10-24  3:50                                         ` Hans-Peter Nilsson
2010-10-24  4:34                                           ` Mark Mitchell [this message]
2010-10-25 11:45                                             ` Hans-Peter Nilsson
2010-10-25 12:39                                             ` Alan Modra
2010-10-25 15:22                                               ` Mark Mitchell
2010-10-26  3:45                                                 ` Alan Modra
2010-10-26 15:48                                             ` Dave Korn
2010-10-26 15:49                                               ` Mark Mitchell
2010-10-26 15:59                                                 ` Dave Korn
2010-10-26 16:12                                                   ` Dave Korn
2010-10-21  2:12     ` Alan Modra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CC3B74D.5030501@codesourcery.com \
    --to=mark@codesourcery.com \
    --cc=binutils@sourceware.org \
    --cc=hans-peter.nilsson@axis.com \
    --cc=hp@axis.com \
    --cc=iant@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).