Using the addr2errline sample program from
http://linuxgazette.net/151/misc/melinte/addr2line.c
I get the following results:

> gcc addr2errline.c -o addr2errline -lbfd -liberty -lz
> ./addr2errline getlineno 0x804b335 0x804b2aa
main [getlineno.c:61]
ThisLine [getlineno.c:49]

> gcc -m32 addr2errline.c -o addr2errline -lbfd -liberty -lz
> ./addr2errline getlineno 0x804b335 0x804b2aa
>  ** no result, nothing found, 0 lines of output **

It does not depend on the library version. If I link against old 32bit bfd &
liberty librays from x86_32 days of OpenSuse10.1 it does not work either.
Perhaps this is some general incompatibility of 32/64bit plattforms.

Debugging addr2errline.c I found that the error turns out at the following
point:
slurp_symtab(bfd *abfd)
{
...
    if ((bfd_get_file_flags(abfd) & HAS_SYMS) == 0)
        return -1;

binutils-2.19-9.3

-- 
           Summary: libbfd: adr2errline resolution does not work for 32bit
                    programs on x86_64 plattforms
           Product: binutils
           Version: 2.19
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: estellnb at gmail dot com
                CC: bug-binutils at gnu dot org
 GCC build triplet: ELF32, Intel 80386
  GCC host triplet: x86_64
GCC target triplet: i686-pc-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=10151

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to