PATCH: Fix reloc ref count for ELF/alpha
H. J. Lu
hjl@lucon.org
Sat Sep 21 00:05:00 GMT 2002
On Tue, Sep 17, 2002 at 09:02:41PM +0400, Andrey Slepuhin wrote:
> On Tue, Sep 17, 2002 at 09:08:42AM -0700, H. J. Lu wrote:
>
> [snip]
>
> > A small testcase?
>
> Ok, I found a small testcase, but it uses exceptions (though my application
> really doesn't). Linker segfaults in the same place.
>
> #include <stdlib.h>
>
> int main()
> {
> try {
> throw int(2);
> } catch (...) {
> exit(1);
> }
> return 0;
> }
>
> [pooh@beta examples]$ g++ -static-libgcc test.cc -L../libstdc++-stub/ -lsupc++
> -lpthread
> collect2: ld terminated with signal 11 [Segmentation fault]
>
Here is a patch. Richard, why does alpha merge the reloc ref count for
different .reloc sections?
H.J.
-------------- next part --------------
2002-09-20 H.J. Lu <hjl@gnu.org>
* elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
the relocation count between different .reloc sections.
--- bfd/elf64-alpha.c.ind Wed Sep 18 21:48:26 2002
+++ bfd/elf64-alpha.c Fri Sep 20 16:57:34 2002
@@ -3403,7 +3403,7 @@ elf64_alpha_merge_ind_symbols (hi, dummy
{
rin = ri->next;
for (rs = rsh; rs ; rs = rs->next)
- if (ri->rtype == rs->rtype)
+ if (ri->rtype == rs->rtype && ri->srel == rs->srel)
{
rs->count += ri->count;
goto found_reloc;
More information about the Binutils
mailing list