[PATCH] D30724: Dont emit Mapping symbols for sections that contain only data.

Tim Northover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 14 14:41:45 PDT 2017


t.p.northover added a comment.

> Does AARCH64 use Mapping symbols anytime ? I havent seen GCC doing that.

Yep, $x and $d (see http://infocenter.arm.com/help/topic/com.arm.doc.ihi0056b/IHI0056B_aaelf64.pdf).



================
Comment at: lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp:630-631
+    // executable permissions.
+    if (LastEMS != EMS_None ||
+        (cast<MCSectionELF>(getCurrentSectionOnly()))->UseCodeAlign()) {
+      LastEMSInfo->resetInfo();
----------------
shankare wrote:
> t.p.northover wrote:
> > I still don't see why we need this `UseCodeAlign` special case, I'm afraid.
> The only time that we want to emit a Data symbol is if the section was set to be executable but it contains data. 
> 
> 
Why? The ABI says nothing about an executable bit:

   "A section must have a mapping symbol defined at the beginning of the section; however, if the section contains only data then the mapping symbol may be omitted."


https://reviews.llvm.org/D30724





More information about the llvm-commits mailing list