From: Clément Chigot Date: Tue, 22 Jun 2021 08:15:06 +0000 (+0200) Subject: gas: update csect alignment for PPC prefixed instructions on XCOFF X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1daf786ba3db83455d4d2a9661d0715f433f8a3f;p=binutils-gdb.git gas: update csect alignment for PPC prefixed instructions on XCOFF Power10 prefixed instructions must not cross 64-byte boundaries. This is already handled. However, on XCOFF, the csect must be updated to match the new alignment. * config/tc-ppc.c (md_assemble): Update ppc_current_csect alignment when finding prefixed instructions. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 927e443d891..1b318559212 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2021-06-24 Clément Chigot + + * config/tc-ppc.c (md_assemble): Update ppc_current_csect + alignment when finding prefixed instructions. + 2021-06-22 Alan Modra * config/tc-pj.c (md_apply_fix): Apply PJ_CODE_REL32 relocs. diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index ad85d3863b0..80818e9c943 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -4039,6 +4039,11 @@ md_assemble (char *str) boundaries. */ frag_align_code (6, 4); record_alignment (now_seg, 6); +#ifdef OBJ_XCOFF + /* Update alignment of the containing csect. */ + if (symbol_get_tc (ppc_current_csect)->align < 6) + symbol_get_tc (ppc_current_csect)->align = 6; +#endif /* Update "dot" in any expressions used by this instruction, and a label attached to the instruction. By "attached" we mean