[PATCH] D69296: [ARM] Uses "Sun Style" syntax for section switching

Jian Cai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 22 21:18:57 PDT 2019


jcai19 updated this revision to Diff 226095.
jcai19 added a comment.

Flip Sun-style syntax on all the plafforms for GAS compatibility.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69296/new/

https://reviews.llvm.org/D69296

Files:
  llvm/include/llvm/MC/MCAsmInfo.h
  llvm/test/MC/AsmParser/gas-compl-sun-elf.s


Index: llvm/test/MC/AsmParser/gas-compl-sun-elf.s
===================================================================
--- /dev/null
+++ llvm/test/MC/AsmParser/gas-compl-sun-elf.s
@@ -0,0 +1,13 @@
+@ RUN: llvm-mc -filetype=obj -triple arm-linux-gnu %s -o - | llvm-readelf --sections | FileCheck %s
+
+@ CHECK: .f1              PROGBITS        00000000 000034 000000 00   A  0   0  1
+.section ".f1", #alloc
+
+@ CHECK: .f2              PROGBITS        00000000 000034 000000 00   W  0   0  1
+.section ".f2", #write
+
+@ CHECK: .f3              PROGBITS        00000000 000034 000000 00   A  0   0  1
+.section ".f3", "a"
+
+@ CHECK: .f4              PROGBITS        00000000 000034 000000 00   W  0   0  1
+.section ".f4", "w"
Index: llvm/include/llvm/MC/MCAsmInfo.h
===================================================================
--- llvm/include/llvm/MC/MCAsmInfo.h
+++ llvm/include/llvm/MC/MCAsmInfo.h
@@ -215,9 +215,9 @@
   const char *TPRel64Directive = nullptr;
 
   /// This is true if this target uses "Sun Style" syntax for section switching
-  /// ("#alloc,#write" etc) instead of the normal ELF syntax (,"a,w") in
-  /// .section directives.  Defaults to false.
-  bool SunStyleELFSectionSwitchSyntax = false;
+  /// ("#alloc,#write" etc) along the normal ELF syntax (,"a,w") in
+  /// .section directives.  Defaults to true.
+  bool SunStyleELFSectionSwitchSyntax = true;
 
   /// This is true if this target uses ELF '.section' directive before the
   /// '.bss' one. It's used for PPC/Linux which doesn't support the '.bss'


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69296.226095.patch
Type: text/x-patch
Size: 1542 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191023/b7de4859/attachment.bin>


More information about the llvm-commits mailing list