Re: [PATCH] Fix gdb.dwarf2/clztest.exp with Clang

Andreas Schwab
2020-11-02T17:53:02Z

On Nov 02 2020, Gary Benson via Gdb-patches wrote:

> diff --git a/gdb/testsuite/gdb.dwarf2/clztest.S b/gdb/testsuite/gdb.dwarf2/clztest.S
> index a904fee..08a8bac 100644
> --- a/gdb/testsuite/gdb.dwarf2/clztest.S
> +++ b/gdb/testsuite/gdb.dwarf2/clztest.S
> @@ -22,6 +22,12 @@
>
> */
>
> +#if defined(__clang__)
> +# define EH_FRAME_SH_FLAGS "a"
> +#else
> +# define EH_FRAME_SH_FLAGS "aw"
> +#endif
> +
> .file "clztest.c"
> .text
> .Ltext0:
> @@ -178,7 +184,7 @@ _start:
> .LEFDE4:
> #NO_APP
> #APP
> - .section .eh_frame,"aw",@progbits
> + .section .eh_frame,EH_FRAME_SH_FLAGS,@progbits

Shouldn't .eh_frame always be read-only? It certainly is when compiled
with gcc.

Andreas.

--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."