<div dir="ltr">Looking. Thanks :)</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jul 13, 2018 at 3:10 PM Sam Clegg <<a href="mailto:sbc@google.com">sbc@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I believe this change causes previously valid .S files to fail to compile.<br>
<br>
The error I'm seeing is on the following line:<br>
.section    .rodata.cst8,"a",@progbits<br>
<br>
This generates:<br>
amd64.S:728:44: error: expected the entry size<br>
        .section .rodata.cst8,"a",@progbits<br>
<br>
I guess the entry size here was previously implied by the "cst8" name?<br>
<br>
The file in question is part of ocaml source:<br>
<a href="https://github.com/ocaml/ocaml/blob/trunk/runtime/amd64.S#L727" rel="noreferrer" target="_blank">https://github.com/ocaml/ocaml/blob/trunk/runtime/amd64.S#L727</a><br>
On Sun, Jul 1, 2018 at 5:21 PM Eric Christopher via llvm-commits<br>
<<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
><br>
> Author: echristo<br>
> Date: Sun Jul  1 17:16:39 2018<br>
> New Revision: 336072<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=336072&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=336072&view=rev</a><br>
> Log:<br>
> Add an entry for rodata constant merge sections to the default<br>
> section flags in the ELF assembler. This matches the defaults<br>
> given in the rest of MC.<br>
><br>
> Fixes PR37997 where we couldn't assemble our own assembly output<br>
> without warnings.<br>
><br>
> Modified:<br>
>     llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp<br>
>     llvm/trunk/test/MC/ELF/extra-section-flags.s<br>
><br>
> Modified: llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp?rev=336072&r1=336071&r2=336072&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp?rev=336072&r1=336071&r2=336072&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp (original)<br>
> +++ llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp Sun Jul  1 17:16:39 2018<br>
> @@ -486,6 +486,9 @@ static bool hasPrefix(StringRef SectionN<br>
>  // defaults.<br>
>  static unsigned defaultSectionFlags(StringRef SectionName) {<br>
><br>
> +  if (hasPrefix(SectionName, ".rodata.cst"))<br>
> +    return ELF::SHF_ALLOC | ELF::SHF_MERGE;<br>
> +<br>
>    if (hasPrefix(SectionName, ".rodata.") || SectionName == ".rodata1")<br>
>      return ELF::SHF_ALLOC;<br>
><br>
><br>
> Modified: llvm/trunk/test/MC/ELF/extra-section-flags.s<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/extra-section-flags.s?rev=336072&r1=336071&r2=336072&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/extra-section-flags.s?rev=336072&r1=336071&r2=336072&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/test/MC/ELF/extra-section-flags.s (original)<br>
> +++ llvm/trunk/test/MC/ELF/extra-section-flags.s Sun Jul  1 17:16:39 2018<br>
> @@ -1,10 +1,12 @@<br>
>  # RUN: llvm-mc -triple x86_64-unknown-unknown -filetype=obj %s -o /dev/null 2>&1 | FileCheck %s<br>
> -<br>
> +<br>
>  .section .rodata, "ax"<br>
>  # CHECK: warning: setting incorrect section attributes for .rodata<br>
>  nop<br>
><br>
>  .section .rodata, "a"<br>
> -# CHECK-NOT: warning:<br>
>  nop<br>
> +.section .rodata.cst4, "aM",@progbits,8<br>
> +nop<br>
> +# CHECK-NOT: warning:<br>
><br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>