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 1652587

Summary: Add support for the .attach_to_group pseudo-op to the assembler
Product: Red Hat Enterprise Linux 7 Reporter: Nick Clifton <nickc>
Component: binutilsAssignee: Nick Clifton <nickc>
Status: CLOSED ERRATA QA Contact: Miloš Prchlík <mprchlik>
Severity: low Docs Contact: Vladimír Slávik <vslavik>
Priority: unspecified    
Version: 7.7CC: dcantrell, fweimer, law, mcermak, mprchlik, ohudlick, riehecky, vslavik
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: binutils-2.27-37.base.el7 Doc Type: Enhancement
Doc Text:
Feature: Adds the .attach-to-group pseudo-op to the assembler. Reason: This pseudo-op is used by the annobin plugin to gcc when it needs to join several different sections to the same section group. Result: The annobin plugin can now be used with the RHEL-7 gcc.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-06 12:41:33 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:
Bug Depends On:    
Bug Blocks: 1643040    

Description Nick Clifton 2018-11-22 12:38:39 UTC
Description of problem:

  The annobin plugin for gcc uses a new assembler pseudo-op to attach a
  section to a group.  Support for this pseudo-op is available in the
  assembler shipped with the RHEL-8 binutils, but not currently in the
  assembler shipped with RHEL-7.

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

  2.27-37

How reproducible:

  100%

Steps to Reproduce:
1. Assemble this file:
---------------------------------------------
	.pushsection .gnu.build.attributes..text.destructor_func, "G", %note, .text.destructor_func.group
	.balign 4
	.dc.l 12
	.dc.l 16
	.dc.l 0x101
	.dc.b 0x47, 0x41, 0x2a, 0x6, 0x12, 0, 0, 0, 0x11, 0, 0xc, 0 
	.quad .annobin_destructor_func.start
	.quad .annobin_destructor_func.end
	.popsection

	.section	.text.destructor_func,"ax",@progbits
	.type	destructor_func, @function
destructor_func:
.LFB11:
	.cfi_startproc
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, disabled(%rip)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	destructor_func, .-destructor_func

	.pushsection .text.destructor_func
	.attach_to_group .text.destructor_func.group
	.popsection
-------------------------------------

Actual results:

  % as attach.s
  attach.s: Assembler messages:
  attach.s:31: Error: unknown pseudo-op: `.attach_to_group'


Expected results:

  % as attach.s
  %

Additional info:

The file binutils-attach-to-group.patch in the RHEL-8 binutils srpm contains
the patch for RHEL-8.  All that should be necessary is to backport this patch
to RHEL-7.

Comment 5 Nick Clifton 2019-01-08 15:47:37 UTC
Fixed in version binutils-2.27-37.base.el7.

Comment 10 Miloš Prchlík 2019-06-20 08:09:22 UTC
Verified with binutils-2.27-41.base.el7.

Comment 12 errata-xmlrpc 2019-08-06 12:41:33 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, 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/RHSA-2019:2075