public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* pr2342
@ 2006-05-10 10:00 Alan Modra
  2006-05-10 17:02 ` pr2342 H. J. Lu
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Modra @ 2006-05-10 10:00 UTC (permalink / raw)
  To: binutils

I don't know what to do about pr2342.  I'm inclined to revert my
2006-02-16 bfd/elflink.c change for 2.17, simply because I haven't
developed a proper fix.  In any case, zeroing out debug fields pointing
into discarded sections has its own problems.  eg, in some sections, a
zero is a list terminator so poking zeros in the middle of a list isn't
correct.  We really need to edit the debug info, and fix all the refs.

	PR 2342
	* elflink.c (_bfd_elf_default_action_discarded): Revert 2006-02-16.

Index: bfd/elflink.c
===================================================================
RCS file: /cvs/src/src/bfd/elflink.c,v
retrieving revision 1.211
diff -u -p -r1.211 elflink.c
--- bfd/elflink.c	2 May 2006 01:41:20 -0000	1.211
+++ bfd/elflink.c	10 May 2006 04:24:37 -0000
@@ -6758,7 +6758,7 @@ unsigned int
 _bfd_elf_default_action_discarded (asection *sec)
 {
   if (sec->flags & SEC_DEBUGGING)
-    return 0;
+    return PRETEND;
 
   if (strcmp (".eh_frame", sec->name) == 0)
     return 0;

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: pr2342
  2006-05-10 10:00 pr2342 Alan Modra
@ 2006-05-10 17:02 ` H. J. Lu
  2006-05-11  8:56   ` pr2342 Alan Modra
  0 siblings, 1 reply; 4+ messages in thread
From: H. J. Lu @ 2006-05-10 17:02 UTC (permalink / raw)
  To: binutils

On Wed, May 10, 2006 at 02:15:52PM +0930, Alan Modra wrote:
> I don't know what to do about pr2342.  I'm inclined to revert my
> 2006-02-16 bfd/elflink.c change for 2.17, simply because I haven't
> developed a proper fix.  In any case, zeroing out debug fields pointing
> into discarded sections has its own problems.  eg, in some sections, a
> zero is a list terminator so poking zeros in the middle of a list isn't
> correct.  We really need to edit the debug info, and fix all the refs.
> 
> 	PR 2342
> 	* elflink.c (_bfd_elf_default_action_discarded): Revert 2006-02-16.
> 

This patch speeds up the linker when comparing sections by caching
the result of _bfd_elf_check_kept_section:

http://sourceware.org/ml/binutils/2006-04/msg00329.html


H.J.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: pr2342
  2006-05-10 17:02 ` pr2342 H. J. Lu
@ 2006-05-11  8:56   ` Alan Modra
  2006-05-12 20:54     ` pr2342 H. J. Lu
  0 siblings, 1 reply; 4+ messages in thread
From: Alan Modra @ 2006-05-11  8:56 UTC (permalink / raw)
  To: H. J. Lu; +Cc: binutils

On Wed, May 10, 2006 at 08:13:54AM -0700, H. J. Lu wrote:
> http://sourceware.org/ml/binutils/2006-04/msg00329.html

Please install the fix for match_group_member to mainline and 2.17
branch.  The rest of the patch needs some thought.  I'd like to avoid
the need for another elf_section_data field.  Can't you simply store the
group member in asection kept_section?  In fact, why are we pointing
kept_section of a group member to the kept group section rather than a
kept group member?  Won't that break emit_relocs code in
elf_link_input_bfd?

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: pr2342
  2006-05-11  8:56   ` pr2342 Alan Modra
@ 2006-05-12 20:54     ` H. J. Lu
  0 siblings, 0 replies; 4+ messages in thread
From: H. J. Lu @ 2006-05-12 20:54 UTC (permalink / raw)
  To: binutils

On Thu, May 11, 2006 at 12:41:48PM +0930, Alan Modra wrote:
> On Wed, May 10, 2006 at 08:13:54AM -0700, H. J. Lu wrote:
> > http://sourceware.org/ml/binutils/2006-04/msg00329.html
> 
> Please install the fix for match_group_member to mainline and 2.17
> branch.  The rest of the patch needs some thought.  I'd like to avoid
> the need for another elf_section_data field.  Can't you simply store the
> group member in asection kept_section?  In fact, why are we pointing
> kept_section of a group member to the kept group section rather than a
> kept group member?  Won't that break emit_relocs code in
> elf_link_input_bfd?
> 

The current scheme is to find the group member on demand. We can cache
the result in asection kept_section if we check it when set it,
regardless if it is used or not.  In order to cache the result on
demand, we need another field.


H.J.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-05-12 14:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-10 10:00 pr2342 Alan Modra
2006-05-10 17:02 ` pr2342 H. J. Lu
2006-05-11  8:56   ` pr2342 Alan Modra
2006-05-12 20:54     ` pr2342 H. J. Lu

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).