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

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 23 01:59:56 PDT 2019


peter.smith added a comment.

Thanks for the context. I managed to find: https://lists.gt.net/linux/kernel/352032?do=post_view_threaded which asked about the difference in section syntax used in the kernel. The view at the time 2003 was that the forms where equivalent but there wasn't a firm preference. I've found a few other instances in other projects, although I've not got a large corpus of code to search through, the one's I've found are: Xen and CMSIS for low level driver code.

I think that this qualifies the use of the Solaris form as rare, but not insubstantial. On that basis I'm inclined to approve, does anyone else have any strong counter arguments?



================
Comment at: llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp:78
   UseIntegratedAssembler = true;
+
+
----------------
nit: one blank line would match the style of the rest of the file.


================
Comment at: llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp:80
+
+  //Data Emission Directives
+  SunStyleELFSectionSwitchSyntax = true;
----------------
Although SunStyleELFSectionSwitchSyntax comes under the section Data Emission Directives, I think that is a mistake in MCAsmInfo, as a Data Emission Directive is something like .word.

I suggest a comment like:
// The GNU assembler supports Sun style section switching for Arm targets, and it is used in projects like the Linux kernel.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69296





More information about the llvm-commits mailing list