On Fri, Feb 11, 2022 at 08:01:45PM +0100, Zbigniew Jędrzejewski-Szmek wrote: > Hi! > > I did some quick'n'dirty statistics of how many ELF files successfully gained > a .package.note section. > > packages: 28742, see [1] for the list (*) > ELF files: 72464, see [2] > ELF files with .package.note: 47939, see [3] > ELF files without: 24525, see [4] > > It turns out that many of those are special files. I filtered > out '\.(mod|o|h|cmxs|go|syso|c32|fas|wcx|wdx|dsx|wlx|wfx|out|dyn.*none)$' (**). > Most of those seem irrelevant, in particular .o hasn't been linked, > so it can't have the notes section… > > ELF files after filtering: 15723, see [5] > packages for those filtered files: 4659, see [6] > > I did some quick analysis, and the reasons why the notes section is > missing differ: > - 460 packages don't have the .fc36 tag, so they weren't rebuilt > - some packages I checked were built before the mass rebuild and > got the .fc36 disttag, but failed in the subsequent mass rebuild > - opt-outs: > 895 ghc packages > 210+ ocaml packages > 197 R packages > 30 ruby packages > 61 python packages > > That still leaves quite a lot of packages without the notes, but I think > more manual analysis would be necessary to figure out the reasons. Some other common failure modes: - rust binaries (not rust-*-devel): it seems to be a general issue with the cargo build process. Manually inserting "-Clink-args=-Wl,-dT,…/.package_note-….ld" into a rustc command seems to work. So maybe it's just a matter of find the right flags for cargo. - go binaries: same. E.g. for 3mux I see: + go build -buildmode pie -compiler gc '-tags=rpm_crashtraceback ' -ldflags ' -X github.com/aaronjanse/3mux/version=1.0.1 -B 0x383b831c21c2e07438685900d5a662a268d4e0ec -compressdwarf=false -extldflags '\''-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,/builddir/build/BUILD/3mux-1.0.1/.package_note-3mux-1.0.1-4.fc36.x86_64.ld '\''' -a -v -x -o /builddir/build/BUILD/3mux-1.0.1/_build/bin/3mux github.com/aaronjanse/3mux but 'readelf -n -W /usr/bin/3mux only' shows .note.gnu.build-id and .note.go.buildid. I actually think it'd be useful to fix the note additions for rust and go. Both rust and go binaries are fairly portable between different systems, and the notes would help identify such binaries. I'll see if I can figure out rust… I don't know anything about go, so any help would welcome. Zbyszek _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure