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   
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:
Bug Depends On:    
Bug Blocks: Red Hat1643040    

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):


How reproducible:


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

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

	.pushsection .text.destructor_func
	.attach_to_group .text.destructor_func.group

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.