[llvm-bugs] [Bug 25508] New: Incorrect __USER_LABEL_PREFIX__ for the triple arm-none-*eabi*

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Nov 12 07:11:39 PST 2015


https://llvm.org/bugs/show_bug.cgi?id=25508

            Bug ID: 25508
           Summary: Incorrect __USER_LABEL_PREFIX__ for the triple
                    arm-none-*eabi*
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: olivier at labapart.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Symbols are not prefixed by '_' (ie: __USER_LABEL_PREFIX__ = '_') for ARM EABI.

>From the document 'ELF for ARM architecture document', 4.5.4 Symbol names
A symbol that names a C or assembly language entity should have the name of
that entity.  For example, a C function called calculate generates a symbol
called calculate (not _calculate).
See
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0044e/IHI0044E_aaelf.pdf

Linux system returns the correct __USER_LABEL_PREFIX__:
$ clang-3.8 -E -dM -ffreestanding -target arm-linux-eabi - < /dev/null  | grep
__USER_LABEL_PREFIX__
#define __USER_LABEL_PREFIX__ 
$ clang-3.8 -E -dM -ffreestanding -target arm-linux-gnueabihf - < /dev/null  |
grep __USER_LABEL_PREFIX__
#define __USER_LABEL_PREFIX__ 

while the 'none' system returns '_':
$ clang-3.8 -E -dM -ffreestanding -target arm-none-eabi - < /dev/null  | grep
__USER_LABEL_PREFIX__
#define __USER_LABEL_PREFIX__ _
$ clang-3.8 -E -dM -ffreestanding -target arm-none-gnueabihf - < /dev/null  |
grep __USER_LABEL_PREFIX__
#define __USER_LABEL_PREFIX__ _

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151112/0b0e97c8/attachment-0001.html>


More information about the llvm-bugs mailing list