[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/29993] objcopy --merge-notes slow for large .so with many
From: |
wcohen at redhat dot com |
Subject: |
[Bug binutils/29993] objcopy --merge-notes slow for large .so with many annobin notes |
Date: |
Thu, 12 Jan 2023 21:25:15 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=29993
--- Comment #2 from William Cohen <wcohen at redhat dot com> ---
I believe the large number of notes is because of the use of static libraries
in the packages. Took a look at how the some of the shared libraries were
generated in the mesa package which has a similar but not so extreme percentage
of time taken by the gnu_merge_build_notes function (20% rather than 70% of the
rpmbuild install). For example the libdpau_gallium.so.1.0.0 was linked with the
following:
[2390/2405] g++ -o src/gallium/targets/vdpau/libvdpau_gallium.so.1.0.0
src/gallium/targets/vdpau/libvdpau_gallium.so.1.0.0.p/target.c.o
-Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group
-Wl,-soname,libvdpau_gallium.so.1.0.0 -Wl,--whole-archive
src/gallium/frontends/vdpau/libvdpau_st.a -Wl,--no-whole-archive -Wl,-z,relro
-Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1
-Wl,-dT,/home/wcohen/rpmbuild/BUILD/mesa-22.1.7/.package_note-mesa-22.1.7-1.fc36.x86_64.ld
-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
src/gallium/auxiliary/libgalliumvlwinsys.a src/util/libmesa_util.a
src/util/format/libmesa_format.a src/gallium/auxiliary/libgalliumvl.a
src/gallium/auxiliary/libgallium.a src/compiler/nir/libnir.a
src/compiler/libcompiler.a
src/gallium/auxiliary/pipe-loader/libpipe_loader_static.a
src/loader/libloader.a src/util/libxmlconfig.a
src/gallium/winsys/sw/null/libws_null.a src/gallium/winsys/sw/wrapper/libwsw.a
src/gallium/winsys/sw/dri/libswdri.a
src/gallium/winsys/sw/kms-dri/libswkmsdri.a src/gallium/drivers/r300/libr300.a
src/gallium/winsys/radeon/drm/libradeonwinsys.a
src/gallium/drivers/r600/libr600.a src/mesa/libmesa.a
src/compiler/glsl/libglsl.a src/compiler/glsl/glcpp/libglcpp.a
src/mesa/libmesa_sse41.a src/gallium/drivers/radeonsi/libradeonsi_gfx6.a
src/gallium/drivers/radeonsi/libradeonsi_gfx7.a
src/gallium/drivers/radeonsi/libradeonsi_gfx8.a
src/gallium/drivers/radeonsi/libradeonsi_gfx9.a
src/gallium/drivers/radeonsi/libradeonsi_gfx10.a
src/gallium/drivers/radeonsi/libradeonsi_gfx103.a
src/gallium/drivers/radeonsi/libradeonsi.a
src/gallium/winsys/amdgpu/drm/libamdgpuwinsys.a src/amd/addrlib/libaddrlib.a
src/amd/common/libamd_common.a src/amd/llvm/libamd_common_llvm.a
src/gallium/winsys/nouveau/drm/libnouveauwinsys.a
src/gallium/drivers/nouveau/libnouveau.a -Wl,--version-script
/home/wcohen/rpmbuild/BUILD/mesa-22.1.7/src/gallium/targets/vdpau/vdpau.sym
-Wl,--dynamic-list
/home/wcohen/rpmbuild/BUILD/mesa-22.1.7/src/gallium/targets/vdpau/../dri-vdpau.dyn
-Wl,--gc-sections /usr/lib64/libz.so -pthread -lm /usr/lib64/libdrm.so
/usr/lib64/libxcb-sync.so /usr/lib64/libxcb-present.so
/usr/lib64/libxshmfence.so /usr/lib64/libxcb-xfixes.so
/usr/lib64/libxcb-dri3.so /usr/lib64/libzstd.so /usr/lib64/libunwind.so
-lLLVM-14 -lsensors /usr/lib64/libexpat.so /usr/lib64/libdrm_radeon.so
-lLLVM-14 /usr/lib64/libelf.so -lLLVM-14 -lLLVM-14 -lLLVM-14 -lLLVM-14
-lLLVM-14 -lLLVM-14 -lLLVM-14 -lLLVM-14 -lLLVM-14 /usr/lib64/libdrm_amdgpu.so
-lLLVM-14 /usr/lib64/libdrm_nouveau.so /usr/lib64/libxcb.so
/usr/lib64/libX11-xcb.so /usr/lib64/libX11.so /usr/lib64/libxcb-dri2.so
-Wl,--end-group
Individual static library in there hvae thousands of lines of notes:
$ readelf --notes --wide src/gallium/frontends/vdpau/libvdpau_st.a |wc
3192 29512 253834
$ readelf --notes --wide src/gallium/drivers/nouveau/libnouveau.a |wc
65270 604954 5272013
To see how much a difference there is between static and shared libraries notes
I compared the static and shared libraries from libpfm-4.11.0-10.fc37.src.rpm.
The static library has a couple orders of magnitude more notes than the shared
library:
[wcohen@haro SPECS]$ readelf --notes --wide /usr/lib64/libpfm.a |wc
9209 84135 705543
[wcohen@haro SPECS]$ readelf --notes --wide /usr/lib64/libpfm.so.4.10.1 |wc
32 249 2467
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/29993] New: objcopy --merge-notes slow for large .so with many annobin notes, fche at redhat dot com, 2023/01/12
- [Bug binutils/29993] objcopy --merge-notes slow for large .so with many annobin notes, wcohen at redhat dot com, 2023/01/12
- [Bug binutils/29993] objcopy --merge-notes slow for large .so with many annobin notes, mark at klomp dot org, 2023/01/12
- [Bug binutils/29993] objcopy --merge-notes slow for large .so with many annobin notes,
wcohen at redhat dot com <=
- [Bug binutils/29993] objcopy --merge-notes slow for large .so with many annobin notes, nickc at redhat dot com, 2023/01/13
- [Bug binutils/29993] objcopy --merge-notes slow for large .so with many annobin notes, wcohen at redhat dot com, 2023/01/13
- [Bug binutils/29993] objcopy --merge-notes slow for large .so with many annobin notes, fche at redhat dot com, 2023/01/13
- [Bug binutils/29993] objcopy --merge-notes slow for large .so with many annobin notes, nickc at redhat dot com, 2023/01/16
- [Bug binutils/29993] objcopy --merge-notes slow for large .so with many annobin notes, wcohen at redhat dot com, 2023/01/16
- [Bug binutils/29993] objcopy --merge-notes slow for large .so with many annobin notes, cvs-commit at gcc dot gnu.org, 2023/01/18
- [Bug binutils/29993] objcopy --merge-notes slow for large .so with many annobin notes, fche at redhat dot com, 2023/01/18