public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* (no subject)
@ 2020-09-08  8:48 Nick Clifton
  2020-09-08 15:07 ` plugin handler patch Jeff Law
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Clifton @ 2020-09-08  8:48 UTC (permalink / raw)
  To: binutils

Hi Guys,

  I am checking in the patch below to handle the situation where the
  plugin handler is asked to canonicalize a weak symbol of an unknown
  type.  This situation actually occurred in real life due to a bug in
  the LTO plugin, and that bug was made worse by the code in the handler
  not detecting it and leaving the section pointer set to NULL.

Cheers
  Nick

bfd/ChangeLog
2020-09-08  Nick Clifton  <nickc@redhat.com>

	* plugin.c (bfd_plugin_canonicalize_symtab): Handle the case of an
	unrecognized symbol type in a weak definition.

diff --git a/bfd/plugin.c b/bfd/plugin.c
index 593e277747..bed98520da 100644
--- a/bfd/plugin.c
+++ b/bfd/plugin.c
@@ -640,6 +640,8 @@ bfd_plugin_canonicalize_symtab (bfd *abfd,
 	  if (current_plugin->has_symbol_type)
 	    switch (syms[i].symbol_type)
 	      {
+	      default:
+		/* FIXME: Should we issue an error here ?  */
 	      case LDST_UNKNOWN:
 		/* What is the best fake section for LDST_UNKNOWN?  */
 	      case LDST_FUNCTION:


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

* plugin handler patch
  2020-09-08  8:48 Nick Clifton
@ 2020-09-08 15:07 ` Jeff Law
  2020-09-08 15:26   ` Nick Clifton
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Law @ 2020-09-08 15:07 UTC (permalink / raw)
  To: Nick Clifton, binutils

On Tue, 2020-09-08 at 09:48 +0100, Nick Clifton via Binutils wrote:
> Hi Guys,
> 
>   I am checking in the patch below to handle the situation where the
>   plugin handler is asked to canonicalize a weak symbol of an unknown
>   type.  This situation actually occurred in real life due to a bug in
>   the LTO plugin, and that bug was made worse by the code in the handler
>   not detecting it and leaving the section pointer set to NULL.
> 
> Cheers
>   Nick
> 
> bfd/ChangeLog
> 2020-09-08  Nick Clifton  <nickc@redhat.com>
> 
> 	* plugin.c (bfd_plugin_canonicalize_symtab): Handle the case of an
> 	unrecognized symbol type in a weak definition.
If I'm reading this correctly, it's our position that the nm fault this fixes is
really a problem in the linker plugin.  Right?  Meaning there's no significant
pressure to get this into rawhide.  We can just pick it up via the usual updates
when they happen.

Thanks,
Jeff


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

* Re: plugin handler patch
  2020-09-08 15:07 ` plugin handler patch Jeff Law
@ 2020-09-08 15:26   ` Nick Clifton
  2020-09-08 15:29     ` Jeff Law
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Clifton @ 2020-09-08 15:26 UTC (permalink / raw)
  To: law, binutils

Hi Jeff,

> If I'm reading this correctly, it's our position that the nm fault this fixes is
> really a problem in the linker plugin.  Right?

Right - this is just a fix to ensure better behaviour in the linker for
when the plugin does go wrong.  

> Meaning there's no significant
> pressure to get this into rawhide.  We can just pick it up via the usual updates
> when they happen.

Well, if we do not fix the lto plugin soon, then importing the binutils patch
will make the linker less likely to seg-fault.  But not by much ... :-)

Cheers
  Nick


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

* Re: plugin handler patch
  2020-09-08 15:26   ` Nick Clifton
@ 2020-09-08 15:29     ` Jeff Law
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Law @ 2020-09-08 15:29 UTC (permalink / raw)
  To: Nick Clifton, binutils

On Tue, 2020-09-08 at 16:26 +0100, Nick Clifton wrote:
> Hi Jeff,
> 
> > If I'm reading this correctly, it's our position that the nm fault this fixes is
> > really a problem in the linker plugin.  Right?
> 
> Right - this is just a fix to ensure better behaviour in the linker for
> when the plugin does go wrong.  
> 
> > Meaning there's no significant
> > pressure to get this into rawhide.  We can just pick it up via the usual updates
> > when they happen.
> 
> Well, if we do not fix the lto plugin soon, then importing the binutils patch
> will make the linker less likely to seg-fault.  But not by much ... :-)
I'm going to work with Jakub to figure out a reasonable plan.  There's 3 patches
I'm aware of that would be useful to get into rawhide.  The plugin patch, plus
two of Jakub's that fix gcc bugs.

The trick is with 24+ hour turnaround times, we don't want to unnecessarily spin
Fedora builds.

Jeff


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

end of thread, other threads:[~2020-09-08 15:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-08  8:48 Nick Clifton
2020-09-08 15:07 ` plugin handler patch Jeff Law
2020-09-08 15:26   ` Nick Clifton
2020-09-08 15:29     ` Jeff Law

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