ARM Technical Support Knowledge Articles

SYMBOL NAMES LONGER THAN 32 CHARACTERS

Applies to: General Topics

Answer


Information in this article applies to:


QUESTION

I have a program that has several variable names that are longer than 32 characters. When I compile my program, everything works fine. However, I have problems when I link. The first 34 characters in my variable names are identical. The linker resolves all references to these variables to the same address.

Does Keil plan to support variables names that are longer than 32 characters?

ANSWER

As you have discovered, the Keil C Compilers do not support external linkage of variables with longer than 32-character names. All variable names are truncated at 32 characters.

The ANSI specification calls for 31 characters for internal linkage and 6 characters for external linkage. The Keil C Compilers support 32 characters for internal and external linkage. All additional characters are ignored.

RESOLUTION

To resolve this problem, you'll have to rename your variables so that the name is shorter than 32 characters. Of course, the real problem is that the variable names are identical for the first 32 characters (which are the only ones that are significant to the compiler and linker).

Article last edited on: 2001-04-23 00:00:00

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential