Local build issue: readelf cannot grok .dwo file during the build of TB and FF.

93 views
Skip to first unread message

ISHIKAWA,chiaki

unread,
Sep 10, 2021, 6:23:16 PM9/10/21
to dev-platform
Hi,

(I am not sure if this is the right mailing list after the mailing list
shuffle. If this list is not appropriate, can you suggest a different
venue?)

I have been compiling TB (and FF lately) locally under Linux for
tracking some bugs.

I use Debian GNU/Linux.
I am using
gcc-10
g++-10
and use split-dwarf (the object and debug symbols are in separate
file.)
Split-dwarf helps reducing the loading time when gdb session is
attempted. (Only the symbols of the loaded object are necessary
instead of the gigantic symbol file of libxul. Hmm I forget the
details now. But it helps debugging session that needs gdb very much
because gdb's
startup time is much, much shorter with split-dwarf.)

Lately, I have noticed readelf errors during the build. (not sure when
this happened.)
The line looks like this. I picked one randomly.

readelf: Warning: Unable to load dwo file:
/NEW-SSD/moz-obj-dir/objdir-tb3/dom/media/doctor/Unified_cpp_dom_media_doctor0.dwo


I vaguely recall reading something about Dwarf5 not being recognized
by some toolchain. I switched from gcc-9 to gcc-10 lately.
Initially I thought this might be it. However, when I checked .dwo
file I found  gcc-10 creates the binary using Dwarf4 format. So this
is not likely the cause of the warning.

$ strings - Unified_cpp_dom_media_doctor0..dwo | grep -i dwarf
GNU C++17 10.3.0 -mtune=generic -march=x86-64 -g -gsplit-dwarf -g -g
-gdwarf-4 -O2 -std=gnu++17 -fstack-protector-strong
-fno-sized-deallocation -faligned-new=0 -fno-builtin-strlen
-fuse-ld=gold -fno-strict-aliasing -fPIC -fno-rtti -ffunction-sections
-fdata-sections -fno-exceptions -fno-math-errno -fvar-tracking
-fvar-tracking-assignments -freorder-blocks -fno-omit-frame-pointer
-funwind-tables -fasynchronous-unwind-tables

Has anyone seen the warning lines?
May this warning result in bad binary behavior (of TB and FF)?
(Well, looking at the command line that produced the warnngs, they are
warnings and probably not serious.)


BTW, I did some debugging.

(1) I found the following bug report search for "readelf: Warning: Unable
to load dwo files".
https://www.mail-archive.com/search?l=bug-bi...@gnu.org&q=subject:%22%5C%5BBug+binutils%5C%2F27391%5C%5D+%5C%5Breadelf%5C%5D+Handle+absolute+DW_AT_dwo_name%22&o=newest&f=1

This is related to the path name handling in the .o.
But readelf on the latest Debian GNU/Linux distribution should be
new enough to contain the above patch, and I even compiled the latest
source from git repo, and there was  no change. I still see the warning
lines.

(2) readelf: Warning: Bogus end-of-siblings marker detected

I searched for clues regarding the above warning message fragment and
found the following web pages.
It seems nasm is not producing correct binary.

https://sourceware.org/pipermail/dwz/2021q1/001117.html
https://sourceware.org/pipermail/dwz/2021q1/001118.html
https://sourceware.org/bugzilla/show_bug.cgi?id=27588
https://bugzilla.nasm.us/show_bug.cgi?id=3392631

Maybe I should try to locate the latest binary of nasm.
Current version of nasm I have under Debian GNU/Linux is
ishikawa@ip030:/NREF-COMM-CENTRAL/mozilla$ nasm --version
NASM version 2.15.05


--- log leading to the warings after I clobber the following object
files and rebuild.
    Unified_cpp_dom_media_doctor0.dwo
    Unified_cpp_dom_media_doctor0.o
    ...

/usr/bin/ccache /usr/bin/g++-10 -std=gnu++17 -U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=2 -fstack-protector-strong -Wall -Wempty-body
-Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits
-Wunreachable-code -Wno-invalid-offsetof -Wc++2a-compat
-Wduplicated-cond -Wimplicit-fallthrough -Wno-error=maybe-uninitialized
-Wno-error=deprecated-declarations -Wno-error=array-bounds
-Wno-error=coverage-mismatch -Wno-error=free-nonheap-object
-Wno-multistatement-macros -Wno-error=class-memaccess
-Wno-error=deprecated-copy -Wno-error=unused-but-set-variable -Wformat
-Wformat-overflow=2 -Wno-psabi -fno-sized-deallocation -fno-aligned-new
-fno-builtin-strlen -Wl,--gdb-index -Dfdatasync=fdatasync
-DDEBUG_4GB_CHECK -DUSEHELGRIND=1 -DUSEVALGRIND=1 -DDEBUG -g
-gsplit-dwarf -Werror=sign-compare -Werror=unused-result
-Werror=unused-variable -Werror=format -fuse-ld=gold -fno-exceptions
-fno-strict-aliasing -fPIC -fno-rtti -ffunction-sections -fdata-sections
-fno-exceptions -fno-math-errno -pthread -pipe -g -g -O2 -fvar-tracking
-gdwarf-4 -fvar-tracking-assignments -freorder-blocks
-fno-omit-frame-pointer -funwind-tables  -shared -Wl,-z,defs
-Wl,--gc-sections -Wl,-h,libxul.so -o libxul.so
/NEW-SSD/moz-obj-dir/objdir-tb3/toolkit/library/build/libxul_so.list
-lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,-z,relro -Wl,-z,nocopyreloc
-Wl,-Bsymbolic-functions -Wl,--build-id=sha1 -Wl,--icf=safe
-fstack-protector-strong
-Wl,-rpath-link,/NEW-SSD/moz-obj-dir/objdir-tb3/dist/bin
-Wl,-rpath-link,/usr/local/lib  -fdiagnostics-color
../../../security/nss/lib/crmf/crmf_crmf/libcrmf.a
../../../js/src/build/libjs_static.a
/NEW-SSD/moz-obj-dir/objdir-tb3/x86_64-unknown-linux-gnu/debug/libgkrust.a
../../../security/sandbox/linux/libmozsandbox.so
../../../comm/ldap/c-sdk/libraries/libldap/libldap60.so
../../../comm/ldap/c-sdk/libraries/libldif/libldif60.so
../../../comm/ldap/c-sdk/libraries/libprldap/libprldap60.so
../../../config/external/nspr/pr/libnspr4.so
../../../config/external/nspr/libc/libplc4.so
../../../config/external/nspr/ds/libplds4.so
../../../config/external/lgpllibs/liblgpllibs.so
../../../security/nss/lib/nss/nss_nss3/libnss3.so
../../../security/nss/lib/util/util_nssutil3/libnssutil3.so
../../../security/nss/lib/smime/smime_smime3/libsmime3.so
../../../config/external/sqlite/libmozsqlite3.so
../../../security/nss/lib/ssl/ssl_ssl3/libssl3.so
../../../widget/gtk/mozgtk/libmozgtk.so
../../../widget/gtk/mozwayland/libmozwayland.so
-Wl,--version-script,symverscript  -ldl  -lrt -lm -lX11 -lX11-xcb -lxcb
-lXcomposite -lXcursor -lXdamage -lXext -lXfixes -lXi -lXrender
-lpthread -ldl -lc -lfreetype -lfontconfig -lgtk-3 -lgdk-3
-lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject
-lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0
-ldbus-glib-1 -ldbus-1 -lxcb-shm
/NEW-SSD/moz-obj-dir/objdir-tb3/_virtualenvs/common/bin/python -m
mozbuild.action.check_binary --target libxul.so
readelf: Warning: Bogus end-of-siblings marker detected at offset 10861
in .debug_info section
readelf: Warning: Bogus end-of-siblings marker detected at offset 10862
in .debug_info section
readelf: Warning: Bogus end-of-siblings marker detected at offset 10863
in .debug_info section
readelf: Warning: Further warnings about bogus end-of-sibling markers
suppressed
readelf: Warning: Unable to load dwo file:
/NEW-SSD/moz-obj-dir/objdir-tb3/media/libopus/Unified_c_media_libopus5.dwo
readelf: Warning: Unable to load dwo file:
/NEW-SSD/moz-obj-dir/objdir-tb3/media/libopus/Unified_c_media_libopus4.dwo
readelf: Warning: Unable to load dwo file:
/NEW-SSD/moz-obj-dir/objdir-tb3/media/libopus/Unified_c_media_libopus3.dwo
readelf: Warning: Unable to load dwo file:
/NEW-SSD/moz-obj-dir/objdir-tb3/media/libopus/Unified_c_media_libopus2.dwo
readelf: Warning: Unable to load dwo file:
/NEW-SSD/moz-obj-dir/objdir-tb3/media/libopus/Unified_c_media_libopus1.dwo
readelf: Warning: Unable to load dwo file:
/NEW-SSD/moz-obj-dir/objdir-tb3/media/libopus/Unified_c_media_libopus0.dwo
readelf: Warning: Unable to load dwo file:
/NEW-SSD/moz-obj-dir/objdir-tb3/media/libopus/x86_silk_map.dwo
         ... ommited ...


Reply all
Reply to author
Forward
0 new messages