Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

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: ---Flags: pm-rhel: mirror+
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