Hi James
-----Original Message-----
From: James Greenhalgh <[email protected]>
Sent: 18 April 2019 09:56
To: Sudakshina Das <[email protected]>
Cc: Richard Henderson <[email protected]>; H.J. Lu
<[email protected]>; Richard Henderson <[email protected]>;
[email protected]; nd <[email protected]>; Richard Earnshaw
<[email protected]>; Marcus Shawcroft <[email protected]>;
[email protected]
Subject: Re: [PATCH, GCC, AARCH64] Add GNU note section with BTI and PAC.
On Thu, Apr 04, 2019 at 05:01:06PM +0100, Sudakshina Das wrote:
> Hi Richard
>
> On 03/04/2019 11:28, Richard Henderson wrote:
> > On 4/3/19 5:19 PM, Sudakshina Das wrote:
> >> + /* PT_NOTE header: namesz, descsz, type.
> >> + namesz = 4 ("GNU\0")
> >> + descsz = 16 (Size of the program property array)
> >> + type = 5 (NT_GNU_PROPERTY_TYPE_0). */
> >> + assemble_align (POINTER_SIZE);
> >> + assemble_integer (GEN_INT (4), 4, 32, 1);
> >> + assemble_integer (GEN_INT (16), 4, 32, 1);
> >
> > So, it's 16 only if POINTER_SIZE == 64.
> >
> > I think ROUND_UP (12, POINTER_BYTES) is what you want here.
> >
>
>
> Ah yes. I have made that change now.
This is OK, but instead of:
> diff --git a/gcc/testsuite/gcc.target/aarch64/va_arg_1.c
> b/gcc/testsuite/gcc.target/aarch64/va_arg_1.c
> index
> e8e3cdac51350b545e5c2a644a3e1f4d1c37f88d..1fe92ff08935d4c6f08affcbd77e
> a91537030640 100644
> --- a/gcc/testsuite/gcc.target/aarch64/va_arg_1.c
> +++ b/gcc/testsuite/gcc.target/aarch64/va_arg_1.c
> @@ -4,7 +4,9 @@
> int
> f (int a, ...)
> {
> - /* { dg-final { scan-assembler-not "str" } } */
> + /* Fails on aarch64*-*-linux* if configured with
> + --enable-standard-branch-protection because of the GNU NOTE
> + section. */
> + /* { dg-final { scan-assembler-not "str" { target { !
> + aarch64*-*-linux* } || { ! default_branch_protection } } } } */
> return a;
> }
> Can you just change the regex to check for str followed by a tab, or
> something that looks else which looks like the instruction and doesn't match
> against 'string'.
>Thanks,
>James
Ah yes, I have reduced the diff in this test to only update the scan directive
to look for 'str\t' instead.
Committed as r270515.
Thanks
Sudi
>
> Thanks
> Sudi
>
> >
> > r~
> >
>