Subject: toolchain/20377: ld dumps core when linking cyrus-sasl on sparc64 (resent, gnats ate #1)
To: None <gnats-bugs@gnats.netbsd.org, martin@duskware.de>
From: Martin Husemann <martin@aprisoft.de>
List: netbsd-bugs
Date: 02/17/2003 00:20:51
>Number:         20377
>Category:       toolchain
>Synopsis:       ld dumps core when linking cyrus-sasl on sparc64
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 16 15:31:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Martin Husemann
>Release:        NetBSD 1.6N
>Organization:
>Environment:
System: NetBSD sunny-weather.duskware.de 1.6N NetBSD 1.6N (SUNNY) #1: Sun Feb 16 01:10:15 CET 2003 martin@sunny-weather.duskware.de:/usr/src/sys/arch/sparc64/compile/SUNNY sparc64
Architecture: sparc64
Machine: sparc64
>Description:

Trying to compile pkgsrc/security/cyrus-sasl dies in saslauthd with a core
dump from ld:

gdb /usr/src/gnu/usr.bin/binutils/ld/ld
...
(gdb) run -m elf64_sparc -dy -dc -dp -e __start -dynamic-linker /usr/libexec/ld.elf_so -o saslauthd /usr/lib/crt0.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/pkgsrc/security/cyrus-sasl/work/.buildlink/lib -R/usr/pkg/lib saslauthd.o mechanisms.o auth_dce.o auth_getpwent.o auth_krb4.o auth_pam.o auth_rimap.o auth_shadow.o auth_sia.o -lcrypt -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o
Starting program: /usr/src/gnu/usr.bin/binutils/ld/ld -m elf64_sparc -dy -dc -dp -e __start -dynamic-linker /usr/libexec/ld.elf_so -o saslauthd /usr/lib/crt0.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/pkgsrc/security/cyrus-sasl/work/.buildlink/lib -R/usr/pkg/lib saslauthd.o mechanisms.o auth_dce.o auth_getpwent.o auth_krb4.o auth_pam.o auth_rimap.o auth_shadow.o auth_sia.o -lcrypt -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o

Program received signal SIGSEGV, Segmentation fault.
sparc64_elf_relocate_section (output_bfd=0x254000, info=0x241b38, 
    input_bfd=0x254400, input_section=0x278870, 
    contents=0x358000 "XXXXXX{-censored-to-avoid-spam-filter}", relocs=0x281690, 
    local_syms=0x267000, local_sections=0x342400)
    at /usr/src/gnu/dist/toolchain/bfd/elf64-sparc.c:1969
1969                     || h->root.type == bfd_link_hash_warning)
(gdb) print h
$1 = (struct elf_link_hash_entry *) 0x0
(gdb) list
1964            }
1965          else
1966            {
1967              h = sym_hashes[r_symndx - symtab_hdr->sh_info];
1968              while (h->root.type == bfd_link_hash_indirect
1969                     || h->root.type == bfd_link_hash_warning)
1970                h = (struct elf_link_hash_entry *) h->root.u.i.link;
1971              if (h->root.type == bfd_link_hash_defined
1972                  || h->root.type == bfd_link_hash_defweak)
1973                {
(gdb) print r_symndx
$2 = 39
(gdb) print symtab_hdr
$3 = (Elf_Internal_Shdr *) 0x278088
(gdb) print *symtab_hdr
$4 = {sh_name = 1, sh_type = 2, sh_flags = 0, sh_addr = 0, sh_size = 1584, 
  sh_entsize = 24, sh_link = 9, sh_info = 8, sh_offset = 6720, 
  sh_addralign = 8, bfd_section = 0x0, contents = 0x0}
(gdb) print sym_hashes[r_symndx - symtab_hdr->sh_info]
$5 = (struct elf_link_hash_entry *) 0x0

>How-To-Repeat:
s.a.
>Fix:
n/a

>Release-Note:
>Audit-Trail:
>Unformatted: