This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Error in readelf...


To be honest, I'm not sure this is a bug in readelf, or it is exposing a bug in
one of the other tools or bfd.  It doesn't seem to be ARM specific however.

readelf -s /usr/X11R6/bin/XF86_SVGA

The program starts to dump its output and dies with the following error:

readelf: Error: Unable to seek to e5ac3c48 for version need aux (3)

Running strace shows:
_llseek(3, 18446744073267851264, 0xbffff94c, SEEK_SET) 
  = -1 EINVAL (Invalid argument)

The problem occurs in the code around line 4309 in readelf.c:

   /* We must test both.  */
   offset = version_info
     [DT_VERSIONTAGIDX (DT_VERNEED)] - loadaddr;

   GET_DATA (offset, evn, "version need");

   ivn.vn_aux  = BYTE_GET (evn.vn_aux);
   ivn.vn_next = BYTE_GET (evn.vn_next);

   do
     {
      unsigned long  vna_off;

      vna_off = offset + ivn.vn_aux;

      do
        {
          Elf_External_Vernaux  evna;

          GET_DATA (vna_off, evna,
                    "version need aux (3)");


I had a breakpoint on the call to error in GET_DATA.  When it stopped I got the
following results on my NetWinder:

(gdb) p vna_off
$18 = 0xe5ac3c48
(gdb) p offset
$19 = 0x26fcc
(gdb) p ivn.vn_aux
$20 = 0x10

These numbers make no sense to me.  I currently distrust my debugger as I'm also
actively debugging it.  I can reproduce the problem with any of the X servers on
my NetWinder.  I can also reproduce the problem on medusa.armlinux.org (its a
Acorn Risc PC running Debian ARM Linux) using /usr/X11R6/bin/XF68_FBDev as
well.  Rod has tried it on his Intel Red Hat boxes, and can reproduce the
problem there.

I don't have time to investigate this further ATM, so I thought I should report
this since binutils is in beta.

Scott

-- 
Scott Bambrough - Software Engineer
REBEL.COM    http://www.rebel.com
NetWinder    http://www.netwinder.org

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]