This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Re: EH frame optimization bug
On Wed, Oct 15, 2003 at 06:59:26PM +0100, James Troup wrote:
> "H. J. Lu" <hjl@lucon.org> writes:
>
> > On Wed, Oct 15, 2003 at 02:18:43PM +0100, James Troup wrote:
> >> "H.J. Lu" <hjl@lucon.org> writes:
> >>
> >> > 2003-10-03 H.J. Lu <hongjiu.lu@intel.com>
> >> >
> >> > * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
> >> > last CIE/FDE if needed.
> >>
> >> This patch has regressed binutils on Linux/alpha. After applying the
> >> patch the following (previously PASS) ld tests FAIL:
> >>
> >> +FAIL: vers26b2
> >> +FAIL: vers26b3
> >> +FAIL: vers27d3
> >> +FAIL: vers27d5
> >> +FAIL: weak hidden symbol DSO last
> >> +FAIL: NOCROSSREFS 1
> >>
> >
> > Can you provide more info on that?
>
> Since it's not crashing, not sure what more info you want? I've
> attached the relevant parts of ld.log for what it's worth.
>
> >> This also breaks building of the kernel and other software.
> >
> > Can you verify if you back out just
> >
> > http://sources.redhat.com/ml/binutils/2003-10/msg00130.html
> >
> > everything works fine on Linux/alpha?
>
> Yes. Clean CVS trunk, back out the patch, testsuite regressions
> disappear, kernel compiles etc. Reapply the patch, testsuite
> regresses, kernel fails to compile.
>
Can you try this patch and let me know what you get?
H.J.
----
2003-10-15 H.J. Lu <hongjiu.lu@intel.com>
* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
use the last CIE/FDE from a different section.
--- bfd/elf-eh-frame.c.cross 2003-10-15 12:24:06.000000000 -0700
+++ bfd/elf-eh-frame.c 2003-10-15 13:32:43.000000000 -0700
@@ -372,6 +372,9 @@ _bfd_elf_discard_section_eh_frame
all FDEs. Also, it can be removed if we have removed
all FDEs using it. */
if ((!info->relocatable
+ && hdr_info->last_cie_sec
+ && (sec->output_section
+ == hdr_info->last_cie_sec->output_section)
&& cie_compare (&cie, &hdr_info->last_cie) == 0)
|| cie_usage_count == 0)
{