https://sourceware.org/bugzilla/show_bug.cgi?id=33780

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to H.J. Lu from comment #2)
> A simple test:
> 
> [hjl@gnu-tgl-3 tmp]$ cat x.s
>       .data
>       .globl foo
> foo:
>       .dc.a 0
> [hjl@gnu-tgl-3 tmp]$ gcc -c x.s
> [hjl@gnu-tgl-3 tmp]$ ld -r -z noexecstack --format=binary x.o
> Segmentation fault         (core dumped) ld -r -z noexecstack
> --format=binary x.o
> [hjl@gnu-tgl-3 tmp]$

This avoids core dump. But the output section type is still SHT_PROGBITS.
The main issue is

static const struct bfd_elf_special_section special_sections_n[] =
{
  { STRING_COMMA_LEN (".noinit"),        -2, SHT_NOBITS,   SHF_ALLOC +
SHF_WRITE },
  { STRING_COMMA_LEN (".note.GNU-stack"), 0, SHT_PROGBITS, 0 },
  { STRING_COMMA_LEN (".note"),          -1, SHT_NOTE,     0 },  
  { NULL,                    0,           0, 0,            0 }
};

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to