This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: 3.0 bootstrap failure linux-sparc (gen-num-limits): PATCH
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Subject: Re: 3.0 bootstrap failure linux-sparc (gen-num-limits): PATCH
- From: Benoît Sibaud <benoit dot sibaud at rd dot francetelecom dot com>
- Date: Thu, 28 Jun 2001 18:32:50 +0200
- Organization: France Telecom R&D
- References: <15163.19747.346376.794900@gargle.gargle.HOWL>
> Same here. Seems to be something with the shared version of libstdc++. If
> you link static (or link shared against everything but libstdc++, e.g. by
> simply removing libstdc++.so), it is much better. If I have time, I'll
> take a closer look at it.
Assertion failed in
glibc-2.1.3/glibc-2.1.3/sysdeps/sparc/sparc32/dl-machine.h in this
function [switch case massively snipped].
I think it's the best I can do with my poor knowledge ld.so mecanisms.
##########
/* Perform the relocation specified by RELOC and SYM (which is fully
resolved).
MAP is the object containing the reloc. */
static inline void
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
const Elf32_Sym *sym, const struct r_found_version
*version,
Elf32_Addr *const reloc_addr)
{
#ifndef RTLD_BOOTSTRAP
/* This is defined in rtld.c, but nowhere in the static libc.a; make
the
reference weak so static programs can still link. This declaration
cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP)
because rtld.c contains the common defn for _dl_rtld_map, which is
incompatible with a weak decl in the same file. */
weak_extern (_dl_rtld_map);
#endif
if (ELF32_R_TYPE (reloc->r_info) == R_SPARC_RELATIVE)
{
#ifndef RTLD_BOOTSTRAP
if (map != &_dl_rtld_map) /* Already done in rtld itself. */
#endif
*reloc_addr += map->l_addr + reloc->r_addend;
}
else
{
const Elf32_Sym *const refsym = sym;
Elf32_Addr value;
if (sym->st_shndx != SHN_UNDEF &&
ELF32_ST_BIND (sym->st_info) == STB_LOCAL)
value = map->l_addr;
else
{
value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info));
if (sym)
value += sym->st_value;
}
value += reloc->r_addend; /* Assume copy relocs have zero addend.
*/
switch (ELF32_R_TYPE (reloc->r_info))
{
case R_SPARC_COPY:
case R_SPARC_GLOB_DAT:
case R_SPARC_32:
case R_SPARC_JMP_SLOT:
case R_SPARC_8:
case R_SPARC_16:
case R_SPARC_DISP8:
case R_SPARC_DISP16:
case R_SPARC_DISP32:
case R_SPARC_LO10:
case R_SPARC_WDISP30:
case R_SPARC_HI22:
case R_SPARC_NONE: /* Alright, Wilbur. */
default:
assert (! "unexpected dynamic reloc type");
break;
}
}
}
--
Benoît Sibaud
R&D Engineer - France Telecom