This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: 2.15 ELF linker warning section leaking
- From: "H. J. Lu" <hjl at lucon dot org>
- To: binutils at sources dot redhat dot com
- Date: Fri, 15 Oct 2004 17:45:06 -0700
- Subject: Re: PATCH: 2.15 ELF linker warning section leaking
- References: <20041015234328.GA8868@lucon.org>
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;
}
}
}