public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PATCH: 2.15 ELF linker warning section leaking
@ 2004-10-15 23:43 H. J. Lu
  2004-10-16  0:45 ` H. J. Lu
  0 siblings, 1 reply; 3+ messages in thread
From: H. J. Lu @ 2004-10-15 23:43 UTC (permalink / raw)
  To: binutils

I got a bug report that 2.15 linker generates bad output under certain
conditions where warning sections leaked into .text output. This patch
seems to fix it. It seems to safe to me. Any comments?


H.J.
---
2004-10-15  H.J. Lu  <hongjiu.lu@intel.com>

	* elflink.c (elf_link_add_object_symbols): Also clear
	_cooked_size for warning sections.

--- bfd/elflink.c.warning	2004-10-14 15:09:58.000000000 -0700
+++ bfd/elflink.c	2004-10-15 16:35:00.835418219 -0700
@@ -3014,6 +3014,7 @@ elf_link_add_object_symbols (bfd *abfd, 
 		  /* Clobber the section size so that the warning does
 		     not get copied into the output file.  */
 		  s->_raw_size = 0;
+		  s->_cooked_size = 0;
 		}
 	    }
 	}

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

* Re: PATCH: 2.15 ELF linker warning section leaking
  2004-10-15 23:43 PATCH: 2.15 ELF linker warning section leaking H. J. Lu
@ 2004-10-16  0:45 ` H. J. Lu
  2004-10-16  2:57   ` Alan Modra
  0 siblings, 1 reply; 3+ messages in thread
From: H. J. Lu @ 2004-10-16  0:45 UTC (permalink / raw)
  To: binutils

On Fri, Oct 15, 2004 at 04:43:28PM -0700, H. J. Lu wrote:
> I got a bug report that 2.15 linker generates bad output under certain
> conditions where warning sections leaked into .text output. This patch
> seems to fix it. It seems to safe to me. Any comments?
> 
> 
> H.J.
> ---
> 2004-10-15  H.J. Lu  <hongjiu.lu@intel.com>
> 
> 	* elflink.c (elf_link_add_object_symbols): Also clear
> 	_cooked_size for warning sections.
> 

This may be is the right one for binutils 2.15.


H.J.
---
2004-10-15  H.J. Lu  <hongjiu.lu@intel.com>

	* elflink.h (elf_link_add_object_symbols): Also clear
	_cooked_size for warning sections.

--- bfd/elflink.h.warning	2004-03-03 12:24:33.000000000 -0800
+++ bfd/elflink.h	2004-10-15 17:33:43.235987000 -0700
@@ -169,6 +169,7 @@ elf_link_add_object_symbols (bfd *abfd, 
 			 the section size so that the warning does not
 			 get copied into the output file.  */
 		      s->_raw_size = 0;
+		      s->_cooked_size = 0;
 		      continue;
 		    }
 		}
@@ -195,6 +196,7 @@ elf_link_add_object_symbols (bfd *abfd, 
 		  /* Clobber the section size so that the warning does
 		     not get copied into the output file.  */
 		  s->_raw_size = 0;
+		  s->_cooked_size = 0;
 		}
 	    }
 	}

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

* Re: PATCH: 2.15 ELF linker warning section leaking
  2004-10-16  0:45 ` H. J. Lu
@ 2004-10-16  2:57   ` Alan Modra
  0 siblings, 0 replies; 3+ messages in thread
From: Alan Modra @ 2004-10-16  2:57 UTC (permalink / raw)
  To: H. J. Lu; +Cc: binutils

On Fri, Oct 15, 2004 at 05:45:06PM -0700, H. J. Lu wrote:
> 2004-10-15  H.J. Lu  <hongjiu.lu@intel.com>
> 
> 	* elflink.h (elf_link_add_object_symbols): Also clear
> 	_cooked_size for warning sections.

Actually, 2.15 didn't have elflink.h.  It wouldn't hurt to apply this
patch to the 2.15 branch elflink.c though.  I'm not exactly sure why it
should be necessary, but I am sure the patch is safe.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

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

end of thread, other threads:[~2004-10-16  2:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-15 23:43 PATCH: 2.15 ELF linker warning section leaking H. J. Lu
2004-10-16  0:45 ` H. J. Lu
2004-10-16  2:57   ` Alan Modra

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