Bug 247 - [regression] `local symbol 0' referenced in section `.gcc_except_table': discarded in section ...
Summary: [regression] `local symbol 0' referenced in section `.gcc_except_table': dis...
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: unspecified
: P1 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-01 06:00 UTC by Michael Elizabeth Chastain
Modified: 2004-07-01 20:12 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Last reconfirmed:


Attachments
typescript showing source files and ld output with good and bad ld (3.78 KB, text/plain)
2004-07-01 06:02 UTC, Michael Elizabeth Chastain
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Elizabeth Chastain 2004-07-01 06:00:20 UTC
I'm running the gdb 6.1.1 test suite with gcc 2.95.3 and binutils HEAD.
I'm getting these errors when I compile and link some C++ files:

`local symbol 0' referenced in section `.gcc_except_table': discarded in section
`.basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0>
>::Rep::gnu.linkonce.t.clone(void)' from
/berman/fsf/_current_/berman/install/target/native/gcc/gcc-2.95.3-as-HEAD-ld-HEAD/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/libstdc++.a(cstrmain.o)
`local symbol 1' referenced in section `.gcc_except_table': discarded in section
`.basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0>
>::Rep::gnu.linkonce.t.clone(void)' from
/berman/fsf/_current_/berman/install/target/native/gcc/gcc-2.95.3-as-HEAD-ld-HEAD/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/libstdc++.a(cstrmain.o)

This is a regression from binutils 2.15.
This is with binutils HEAD 2004-07-01 04:26:06 (approximately).
The last known working binutils was binutils HEAD 2004-06-17 18:55:08 UTC.

I'll attach a typescript showing the source files and the output with "gcc -v
..." with good and bad linkers.
Comment 1 Michael Elizabeth Chastain 2004-07-01 06:02:05 UTC
Created attachment 123 [details]
typescript showing source files and ld output with good and bad ld
Comment 2 Michael Elizabeth Chastain 2004-07-01 20:12:56 UTC
I downloaded a fresh binutils and it works for me.  This is binutils 2004-07-01
18:27:41 UTC.

This patch fixed it.

2004-07-01  Alan Modra  <amodra@bigpond.net.au>

        * elflink.c (elf_section_ignore_discarded_relocs): Revert last
        change.  Comment.
        (elf_section_complain_discarded): New function.  Handle
        .gcc_except_table too.
        (elf_link_input_bfd): Rewrite handling of relocs against symbols
        in discarded sections.
        * elf-bfd.h (elf_discarded_section): Protect macro arg.

I ran the gdb 6.1.1 test suite with gdb 6.1.1 and gcc 2.95.3, dwarf-2 and
stabs+, and compared it to results from 2004-06-19.  There were no regressions
and no improvements.

I'm going to mark this RESOLVED/FIXED, let me know if I shouldn't do this to
your bugzilla bugs.  :)

Thanks,

Michael C