Bug 1998472

Summary: annocheck complains "MAYB: test: notes" on empty program [aarch64]
Product: Red Hat Enterprise Linux 9 Reporter: Václav Kadlčík <vkadlcik>
Component: annobinAssignee: Nick Clifton <nickc>
Status: CLOSED ERRATA QA Contact: Václav Kadlčík <vkadlcik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: fweimer, mcermak, nickc
Target Milestone: rcKeywords: Bugfix, Triaged
Target Release: ---   
Hardware: aarch64   
OS: Unspecified   
Whiteboard:
Fixed In Version: annobin-10.06-1.el9 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-17 12:33:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Václav Kadlčík 2021-08-27 10:26:50 UTC
Description of problem:

I get

  Hardened: main: MAYB: test: notes because not all of the .text section is covered by notes

and exitval=1 when running annobin on an empty program
(built with build_cflags and build_ldflags).


Version-Release number of selected component (if applicable):

annobin-9.90-1.el9.aarch64
gcc-11.2.1-2.2.el9.aarch64
glibc-2.34-2.el9.aarch64
redhat-rpm-config-188-1.el9.noarch


Steps to Reproduce:

1. echo 'int main(void){return 0;}' >main.c
2. gcc $(rpm --eval "%{build_cflags} %{build_ldflags}") -o main main.c
3. annocheck -v main


Additional info:

* annobin-9.87-1.el9 didn't complain, annobin-9.89-1.el9
  and annobin-9.90-1.el9 do.

* Seems to be aarch64-specific.

* rpm --eval '%{build_cflags} %{build_ldflags}':
  -O2 -flto=auto -ffat-lto-objects -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  -fasynchronous-unwind-tables -fstack-clash-protection -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

Comment 1 Nick Clifton 2021-08-31 12:18:45 UTC
This is fixed in annobin 9.93.  Well fixed may not be quite correct.  "Worked around" would be more accurate...

Pushing out to RHEL 9.0 development as changes for RHEL-9-beta now need exception+.

Comment 2 Nick Clifton 2021-09-29 14:35:24 UTC
Fixed in annobin-10.06-1.el9

Comment 8 errata-xmlrpc 2022-05-17 12:33:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (new packages: annobin), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2022:2342