On Mon, 17 Jul 2000, "Drew Thompson" <[EMAIL PROTECTED]> wrote:
> 
> I'm trying to accomplish so simple a task as untarring a file...
> I get the following error:
> 
> BUG IN DYNAMIC LINKER ld.so: dynamic-link.h: 57: elf_get_dynamic_info: =
> Assertion `! "bad dynamic tag"' failed!
> 
> I get the same error when I try to do an rpm --recompile to install the
> X video goodies for the embedded agp video on the motherboard I'm
> using.  I'm Xless and stuck on a windows box unless I figure this out.
> :-(  Unfortunately I'm not sure where to start...if it were just one =
> file,
> or if it were really video-related, I'd be able to look for a HOWTO,
> but...

This is likely not video related; it is the dynamic linker complaining about
something.

Try running strace(1) with -f on your failing command. Perhaps by following
what files are being opened (i.e. open(2)) you can trace down the root
of the problem. And there may be other clues.

Enclosed below is the code from glibc-2.1.3/elf/dynamic-link.h where the
assert() is failing. Not clear why it would be failing.

Shots in the dark, but, if you can, run ldd(1) (with and w/o -r) and
objdump -p on the programs that are failing. Send the data to me,
strace too, if you like; (or the list, esp if the output looks promising).

Have you changed LD_LIBRARY_PATH or /etc/ld.so.conf recently?

This one appears tough; I'd try running a search on "linux bad dynamic tag"
search at www.deja.com ...


Karl Runge



glibc-2.1.3/elf/dynamic-link.h:

/* Read the dynamic section at DYN and fill in INFO with indices DT_*.  */

static inline void __attribute__ ((unused))
elf_get_dynamic_info (ElfW(Dyn) *dyn, ElfW(Addr) l_addr,
                      ElfW(Dyn) *info[DT_NUM + DT_PROCNUM + DT_VERSIONTAGNUM
                                     + DT_EXTRANUM])
{
  if (! dyn)
    return;

  while (dyn->d_tag != DT_NULL)
    {
      if (dyn->d_tag < DT_NUM)
        info[dyn->d_tag] = dyn;
      else if (dyn->d_tag >= DT_LOPROC &&
               dyn->d_tag < DT_LOPROC + DT_PROCNUM)
        info[dyn->d_tag - DT_LOPROC + DT_NUM] = dyn;
      else if ((Elf32_Word) DT_VERSIONTAGIDX (dyn->d_tag) < DT_VERSIONTAGNUM)
        info[VERSYMIDX (dyn->d_tag)] = dyn;
      else if ((Elf32_Word) DT_EXTRATAGIDX (dyn->d_tag) < DT_EXTRANUM)
        info[DT_EXTRATAGIDX (dyn->d_tag) + DT_NUM + DT_PROCNUM
             + DT_VERSIONTAGNUM] = dyn;
      else
        assert (! "bad dynamic tag");
      ++dyn;
    }

  if (info[DT_PLTGOT] != NULL)
    info[DT_PLTGOT]->d_un.d_ptr += l_addr;
  if (info[DT_STRTAB] != NULL)
    info[DT_STRTAB]->d_un.d_ptr += l_addr;
  if (info[DT_SYMTAB] != NULL)
    info[DT_SYMTAB]->d_un.d_ptr += l_addr;
#if ! ELF_MACHINE_NO_RELA
  if (info[DT_RELA] != NULL)
    {
      assert (info[DT_RELAENT]->d_un.d_val == sizeof (ElfW(Rela)));
      info[DT_RELA]->d_un.d_ptr += l_addr;
    }
#endif
#if ! ELF_MACHINE_NO_REL
  if (info[DT_REL] != NULL)
    {
      assert (info[DT_RELENT]->d_un.d_val == sizeof (ElfW(Rel)));
      info[DT_REL]->d_un.d_ptr += l_addr;
    }
#endif
  if (info[DT_PLTREL] != NULL)
    {
#if ELF_MACHINE_NO_RELA
      assert (info[DT_PLTREL]->d_un.d_val == DT_REL);
#elif ELF_MACHINE_NO_REL
      assert (info[DT_PLTREL]->d_un.d_val == DT_RELA);
#else
      assert (info[DT_PLTREL]->d_un.d_val == DT_REL
              || info[DT_PLTREL]->d_un.d_val == DT_RELA);
#endif
    }
  if (info[DT_JMPREL] != NULL)
    info[DT_JMPREL]->d_un.d_ptr += l_addr;
  if (info[VERSYMIDX (DT_VERSYM)] != NULL)
    info[VERSYMIDX (DT_VERSYM)]->d_un.d_ptr += l_addr;
}


**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to