Re: [gcc 9.1.0] addr2line can't find file name and line number with shared library when enable -flto

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



BTW, I used gcc-ar, and only -flto is used for lto optimization, without
-fuse-linker-plugin, I had tried to add it, but seems the same.

On Wed, Oct 14, 2020 at 1:47 PM Jiany Wu <wujianyue000@xxxxxxxxx> wrote:

> Hi,
>
> Could you help give a hand about this issue? Or any suggestions?
>
> Can find function but can't find file and line.
> Thanks indeed in advance.
>
>
>
> $ readelf -a libfoo.so | grep foo
>
>   9374: 0000000000783080   179 FUNC    GLOBAL DEFAULT   12 foo
>
>  30182: 0000000000783080   179 FUNC    GLOBAL DEFAULT   12 foo
>
>
>
> $ addr2line 0x783080 -f
>
> foo
>
> ??:?
>
>
> Gcc version:
>
> Target: x86_64-poky-linux
>
> Configured with:
> ../../../../../../work-shared/gcc-9.1.0-r0/gcc-9.1.0/configure
> --build=x86_64-linux --host=x86_64-pokysdk-linux --target=x86_64-poky-linux
> --prefix=/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr
> --exec_prefix=/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr
> --bindir=/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/x86_64-poky-linux
> --sbindir=/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/x86_64-poky-linux
> --libexecdir=/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/libexec/x86_64-poky-linux
> --datadir=/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/share
> --sysconfdir=/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/etc
> --sharedstatedir=/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/com
> --localstatedir=/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/var
> --libdir=/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/lib/x86_64-poky-linux
> --includedir=/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/include
> --oldincludedir=/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/include
> --infodir=/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/share/info
> --mandir=/opt/poky/2.1.1/sysroots/x86_64-pokysdk-linux/usr/share/man
> --disable-silent-rules
> --disable-dependency-tracking--enable-clocale=generic --with-gnu-ld
> --enable-shared --enable-languages=c,c++ --enable-threads=posix
> --enable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu
> --program-prefix=x86_64-poky-linux- --without-local-prefix --enable-lto
> --disable-libssp --enable-libitm --disable-bootstrap --disable-libmudflap
> --with-system-zlib --with-linker-hash-style=gnu --enable-linker-build-id
> --with-ppl=no --with-cloog=no --enable-checking=release
> --enable-cheaders=c_global --without-isl
> --with-gxx-include-dir=/not/exist/usr/include/c++/9.1.0
> --with-sysroot=/not/exist --enable-poison-system-directories
> --disable-static --with-glibc-version=2.28 --enable-__cxa_atexit
> --disable-plugin --enable-fix-cortex-a53-835769 --enable-__cxa_atexit
> --enable-libmudflap --enable-libgomp --disable-libstdcxx-pch
>
> Thread model: posix
>
> gcc version 9.1.0 (GCC)
>
>
>
> Addr2line version:
>
> GNU addr2line (GNU Binutils) 2.31.0.20180718
>
> Copyright (C) 2018 Free Software Foundation, Inc.
>
> This program is free software; you may redistribute it under the terms of
>
> the GNU General Public License version 3 or (at your option) any later
> version.
>
> This program has absolutely no warranty.
>
>
>
>
> ./Jianyue
>



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux