[PATCH] D48795: [AArch64] Add support for SHF_ARM_PURECODE.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 2 01:22:29 PDT 2018


ruiu added inline comments.


================
Comment at: ELF/OutputSections.cpp:46
   uint32_t Ret = 0;
-  if (Config->EMachine != EM_ARM || !(Flags & SHF_ARM_PURECODE))
+  if ((Config->EMachine != EM_ARM && Config->EMachine != EM_AARCH64 ) ||
+      !(Flags & SHF_ARM_PURECODE))
----------------
Please format using clang-format-diff.


================
Comment at: test/ELF/aarch64-execute-only.s:10
+
+// RUN: echo ".section .foo,\"ax\"; \
+// RUN:       br lr" > %t.s
----------------
Do you actually need a newline character after `;`? If not, please remove \ and the following newline character.

If you have to include a newline character, please do:

  echo foo > %t.s
  echo next line >> %t.s

because this is less error-prone.


================
Comment at: test/ELF/aarch64-execute-only.s:22-36
+
+// CHECK: 01     .dynsym .gnu.hash .hash .dynstr
+// CHECK: 02     .text
+// CHECK: 03     .foo
+// CHECK: 04     .dynamic
+
+// DIFF-NOT:  LOAD
----------------
I don't think you need to verify these conditions.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D48795





More information about the llvm-commits mailing list