[PATCH] gas: update csect alignment for PPC prefixed instructions on XCOFF

Alan Modra amodra@gmail.com
Wed Jun 23 01:11:54 GMT 2021


On Tue, Jun 22, 2021 at 11:19:30AM +0000, CHIGOT, CLEMENT via Binutils wrote:
> --- a/gas/config/tc-ppc.c
> +++ b/gas/config/tc-ppc.c
> @@ -4039,6 +4039,10 @@ md_assemble (char *str)
>  	 boundaries.  */
>        frag_align_code (6, 4);
>        record_alignment (now_seg, 6);
> +#ifdef OBJ_XCOFF
> +      /* Update alignment of the containing csect.  */
> +      symbol_get_tc (ppc_current_csect)->align = 6;
> +#endif

Is there a possibility that this might decrease alignment?  If so, you
should write:

     if (symbol_get_tc (ppc_current_csect)->align < 6)
       symbol_get_tc (ppc_current_csect)->align = 6;

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list