DUI0496C Arm Errors Reference PDF
DUI0496C Arm Errors Reference PDF
Version 4.1
Issue
Confidentiality
Change
28 May 2010
Non-Confidential
30 September 2010
Non-Confidential
28 January 2011
Non-Confidential
30 April 2011
Non-Confidential
29 July 2011
Non-Confidential
Proprietary Notice
Words and logos marked with or are registered trademarks or trademarks of ARM in the EU and other countries,
except as otherwise stated below in this proprietary notice. Other brands and names mentioned herein may be the
trademarks of their respective owners.
Neither the whole nor any part of the information contained in, or the product described in, this document may be
adapted or reproduced in any material form except with the prior written permission of the copyright holder.
The product described in this document is subject to continuous developments and improvements. All particulars of the
product and its use contained in this document are given by ARM in good faith. However, all warranties implied or
expressed, including but not limited to implied warranties of merchantability, or fitness for purpose, are excluded.
This document is intended only to assist the reader in the use of the product. ARM shall not be liable for any loss or
damage arising from the use of any information in this document, or any error or omission in such information, or any
incorrect use of the product.
Where the term ARM is used it means ARM or any of its subsidiaries as appropriate.
Confidentiality Status
This document is Non-Confidential. The right to use, copy and disclose this document may be subject to license
restrictions in accordance with the terms of the agreement entered into by ARM and the party that ARM delivered this
document to.
Product Status
The information in this document is final, that is for a developed product.
Web Address
http://www.arm.com
ii
Contents
ARM Compiler toolchain Errors and Warnings
Reference
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Appendix A
Chapter 7
Chapter 6
Chapter 5
iii
Chapter 1
Conventions and feedback
The following describes the typographical conventions and how to give feedback:
Typographical conventions
The following typographical conventions are used:
monospace Denotes text that can be entered at the keyboard, such as commands, file
bold
1-1
details of the platform you are using, such as the hardware platform,
operating system type and version
the version string of the tools, including the version number and build
numbers.
Feedback on content
If you have comments on content then send an e-mail to [email protected]. Give:
the title
ARM Glossary,
http://infocenter.arm.com/help/topic/com.arm.doc.aeg0014-/index.html
1-2
Chapter 2
C and C++ Compiler Errors and Warnings
The following topics describe the error and warning messages for the C and C++ compiler, armcc:
List of the old-style armcc error and warning messages on page 2-64.
2-1
2.1
contains:
a six hex digit fault code for the error that occurred (0x87ecef).
In previous versions this was a 4 digit code.
where <options> are your normal compile switches, such as -O2, -g, -I, -D, but without -c.
Check that the error is still reproducible with the preprocessed file by compiling it with:
armcc <options> -c PPsourcefile.c
and then provide the PPsourcefile.c file and your compile <options> to your supplier.
2-2
2.2
2.2.1
See also
Reference
Compiler Reference:
-W on page 3-216.
2-3
2.3
unknown error
out of memory
For example:
#include <file.h>
unrecognized token
For example:
char foo[] = {"\"};
In this example, the backslash causes the following quote " to be treated as a
literal character rather than closing the string. To fix this, use:
char foo[] = {"\\"};
For example:
/*nested
/*comment*/
10
11
For example:
#foo
12
13
For example:
#include <stdio.h>
14
For example:
#if EMBEDDED foo
or:
#include <stdio.h> foo
2-4
or:
#ifdef SOMETHING
:
#endif SOMETHING
The #endif does not expect or require any argument. Enclosing the trailing part
of the line in a comment fixes the problem:
#endif /* SOMETHING */
16
17
expected a "]"
18
expected a ")"
For example:
int main(void
{
For example:
int a = 37r;
20
22
23
24
For example:
int a = 0378;
25
For example:
char a ='';
26
For example:
char a =abcd;
2-5
results in an error.
Note
Only one character is permitted in a single-quoted string. For more than one
character, double quotes must be used. Strings must be assigned to an appropriate
variable such as a[].
27
For example:
char foo[] = {"\xBBBB" };
28
29
expected an expression
30
31
32
33
34
35
36
37
An open #if was still active, but was not closed with #endif before the End Of
File.
38
39
division by zero
40
expected an identifier
This error can also occur when C code containing C++ keywords is compiled with
the C++ compiler, for example:
int *new(void *p) { return p; }
41
42
44
45
46
2-6
47
There is no way to control this error directly by a compiler option, but you can
use conditional preprocessing. For example:
#ifdef TEST_EQUALS_ZERO
#define TEST 0
#else
#define TEST 1
#endif
50
51
52
53
expected a ":"
54
55
56
57
58
59
60
61
62
63
64
For example:
int;
65
expected a ";"
66
2-7
For example:
typedef enum
{
Bit31 = 0x80000000
} Bits;
C++ Mode:
As a work around for cases where the message is an error use the following code
example:
typedef enum
{
Bit31 = (int)0x80000000
} Bits;
67
expected a "}"
68
The constant is too large to be represented in a signed long, and therefore has been
given unsigned type.
Example:
long l = 2147483648;
69
70
Example:
typedef struct {
unsigned char size;
char string[];
} FOO;
By not declaring a size for the array in the structure, the compiler is not able to
allocate a size of the structure. Incomplete types are allowed in --gnu and --c99
modes.
71
2-8
76
77
78
79
The ellipses to denote variadic functions, such as, for example, printf(), must
follow at least one parameter. Change:
int foo( ... );
to:
int foo( int bar, ... );
80
81
82
83
84
The type name or type qualifier cannot be used in the same declaration as the
second type name or type qualifier. For example:
typedef int int;
85
86
87
88
89
90
91
92
93
94
Zero-sized arrays are allowed only when in GNU mode, --gnu. For example:
char name[0];
96
97
98
2-9
99
100
101
102
103
104
105
Bit fields must not be larger than the size of the type.
For example, with --strict:
struct X{
int y:5000;
};
106
107
108
109
110
111
statement is unreachable
112
expected "while"
114
115
116
Example:
void foo(void){
int a=0;
continue;
}
or:
void bar(void){
int a=0;
break;
}
117
118
119
2-10
120
121
122
123
124
125
expected a "("
126
127
expected a statement
128
129
130
expected a "{"
131
132
133
134
135
136
137
138
139
140
141
142
143
144
The initializing string for a fixed size character array is exactly as long as the
array size, leaving no room for a terminating \0, for example:
char name[5] = "Hello";
The name array can hold up to 5 characters. "Hello" does not fit because C strings
are always null-terminated (for example, "Hello\0"). The compiler reports:
2-11
Error: #144: a value of type "const char [6]" cannot be used to initialize
an entity of type "char [5]"
A similar error is also raised if there is an implicit cast of non-zero int to pointer.
For example:
void foo_func( void )
{
char *foo=1;
}
For the cast, this error can be suppressed with the use of the
--loose_implicit_cast switch.
145
146
147
148
149
150
151
152
153
154
155
156
old-fashioned initializer
157
158
159
160
161
unrecognized #pragma
163
164
165
2-12
Function prototype is defined with a number of parameters that does not match
the number of parameters passed in the function call.
For example:
extern void foo(int x);
void bar(void)
{
foo();
}
166
167
168
169
expected a declaration
This can occur when attempting to compile some C++ header files with the C
compiler instead of the C++ compiler. The following message is reported:
Error: #169: expected a declaration
170
171
172
173
174
175
177
179
180
181
2-13
or perhaps:
unsigned int foo = 0x1234;
printf("%0X", foo);
%0X can be used for char, short or int. Use lX for a long integer, even though both
ints and longs are 32-bits wide on an ARM.
182
could not open source file <entity> (no directories in search list)
183
184
185
186
For example:
unsigned short foo;
if (foo<0) printf("This never happens");
gives a warning that the comparison between an unsigned (for example, char or
int) value and zero always evaluates to false.
187
Example:
int main(void)
{
int a;
const int b =1;
if (a=b)
}
188
189
190
191
The C specification states that a cast does not yield an lvalue, so a cast to a
qualified type has the same effect as a cast to the unqualified version of the type.
This warning is just to inform the user that the type qualifier has no effect,
although the code is still legal. The warning is suppressible with --diag_suppress
191.
Example:
"val2 = (const float)val1;" is equivalent to "val2 = (float)val1;"
192
This error is commonly associated with the attempted use of non-ASCII character
sets, such as 16-bit Unicode characters. The compiler supports multibyte
character sets, such as Unicode. Source files are compiled according to the
selected locale of that machine. It is possible to use Escape processing (as
recommended by Kernighan and Ritchie, section A2.5.2) to encode specific
values instead.
ARM DUI 0496C
ID080411
2-14
For example:
char *p = "\x12\x34\x56\x78"; // 12 34 56 78
In character and string escapes, if the character following the \ has no special
meaning, the value of the escape is the character itself, for example, \s is the same
as s and the warning is given.
193
194
195
196
219
220
221
222
223
This is a common warning that occurs where there is no prototype for a function.
For example:
void foo(void)
{
printf("foo");
}
To fix this, add #include <stdio.h> that includes the prototype for printf.
For ANSI C, you can suppress this warning with --diag_suppress 223. This is
useful when compiling old-style C in ANSI C mode.
224
225
226
227
macro recursion
228
229
230
In strict ANSI C, the only types permitted for a bit field are int, signed int, and
unsigned int.
Example:
struct X {
char y:2;
};
231
232
233
234
2-15
235
236
237
238
239
240
241
242
243
244
245
246
247
A typical example of this is where a variable name has been used more than once.
This can sometimes occur when compiling legacy code that relies on tentative
declarations. Tentative declarations permit a variable to be declared and
initialized as separate statements such as:
int a;
int a = 1;
Tentative declarations are permitted by default for C code, but produce an error
with C++ code.
248
249
250
251
252
253
expected a ","
254
To fix this, first create an instance of that type (for example, a variable of the new
type):
typedef int footype;
footype bar = 1;
int x = bar;
255
256
257
2-16
258
259
260
261
262
263
264
265
<entity> is inaccessible
For C++ only, the --diag_warning 265 option downgrades access control errors to
warnings.
For example:
class A { void f() {}; }; // private member
A a;
void g() { a.f(); } // erroneous access
266
<entity> is ambiguous
267
268
269
274
276
277
278
279
280
281
282
283
284
285
286
287
derived class <type> contains more than one instance of class <type>
288
289
290
2-17
291
292
293
294
296
297
expected an operator
298
299
300
301
302
304
305
306
307
308
309
more than one instance of constructor <entity> matches the argument list:
310
311
312
313
314
315
the object has cv-qualifiers that are not compatible with the member
function
316
317
return type is not identical to nor covariant with return type <type> of
overridden virtual function <entity>
318
319
320
321
322
323
324
325
2-18
326
327
328
329
330
<entity> is inaccessible
332
333
334
335
336
337
338
more than one instance of overloaded function <entity> has "C" linkage
339
340
341
342
343
344
345
346
347
348
349
350
2-19
351
352
353
354
356
357
358
359
360
361
362
363
364
365
366
367
368
This indicates that you have a const structure or structure containing a const. It is
issued as a friendly warning to assist with error 369. This can safely be ignored
providing that the const members of structures are appropriately initialized.
369
This indicates that you have a instance of a const structure or structure containing
a const that has not been correctly initialized. You must either initialise it
correctly for every instance or provide a constructor to initialise it.
370
371
372
373
375
377
378
379
380
381
2-20
382
384
386
387
389
390
391
392
393
394
395
398
399
400
401
403
404
405
member function with the same name as its class must be a constructor
406
407
408
copy constructor for class <type> may not have a parameter of type <type>
409
410
411
412
413
414
2-21
415
416
417
418
more than one conversion function from <type> to a built-in type applies:
424
427
428
429
430
433
434
435
436
437
438
expected a "<"
439
expected a ">"
440
441
442
443
450
451
452
456
457
458
459
460
461
463
464
467
468
2-22
469
470
471
473
476
477
478
479
485
486
487
490
494
When the compiler is in ANSI C mode, this error might be produced by a function
declaration f(V) where V is a void type.
In the special syntax f(<void>) that indicates that f is a function taking no
arguments, the keyword <void> is required. The name of a void type cannot be
used instead.
496
497
498
501
502
503
504
The C++ standard requires that a pointer to member be named using a qualified
name and a & character such as for &A::f.
The front end previously accepted nonstandard forms like &f, or even simply f, as
a concession to existing practice. This usage now produces a discretionary error.
505
506
507
508
class template and template parameter may not have the same name
511
512
513
514
2-23
515
516
517
518
519
520
521
522
524
525
526
For example:
void foo(void a) { }
529
530
531
532
533
534
535
536
540
541
542
543
544
545
546
Example:
int main(void){
int choice = 1;
int z =1;
switch(choice)
{
case 1:
int y = 1;
z = y + z;
break;
case 2:
2-24
break;
}
return 0;
In the example, y is an initialized variable that is in scope (but unused) in the other
cases.
The C++ Standard says in section 6.7:
"It is possible to transfer into a block, but not in a way that bypasses declarations
with initialization. A program that jumps from a point where a local variable with
automatic storage duration is not in scope to a point where it is in scope is
ill-formed unless the variable has POD type (3.9) and is declared without an
initializer (8.5)."
Note
The transfer from the condition of a switch statement to a case label is considered
a jump in this respect.
The usual way to fix this is to enclose the case that declares y in braces:
case 1:
{
int y = 1;
z = y + z;
}
break;
548
549
550
551
552
553
554
555
556
558
559
560
561
562
563
2-25
564
570
571
invalid option:
574
invalid number:
576
578
585
586
587
588
589
implicit template inclusion mode can be used only when compiling C++
590
593
594
output files may not be specified when compiling several input files
595
596
598
600
601
602
603
604
605
606
607
608
609
611
612
specific definition of inline template function must precede its first use
613
614
615
616
617
2-26
618
619
620
624
625
626
627
628
629
the command line options do not match those used when precompiled header
file <entity> was created
630
631
This can occur if you are trying to use a large PreCompiled Header (PCH), and
you have a size limitation on the TMP directory that the ARM Compiler toolchain
uses. A possible workaround is to remove the TMP environment variable. This
forces the tools to create temporary files in the current working directory.
See the following in Introducing the ARM Compiler toolchain:
632
633
634
This can occur if a PCH file cannot be mapped back into the build because the
required parts of the address space of the compiler are not available.
See also error 631.
635
636
637
638
precompiled header files may not be used when compiling several input
files
639
640
641
642
643
2-27
644
645
646
647
650
651
652
654
655
656
657
658
659
660
661
662
2.
3.
4.
663
664
665
666
667
668
669
"&..." is nonstandard
670
672
2-28
673
674
676
678
679
680
688
689
690
691
692
<entity>, required for copy that was eliminated, is not callable because
reference parameter cannot be bound to rvalue
693
694
695
696
697
698
699
702
expected an "="
703
704
705
706
707
708
709
710
711
712
array new and delete option can be used only when compiling C++
713
717
2-29
718
719
720
722
723
724
725
726
727
728
730
731
732
733
734
735
736
737
738
744
745
746
747
748
749
750
751
static and nonstatic member functions with same parameter types cannot be
overloaded
752
753
754
755
756
757
2-30
758
759
760
761
763
764
765
766
767
768
769
770
771
772
773
774
775
776
template nesting depth does not match the previous declaration of <entity>
777
778
option to control the for-init scope can be used only when compiling C++
779
780
781
782
783
784
785
786
787
788
789
2-31
790
791
792
793
794
795
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
814
815
For example:
__packed void foo( void ) { }
The __packed qualifier is ignored because the return type cannot be __packed.
816
817
818
819
821
2-32
822
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
more than one partial specialization matches the template argument list of
<entity>
840
841
842
844
845
846
847
2-33
848
849
850
851
852
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
884
885
886
890
891
2-34
892
893
894
895
896
902
912
915
916
917
921
923
more than one command line option matches the abbreviation "--<entity>":
925
926
928
929
930
931
932
934
935
936
937
938
For example:
main(void){
int a;
}
2-35
939
940
A return type has been defined for a function, but no value is returned.
Example:
int foo(int a)
{
printf("Hello %d", a);
}
941
942
enum bit-fields are always unsigned, but enum <type> includes negative
enumerator
943
944
945
946
949
951
952
953
954
955
956
959
declared size for bit field is larger than the size of the bit field type;
truncated to <entity> bits
960
961
962
963
964
965
966
967
968
969
2-36
970
971
972
975
976
977
978
979
980
982
there is more than one way an object of type <type> can be called for the
argument list:
983
984
985
986
987
988
989
990
991
992
993
994
995
expected "class"
996
997
998
999
1000
1001
2-37
1006
a template template parameter cannot have the same name as one of its
template parameters
1007
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
ARM function qualifiers include qualifiers such as __svc, __pure and __irq
amongst others.
See the following in the Compiler Reference:
1019
1020
1021
1022
1023
1024
1025
SVC numbers are limited to the range 0 to 0xffffff for the ARM compilers, and
0 to 0xFF for the Thumb compilers.
For standard semihosting SVCs, 0x123456 is used for ARM, 0xAB is used for
Thumb.
1026
1027
1028
1029
1030
2-38
1031
1032
1033
1034
1038
1039
1040
1041
For example:
int main(void){
__align(16) int foo = 10;
}
__align is not permitted for a local variable foo, so the error is given.
1042
1043
1044
1045
1046
1047
1048
1049
1050
2-39
1051
1053
1054
1055
1056
1057
1058
1059
1060
argument type <type> does not match this type-generic function macro
1062
1063
1064
1065
1066
1070
1071
1072
1073
1074
1075
1077
1079
1080
1081
1082
1083
1084
1085
Missing operand
1086
1087
1088
1089
2-40
1090
1091
1092
Should be acc0
1093
1094
1095
1096
1097
Expected a [ or ]
1098
1099
Unexpected ]
1100
1101
1102
1103
1104
Expected {
1105
Expected }
1106
1107
1108
1109
1110
1111
1112
1113
2-41
The Thumb inline assembler is deprecated when compiling for ARM architecture
v7 (ARMv7) or later, that is, most processors in the Cortex series.
The inline assembler does not support Thumb(-1) or Thumb-2, or all the ARMv6
instructions. However, the inline assembler does still support the (ARM-only)
ARMv4T, ARMv5TE, and a subset of the new ARMv6 instructions (only the
ARMv6 media instructions), so legacy inline assembly code continues to build
correctly.
This warning is intended as a reminder to consider using the embedded assembler
or built-in intrinsics instead of inline assembler. If you cannot change your code
but require elimination of the warning, suppress the warning or compile the
module for an earlier cpu such as ARMv6.
1114
results in an error message because the saturated add instruction is only supported
in ARMv5TE and later.
1115
1116
1117
1118
Expected a newline
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
Non portable instruction (LDM with writeback and base in reg. list, final
value of base unpredictable)
1132
Non portable instruction (STM with writeback and base not first in reg.
list, stored value of base unpredictable)
2-42
1133
1134
The constant is too large to be represented in a signed long, and therefore has been
treated as a (signed) long long.
For example:
int foo(unsigned int bar)
{
return (bar == 2147483648);
}
gives a warning because 2147483648 is one greater than the maximum value
permitted for a signed long. The ll suffix means that the constant is treated as a
(64-bit) long long type rather than a signed long.
To eliminate the warning, explicitly add the ll or LL suffix to your constants. For
example:
int foo(unsigned int bar)
{
return (bar == 2147483648LL);
}
1135
The constant is too large to be represented in a signed long long, and therefore
has been given type unsigned long long. See error number 1134.
1137
Expected a comma
1138
1139
1140
1141
1142
1143
1144
1145
1146
LDC/STC offset must lie in range -1020 to 1020 and be word aligned
1147
1148
1149
1150
1151
1152
1153
2-43
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1175
1176
1177
expected "template"
1178
1179
1180
1181
1182
1183
1184
1185
1186
1188
2-44
1190
1191
a field with the same name as its class cannot be declared in a class with
a user-declared constructor
1192
1193
1194
1196
the object has cv-qualifiers that are not compatible with the member
<entity>
1197
no instance of <entity> matches the argument list and object (the object
has cv-qualifiers that prevent a match)
1198
1199
1200
1201
1202
1203
1204
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
<type> cannot be transparent because <entity> does not have the same size
as the union
1220
1221
2-45
1222
1224
1225
1226
the second constant in a case range must be larger than the first
1227
1228
1229
1230
1231
1232
1233
1234
an asm output operand must have one of the '=' or '+' modifiers
1235
an asm input operand may not have the '=' or '+' modifiers
1236
too many operands to asm statement (maximum is 30; '+' modifier adds an
implicit operand)
1237
1238
1239
1240
1241
register "<entity>" has a fixed purpose and may not be used in an asm
statement
1242
register "<entity>" has a fixed purpose and may not be clobbered in an asm
statement
1243
1244
1245
1246
1247
1248
1249
1250
the "template" keyword used for syntactic disambiguation may only be used
within a template
1253
1254
1255
2-46
1256
<type> would have been promoted to <type> when passed through the ellipsis
parameter; use the latter type instead
1257
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1282
1283
1284
1285
1286
When LDRD and STRD instructions are used in inline assembler the compiler
expands these into two LDR or STR instructions before being passed through the
compiler optimization stage.
The optimization stage normally combines the two LDR or STR instruction back
into a single LDRD or STRD instruction, however it is possible in some cases that a
LDRD or STRD is not used.
1287
When LDM and STM instructions are used in inline assembler the compiler expands
these into a number of LDR or STR instructions before being passed through the
compiler optimization stage.
2-47
The optimization stage normally combines the two LDR or STR instruction back
into LDM or STM instructions, however it is possible that in some cases that a single
LDM or STM instruction is not used.
1288
Implicit ARM register <entity> was not defined due to name clash
1289
1291
1292
1293
assignment in condition
In a context where a boolean value is required (the controlling expression for if,
while, for or the first operand of a conditional expression, an expression contains
one of:
A bitwise not operator (~). It is likely that a logical not operator (!) was
intended.
1294
1295
2-48
void foo();
means:
void foo(void);
1298
Example:
#ifndef MYHEADER_H
//#define MYHEADER_H
#endif
To correct the code, remove the comment slashes (//). This warning is off by
default. It can be enabled with:
--diag_warning 1298
1299
1300
Adding the virtual keyword in the derived class prevents the warning. For C++,
the --diag_suppress 1300 option suppresses the implicit virtual warning.
1301
For the members of the structure to be correctly aligned, some padding has been
inserted between members. This warning is off by default and can be enabled with
--diag_warning 1301 or --remarks.
2-49
For example:
struct X {
char x;
int y;
}
The compiler can also warn of padding added at the end of a struct or between
structs, see 2530.
1302
1303
1304
1305
1307
1308
1310
1311
1312
1313
1314
1316
1317
1320
1321
1323
1327
1328
1329
1331
1332
1333
1334
1335
1336
1338
2-50
1339
1340
1341
1342
1343
1345
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1359
Warnings 1357 and 1359 warn against the use of non-PI code constructs and that
a subsequent link step might fail.
For example, when compiled with --apcs /ropi:
char *str = "test"; /* global pointer */
because the global pointer str must be initialized to the address of the char string
test in the .constdata section, but absolute addresses cannot be used in a PI
system.
For example, when compiled with --apcs /rwpi:
int bar;
int *foo = &bar; /* global pointer */
2-51
because the global pointer foo must be initialized to the address of bar in the .data
section, but absolute addresses cannot be used in a PI system.
The following workarounds are possible:
Change your code to avoid use of a global pointer. You can, for example,
use a global array or local pointer instead.
Then write code inside a function that sets foo = &bar;. This is because
when generating code as opposed to statically initializing data, the compiler
has scope to work around the ROPI/RWPI constraints.
See also the FAQ What does Error: L6248E: cannot have address type relocation
mean?, http://infocenter.arm.com/help/topic/com.arm.doc.faqs/ka3554.html.
1360
1361
1362
1363
1366
1367
1368
1369
1370
1371
1372
1374
1375
1376
1377
1378
1379
2-52
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
2-53
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
GNU layout bug not emulated because it places virtual base <entity>
outside <entity> object boundaries
1431
1432
1433
1434
1436
1437
1438
1439
1440
1441
The C specification states "An assignment operator shall have a modifiable lvalue
as its left operand" and "a cast does not yield an lvalue".
1442
1443
1444
polymorphic base classes inherited via virtual derivation need all virtual
functions to be exported
1446
2-54
1447
The C++ ISO Specification defines that the non-required arguments of a variadic
function must be of type POD (plain-old-data), such as an int or a char, but not
structs or classes.
To avoid the error or warning the address of a class or struct could be given
instead.
1448
the 'u' or 'U' suffix must appear before the 'l' or 'L' suffix in a
fixed-point literal
1450
1451
1452
1453
constant is too large for long long; given unsigned long long type
(nonstandard)
1454
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1471
1472
1473
1474
1475
1481
1482
2-55
1483
1485
1486
1487
1488
1492
1493
1494
1495
1496
1497
1498
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1514
1515
1516
1517
1519
2-56
1522
1523
1525
1526
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
link scope specifiers can only appear on functions and variables with
external linkage
1539
1540
1541
1542
1543
1544
1547
1548
1549
virtual <entity> was not defined (and cannot be defined elsewhere because
it is a member of an unnamed namespace)
1550
1551
1552
1553
1554
2-57
1555
1556
1557
1558
1559
1560
1561
1562
1563
field of class type without a DLL interface used in a class with a DLL
interface
1564
1565
1566
1567
invalid member for anonymous member class -- class <type> has a disallowed
member function
1568
nonstandard reinterpret_cast
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1593
2-58
1594
Could not optimize: Loop parameters must be integer for full optimization
1604
1613
1617
1621
1624
1629
Could not optimize: Iteration count too short for array optimization
1636
1637
1638
1639
1641
1656
1661
1662
1663
1670
1676
1679
1687
1690
Could not optimize: Unsupported data type for explicit vector operations
1691
1714
1730
1742
1750
1759
1771
1801
1824
1885
1861
Could not optimize: This store into array prevents optimization of outer
loop
1866
2-59
1894
1896
1947
Could not optimize: Cannot transform this combination of data types and
operations
1978
1979
1987
1988
1997
2091
2168
2170
2189
2190
2191
2218
2300
Might not be able to optimize: Feedback of scalar value from one loop pass
to another. Conflict on line <entity>. Loop index is <entity>
(<filename>,<entity>)"
2301
Might not be able to optimize: Feedback of scalar value from one loop pass
to another. Conflict on line <entity>. Loop index is <entity> (<filename>)
2302
Might not be able to optimizee: Feedback of scalar value from one loop
pass to another. Conflict on line <entity>. (<entity>,<filename>)
2303
Might not be able to optimize: Feedback of scalar value from one loop pass
to another. Conflict on line <entity>. (<entity>)
2304
2305
2306
2307
2308
2309
2310
2-60
2311
2312
2313
2314
2315
2351
2438
2439
2442
2516
2519
2523
The inline assembler is deprecated when compiling for ARMv7 or later, that is,
most processors in the Cortex series.
The inline assembler does not support Thumb(-1) or Thumb-2, or all the ARMv6
instructions. However, the inline assembler does still support the (ARM-only)
ARMv4T, ARMv5TE, and a subset of the new ARMv6 instructions (only the
ARMv6 media instructions), so legacy inline assembly code continues to build
correctly.
This warning is intended as a reminder to consider using the embedded assembler
or built-in intrinsics instead of inline assembler. If you cannot change your code
but require elimination of the warning, suppress the warning or compile the
module for an earlier CPU such as ARMv6.
Caution
Attempting to compile some inline assembler for Thumb (armcc --thumb) might
result in ARM instructions being generated in some cases.
2524
2525
2529
2530
The compiler can warn of padding added at the end of a struct or between structs.
This warning is off by default and can be enabled with --diag_warning 2530 or
--remarks.
For example:
typedef struct {
int x;
char y;
2-61
} A;
typedef struct {
int p;
int q;
} B;
The compiler can also warn of padding inserted within a structs, see 1301.
2531
2533
the <entity> attribute can only appear on functions and variables with
external linkage
2534
2535
2537
2540
2541
a symbolic match constraint must refer to one of the first ten operands
2544
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
default arguments are not allowed on friend declarations that are not
definitions
2556
2557
2558
2560
2565
2566
2567
2-62
2570
2571
2574
2575
2576
2577
a member function cannot have both the "abstract" and "sealed" modifiers
2578
2579
2580
member function declared with "override" modifier does not override a base
class member
2581
2582
2662
2665
2666
underlying type of enum type must be an integral type other than bool
2667
2668
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
the <entity> attribute can only appear on functions and variables with
internal linkage
2-63
2.4
C3002W
C3008W
C3015E
C3016W
C3017W
C3038E
C3041U
2-64
C3047U
C3048U
out of store while compiling with -g. Allocation size was <entity>, system
size is <entity>
C3049U
Compilation aborted.
C3051E
C3052E
C3053W
The compiler cannot access the file you specified when performing
Profiler-guided optimizations. You might see this if you have specified the
profiler data directory instead of the data file. For example, you specified
image_001.apd instead of the data file image_001.apd\filename.apa.
See the following in Using the Compiler:
C3055U
C3056E
C3057E
C3064E
C3065E
C3066E
The code space needed for this object is too large for this version of the
compiler
C3078E
C3079E
C3301W
The configuration file is one of the XML files supplied to the compiler with the
--arm_linux_config_file switches when using --arm_linux_paths or GCC
command-line translation. For example:
armcc --arm_linux_paths --arm_linux_config_file=arm_linux_config.xml
This warning indicates the file is from a newer compiler so might contain
unsupported features. To avoid incompatibilites, either use the newer version of
the compiler that was used to generate the configuration file, or re-generate the
configuration file using your current compiler version.
See the following in the Compiler Reference:
2-65
Check that the file can be read from and written to and has valid
permissions.
2.
C3309E
This error is produced when you try to automatically configure the tools with
--arm_linux_configure, but GCC cannot be found. Use the
--configure_gcc=path_to_gcc command -line option to specify the path to the
GCC executable, such as arm-none-linux-gnueabi-gcc.
See the following in the Compiler Reference:
The GCC that was used for the ARM Linux configuration process did not provide
a valid sysroot path. Use --configure_sysroot=sysroot_path to set the path.
See the following in the Compiler Reference:
2-66
This error is produced when you try to automatically configure the tools with
--arm_linux_configure, but the GNU linker (ld) could not be found. Use the
--configure_gkd=path_to_gcc command-line option to specify the path to the
GNU ld executable, such as arm-none-linux-gnueabi-ld.
See the following in the Compiler Reference:
This error indicates that, when using automatic configuration for ARM Linux
with --arm_linux_configure, the respective tools (GCC or GNU ld) could not be
executed or failed when invoked. Check that they have execute permissions, and
your GNU toolchain installation is working correctly.
See the following in the Compiler Reference:
C3315W
gcc command line translation - translation for this command is not fully
supported: <option>
C3316W
C3317W
C3318W
C3319W
C3320W
C3321E
could not accurately determine library configuration from GCC configuration might be incomplete
C3323E
C3324W
could not determine libstdc++ header file path - specify this manually to
ensure that C++ code will compile correctly
The path to the libstdc++ header files could not be determined from GCC. Specify
this path with --configure_cpp_headers=path
2-67
C3328W
cannot determine library paths from GNU linker - trying to use defaults
C3329W
C3330E
C3331W
C3332E
C3333E
C3334W
C3339W
C3419W
There is a write through a pointer that has been assigned to point at a literal string.
The behavior is undefined by to the ANSI standard. A subsequent read from the
location written might not reflect the write.
C3435E
C3447E
C3484E
C3486W
2-68
C3487E
For example :
void foo(void) {
unsigned int pntr;
pntr = (unsigned int)&pntr;
pntr -= 4;
pntr = *(unsigned int*)pntr;
}
C3488E
C3489E
C3490W
C3493E
C3494E
C3497E
C3498E
Certain options are expected to be used when targeting ARM Linux, for example
to select the correct ABI variant options. This message is given to indicate when
an incompatible option is specified.
See the following in the Compiler Reference:
2-69
Chapter 3
Assembler Errors and Warnings
The error and warning messages for the assembler, armasm, are listed in the following topic:
3-1
3.1
A1020E
The operand to the --predefine (-pd) command line option was not recognized.
The directive must be enclosed in quotes if it contains spaces, for example on
Windows:
--predefine "versionnum SETA 5"
If the SETS directive is used, the argument to the directive must also be enclosed
in quotes, which might require escaping depending upon operating system and
shell. For example:
--predefine "versionstr SETS \"5A\""
A1021U
No input file
No input file was specified on the command line. This might be because there was
no terminating quote on a quoted argument.
A1023E
A1024E
A1042E
There is an error in the argument given to the --apcs command line option. Check
the spelling of <qualifier>.
A1051E
A1055E
A1056E
The name given in the --cpu command line option is not a recognized processor
name. Check the spelling of the argument.
Use --cpu=list to list the supported processors and architectures.
A1067E
More than one output file, -o filename, has been specified on the command line.
Misspelling a command line option can cause this.
A1071E
The file given in the --list <filename> command line option could not be opened.
This could be because the given name is not valid, there is no space, a read-only
file with the same name already exists, or the file is in use by another process.
Check that the correct path for the file is specified.
A1072E
ARM DUI 0496C
ID080411
3-2
The filename argument to the --list command line option has an extension that
indicates it is a source or object file. This might be because the filename argument
was accidentally omitted from the command line. Check that the correct argument
is given to the --list command line option.
A1073E
The object file specified on the command line has a filename extension that
indicates it is a source file. This might be because the object filename was
accidentally omitted from the command line.
A1074E
The filename argument to the --depend command line option has an extension that
indicates it is a source (.s) file. This might be because the filename argument was
accidentally omitted from the command line. Check that the correct arguments
are given.
A1075E
The filename argument to the --errors command line option has an extension that
indicates it is a source (.s) file. This might be because the filename argument was
accidentally omitted from the command line. Check that the correct arguments
are given.
A1085E
The ARM architecture does not permit you to access the banked registers on the
instruction following a USER registers LDM or STM. The ARM Architecture
Reference Manual says this form of LDM must not be followed by an instruction,
which accesses banked registers (a following NOP is a good way to ensure this).
Example:
stmib sp, {r0-r14}^ ; Return a pointer to the frame in a1.
mov r0, sp
change to:
stmib sp, {r0-r14}^ ; Return a pointer to the frame in a1.
nop
mov r0, sp
A1088W
A1100E
A1105E
Missing comma
A1107E
A1108E
A1109E
A1110E
3-3
A1111E
A1112E
A1113E
A1114E
A1116E
A1117E
A1118E
A1119E
A1120E
A1121E
A1122E
A1123E
A1125E
A1126E
A1127E
A1128E
A1129E
A1130E
A1131E
A1132E
A1133E
A1134E
Bad required symbol type, expect (symbol is either external or label) and
(symbol is relocatable and absolute)
A1135E
to:
AREA |1_DataArea|, CODE, READONLY
3-4
A1136E
A1137E
This is given when extra characters that are not part of an instruction are found on
an instruction line.
For example:
ADD r0, r0, r1 comment
A1138E
String "<string>" too short for operation, length must be > <oplength>
A1139E
A1140E
A1141E
A1142E
This can occur when subtracting symbols that are in different areas, for example:
IMPORT sym1
IMPORT sym2
DCD (sym2 - sym1)
A1143E
A1144E
A1145E
A1146E
A1147E
A1148E
Unknown shift name <name>, expected one of LSL, LSR, ASR, ROR, RRX
A1150E
when the current file requires an INCLUDE of another file to define some
symbols, for example:
"init.s", line 2: Error: A1150E: Bad symbol
2 00000000 DCD EBI_CSR_0
when the current file requires IMPORT for some symbols, for example:
"init.s", line 4: Error: A1150E: Bad symbol
4 00000000 LDR r0, =||Image$$RAM$$ZI$$Limit||
A1151E
Example:
MCR p14, 3, R0, Cr1, Cr2
3-5
or
MCR p14, 3, R0, c1, c2
A1152E
Unexpected operator
A1153E
Undefined symbol
A1154E
A1155E
A1156E
A1157E
A1158E
Some directives, for example, ENTRY, IMPORT, EXPORT, and GET must be on a line
without a label at the start of the line. This error is given if a label is present.
A1159E
Some directives, for example, FUNCTION or SETS, require a label at the start of the
line, for example:
my_func FUNCTION
or
label SETS
A1161E
A1162E
A1163E
Forgetting to put some white space on the left hand side margin, before the
instruction, for example change:
MOV PC,LR
to
MOV PC,LR
Use of a hardware floating point instruction without using the --fpu switch,
for example:
FMXR FPEXC, r1 ;
instead of
ADD
A1164E
3-6
The processor selected on the armasm command line does not support this
instruction. See the ARM Architecture Reference Manuals,
http://infocenter.arm.com/help/topic/com.arm.doc.subset.arch.reference/ind
ex.html#reference.
A1165E
A1166E
A1167E
A1168E
A1169E
A1170E
Immediate 0x<adr> out of range for this operation, must be below (0x<adr>)
This error is given when DCB, DCW or DCWU directives are used with immediates that
are too large.
See the following in the Assembler Reference:
A1172E
A1173E
The ADR and ADRL pseudo-instructions can only be used with labels within the
same code area. To load an out-of-area address into a register, use LDR instead.
A1174E
Data transfer offset 0x<val> out of range. Permitted values are 0x<mini>
to 0x<maxi>
A1175E
A1176E
Branches are PC relative, and have a limited range. If you are using "local labels",
you can use the ROUT directive to limit the scope of local labels, to help avoid
referring to a wrong label by accident.
See the following in Using the Assembler:
A1179E
A1180E
A1181E
Bad operator
A1182E
A1183E
Numeric overflow
A1184E
A1185E
Symbol missing
A1186E
An instruction has been assembled into a data area. This can happen if you have
omitted the CODE attribute on the AREA directive.
3-7
A1188E
A1189E
Missing '#'
A1190E
Unexpected '<entity>'
A1191E
A1192E
A1193E
A1194E
A1195W
A1196E
A1198E
Unknown operand
must be:
armasm init.s -g -PD "ROM_RAM_REMAP SETL {FALSE}"
A1199E
A1200E
A1201E
A1202E
A1203E
A1204E
A1205E
A1206E
This warning is given if registers in, for example, LDM or STM instructions are not
specified in increasing order and the --checkreglist option is used.
A1207E
This error is given when an invalid attribute is given in the AREA directive. For
example:
AREA test,CODE,READONLY,HALFWORD
HALFWORD is invalid, so remove it.
3-8
A1210E
A1211E
A1212E
Division by zero
A1213E
A1214E
A1215E
A1216E
A1217E
A1219E
For example:
MRS r0, PSR
It is necessary to specify which status register to use (CPSR or SPSR), such as,
for example:
MRS r0, CPSR
A1220E
A1221E
Area attribute '<entity>' not supported for <entity> object file format
A1223E
A1224E
<entity> format does not allow PC-relative data transfers between areas
A1225E
A1226E
A1227E
A1228E
A1229E
A1230E
A1234E
A1237E
A1238E
A1240E
A1241E
A1242E
A1243E
A1244E
Missing '!'
A1245E
3-9
A1247E
This occurs when there is a BLX <label> branch from ARM code to ARM code
within this assembler file. This is not permitted because BLX <label> always
results in a state change. The usual solution is to use BL instead.
A1248E
This occurs when there is a BLX <label> branch from Thumb code to Thumb code
within this assembler file. This is not permitted because BLX <label> always
results in a state change. The usual solution is to use BL instead.
A1249E
A1250E
Pre indexed addressing mode not available for this instruction, use [Rn,
Rm]
A1253E
A1254E
Example:
LDRH R3, =constant
Change the LDRH into LDR, which is the standard way of loading constants into
registers.
A1256E
A1259E
Invalid PSR field specifier, syntax is <PSR>_ where <PSR> is either CPSR
or SPSR
A1260E
A1261E
This is caused by an attempt to use fields for CPSR or SPSR with an MRS
instruction, such as:
MRS r0, CPSR_c
A1262U
A1265U
A1267E
A1268E
A1269U
A1270E
A1271E
A1272E
A1273E
A1274W
A1283E
For Thumb code, the literal pool must be within 1KB of the LDR instruction to
access it. See A1284E and A1471W.
A1284E
ARM DUI 0496C
ID080411
3-10
For ARM code, the literal pool must be within 4KB of the LDR instruction to
access it. To solve this, add an LTORG directive into your assembler source file at a
convenient place.
See the following in Using the Assembler:
A1285E
A1286E
A1287E
A1288E
A1289E
A1290E
A1291E
A1310W
A1311U
A1312E
Assertion failed
A1313W
The assembler requires an END directive to know when the code in the file
terminates. You can add comments or other such information in free format after
this directive.
A1314W
A1315E
A1316E
A1319E
A1320E
A1321E
A1322E
A1323E
A1324E
A1327W
Non portable instruction (LDM with writeback and base in register list,
final value of base unpredictable)
A1328W
Non portable instruction (STM with writeback and base not first in
register list, stored value of base unpredictable)
3-11
A1329W
This is caused by an instruction such as PUSH {r0}^ where the ^ indicates access
to user registers. The ARM Architectural Reference Manual specifies that
writeback to the base register is not available with this instruction.
Instead, the base register must be updated separately. For example:
SUB sp, sp,#4
STMID sp, {r0}^
A1332W
A1334E
A1335W
A1337W
A1338W
A1339W
A1341E
A1342W
A1344I
A1355U
Example:
This can occur where no white-space precedes an assembler directive.
Assembler directives must be indented with white-space, for example use:
IF :DEF: FOO
; code
ENDIF
instead of:
IF :DEF: FOO
; code
ENDIF
3-12
This occurs if you try to use an instruction that is not supported by the default
architecture or processor for armasm.
For example:
SMULBB r0,r0,r1 ;
The processor selected on the armasm command line does not support this
instruction. See the ARM Architecture Reference Manuals,
http://infocenter.arm.com/help/topic/com.arm.doc.subset.arch.reference/ind
ex.html#reference.
A1406E
A1407E
A1408E
A1409W
A1411E
A1412E
A1413E
A1414E
Vector wraps round over itself, length * stride should not be greater than
<max>
A1415E
A1416E
A1417E
A1418E
A1419E
A1420E
A1421E
A1422E
A1423E
A1424E
A1425E
A1426E
A1427E
A1428E
A1429E
The assembler reports this when FRAME SAVE and FRAME RESTORE directives are not
given register lists.
See the following in the Assembler Reference:
3-13
A1430E
A1431E
A1432E
A1433E
The addressing mode specified for the instruction did not include the writeback
specifier (that is, a '!' after the base register), but the instruction set only supports
the writeback form of the instruction. Either use the writeback form, or replace
with instructions that have the desired behavior.
A1435E
architecture.
A1437E
{ARCHITECTURE} is undefined
{ARCHITECTURE} is only defined when assembling for an architecture, not for a
processor.
A1446E
Example:
AREA test1, CODE, READONLY
AREA test, CODE, READONLY, INTERWORK
This code might have originally been intended to work with SDT. The INTERWORK
area attribute is now obsolete. To eliminate the warning:
A1447W
Missing END directive at end of file, but found a label named END
A1449W
A1450W
Deprecated form of PSR field specifier used (use _cxsf for future
compatibility)
The assembler, armasm, supports the full range of MRS and MSR instructions, in
the form:
MRS(cond)
MRS(cond)
MSR(cond)
MSR(cond)
MSR(cond)
MSR(cond)
Rd, CPSR
Rd, SPSR
CPSR_fields,
SPSR_fields,
CPSR_fields,
SPSR_fields,
Rm
Rm
#immediate
#immediate
3-14
To avoid the warning, in most cases you can simply modify your code to use _c,
_f, _cf or _cxsf instead.
See also:
A1454E
the FAQ armasm: use of MRS and MSR instructions ('Deprecated form of
PSR field specifier'),
http://infocenter.arm.com/help/topic/com.arm.doc.faqs/ka3724.html.
Example:
AREA test, CODE, READONLY, INTERWORK
This code might have originally been intended to work with SDT. The INTERWORK
area attribute is now obsolete. To eliminate the warning:
A1457E
1.
2.
1.
move the two AREAs into separate assembler files such as, for example,
test1.s and test2.s
2.
3.
4.
3-15
5.
A1458E
A1459E
Cannot B or BL to a register
This form of the instruction is not permitted. See the ARM Architecture Reference
Manual for the permitted forms.
A1461E
It is likely that you are specifying a specific architecture or cpu using the --cpu
option and then incorporating some Thumb code in the AREA that is generating
this error.
For example:
armasm --cpu 4 code.s
StrongARM is an architecture 4 (not 4T) processor and does not support Thumb
code.
A1462E
A1463E
SPACE directive too big to fit in area, area size limit 2^32
A1464W
A1466W
warning might help C programmers from being caught out when writing in
assembler.
To avoid the warning, either:
modify the code to make the evaluation order explicit (that is, add more
brackets)
A1467W
A1468W
FRAME SAVE saving registers above the canonical frame address is not
recommended
A1469E
This can occur with, for example, the LTORG directive (see A1283E & A1284E).
LTORG instructs the assembler to dump literal pool DCD data at this position.
To prevent this warning from occurring, the data must be placed where the
processor cannot execute them as instructions. A good place for an LTORG is
immediately after an unconditional branch, or after the return instruction at the
end of a subroutine.
3-16
As a last resort, you could add a branch over the LTORG, to avoid the data being
executed, for example:
B unique_label
LTORG
unique_label
A1475W
A1476W
A1477W
A1479W
This is warning about an ALIGN directive that has a coarser alignment boundary
than its containing AREA. This is not permitted. To compensate, the assembler
automatically increases the alignment of the containing AREA for you. A simple
test case that gives the warning is:
AREA test, CODE, ALIGN=3
ALIGN 16
mov pc, lr
END
In this example, the alignment of the AREA (ALIGN=3) is 2^3=8 byte boundary, but
the mov pc,lr instruction is on a 16-byte boundary, hence the error.
Note
The two alignment types are specified in different ways.
This warning can also occur when using AREA ... ALIGN=0 to align a code section
on a byte boundary. This is not possible. Code sections can only be aligned on:
A1482E
Shift option out of range, allowable values are from <min> to <max>
A1484E
The ARM architecture does not have an ASL shift operation. The ARM barrel
shifter only has the following shift types: ROR, ASR, LSR, and LSL.
An arithmetic (that is, signed) shift left is the same as a logical shift left, because
the sign bit always gets shifted out.
Earlier versions of the assembler silently converted ASL to LSL. Use the --unsafe
switch to downgrade this error to a warning.
See the following in the Assembler Reference:
A1485E
3-17
A1486E
The ADR and ADRL pseudo-instructions can only be used with labels within the
same code section. To load an out-of-area address into a register, use LDR
instead.
A1487E
The Thumb instruction ASL is now faulted. See the corresponding ARM ASL
message A1484E.
A1488W
A1489E
<FPU> is undefined
A1490E
<CPU> is undefined
A1493E
A1495E
armasm determines the type of a symbol and detects branches to data. Specify
--diag-suppress 1495 to suppress this warning.
A1496E
For example:
ADD r0, r0, r1
is a valid instruction for ARM, but not for Thumb, so the unexpected characters
are ", ASR #1".
A1499E
A1500E
3-18
A1501E
A1502W
A1505E
A1506E
A1507E
A1508E
A1509E
A1510E
A1511E
A1512E
A1513E
A1514E
A1515E
A1516E
A1517E
A1539E
A1540E
A1541E
A1542E
A1543W
A1544W
Invalid empty PSR field specifier, field must contain at least one of
c,x,s,f
A1545E
A1546W
Example:
PUSH {r0}
A1547W
Example:
PUSH {r0,r1}
3-19
This warning has been given because the PRESERVE8 directive has not been
explicitly set by the user, but the assembler has set this itself automatically. This
warning is suppressed by default. To enable this warning use --diag_warning
1547.
See the following in the Assembler Reference:
A1548W
Example:
PRESERVE8
STRD r0,[sp,#8]
This warning is given when the REQUIRE8 directive is not set when required.
See the following in the Assembler Reference:
A1549W
Example:
PRESERVE8 {FALSE}
REQUIRE8
STRD r0,[sp,#8]
A1550E
A1551E
A1560E
A1561E
A1562E
A1563W
The assembler can give information about possible interlocks in your code caused
by the pipeline of the processor chosen by the --cpu option. To do this assemble
with armasm --diag_warning 1563
Note
If the --cpu option specifies a multi-issue processor such as Cortex-A8, the
interlock warnings are unreliable.
See also warning A1746W.
A1572E
A1573E
A1574E
A1575E
A1576E
A1577E
A1578E
A1581W
3-20
The assembler warns by default when padding bytes are added to the generated
code. This occurs whenever an instruction/directive is used at an address that
requires a higher alignment, for example, to ensure ARM instructions start on a
four-byte boundary after some Thumb instructions, or where there is a DCB
followed by DCD.
For example:
AREA Test, CODE, READONLY
THUMB
ThumbCode
MOVS r0, #1
ADR r1, ARMProg
BX r1
; ALIGN ; <<< add to avoid the first warning
ARM
ARMProg
ADD r0,r0,#1
BX LR
DCB 0xFF
DCD 0x1234
END
The warning can also occur when using ADR in Thumb-only code. The ADR Thumb
pseudo-instruction can only load addresses that are word aligned, but a label
within Thumb code might not be word aligned. Use ALIGN to ensure four-byte
alignment of an address within Thumb code.
See the following in the Assembler Reference:
A1582E
A1583E
A1584W
A1585E
A1586E
A1587E
A1593E
A1595E
A1596E
A1598E
3-21
A1599E
A1600E
A1601E
A1603W
A1604W
A1606E
A1607E
Thumb-2 wide branch instruction used, but offset could fit in Thumb-1
narrow branch instruction
A1608W
A1609W
MOV <rd>,pc instruction does not set bit zero, so does not create a return
address
This warning is caused when the current value of the PC is copied into a register
while executing in Thumb state. An attempt to create a return address in this
fashion fails as bit0 is not set. Attempting to BX to this instruction causes a state
change (to ARM).
To create a return address, you can use:
MOV r0, pc
ADDS r0, #1
A1611E
A1612E
A1615E
A1616E
A1617E
A1618E
A1619E
A1620E
A1621E
A1622E
Negative register offsets are not supported by the current instruction set
A1623E
A1624E
A1625E
3-22
A1626E
A1627E
This occurs when there is a branch from ARM code to Thumb code (or
vice-versa) within this file. The usual solution is to move the Thumb code into a
separate assembler file. Then, at link-time, the linker adds any necessary
interworking veneers.
A1630E
A1632E
A1633E
LDR rx,=
A1634E
A1635E
A1636E
A1637E
A1638E
A1639E
A1640E
A1641E
A1642W
A1643E
A1644E
A1645W
For example:
For example:
AREA foo, CODE
ADD r0, #-1
MOV r0, #-1
CMP r0, #-1
3-23
A1647E
TANDC, TEXTRC and TORC instructions with destination register other than
R15 is undefined
A1653E
A1654E
A1655W
A1656E
A1657E
A1658W
The option passed to armasm is now deprecated. Use armasm --help to view the
currently available options.
See the following in the Assembler Reference:
A1659E
A1660E
A1661E
A1662E
A1663E
A1664E
3-24
A1665E
A1666E
A1667E
A1668E
A1669E
A1670E
A1671E
A1672E
A1673E
A1674E
Source operand 1 should have integer type and be double the size of source
operand 2
A1675E
A1676E
A1677E
A1678E
A1679E
A1680E
A1681E
A1682E
A1683E
A1684E
Source operand type should be signed or unsigned with size between <min>
and <max>
A1685E
Source operand type should be signed, unsigned or floating point with size
between <min> and <max>
A1686E
Source operand type should be signed or floating point with size between
<min> and <max>
A1687E
Source operand type should be integer or floating point with size between
<min> and <max>
A1688E
Source operand type should be untyped with size between <min> and <max>
A1689E
A1690E
Source operand type should be signed with size between <min> and <max>
A1691E
A1692E
A1693E
Source operand type should be unsigned or floating point with size between
<min> and <max>
3-25
A1694E
Conditional instructions are not permitted in the specified instruction set. The
instruction MOVEQ, for example, is only permitted in ARM and Thumb-2
assembler, but not Thumb-1.
A1695E
A1696E
A1697E
A1698E
A1699E
A1700E
Source operand type should be integer with size between <min> and <max>
A1701E
A1702E
A1704E
A1705E
A1706E
A1708E
A1709E
A1710E
A1711E
A1712W
A1713E
Invalid field specifiers for APSR: must be APSR_ followed by at least one
of n, z, c, v, q or g
A1714E
A1715E
A1716E
A1717E
A1718E
A1719W
A1720E
A1721E
A1722E
A1723E
A1724E
3-26
A1725W
A1726E
A1727W
Immediate could have been generated using the 16-bit Thumb MOVS
instruction
A1728E
A1729E
A1730E
A1731E
A1732E
A1733E
A1734E
A1735E
A1736E
A1737E
A1738E
A1739W
A1740E
Number of bytes in FRAME PUSH or FRAME POP directive must not be less than
zero
A1741E
A1742E
A1744E
A1745W
A1746W
The assembler generates messages to help you optimize the code when building
with, for example:
--diag_warning 1563 --cpu=Cortex-A8
However, these messages are not reliable because the assembler make
sugggestions for modern processors such as the Cortex-A8 and Cortex-A9.
See also warning A1563W.
A1753E
A1754E
A1755E
A1756E
A1757W
3-27
A1758W
A1759E
A1760W
A1761W
A1762E
Branch offset 0x<val> out of range of 16-bit Thumb branch, but offset
encodable in 32-bit Thumb branch
This indicates that the assembler has inserted a IT block to permit a number of
conditional instructions in Thumb-2. For example:
MOVEQ r0,r1
A1765E
This is caused when the optional padsize attribute is used with an ALIGN directive,
but has an incorrect size. It does not refer to the parameter to align to. The
parameter can be any power of 2 from 2^0 to 2^31
A1766W
Size of padding value for code must be a minimum of <size> bytes; treating
as data
A1767E
A1768E
Missing '='
A1769E
A1771E
A1772E
Destination type must be signed or unsigned integer, and source type must
be 32-bit or 64-bit floating-point
A1773E
A1774E
A1775E
A1776E
A1777E
<n> is out of range for symbol type; value must be between <min> and <max>
A1778E
<n> is out of range for symbol binding; value must be between <min> and
<max>
A1779W
A1780E
A1781E
3-28
A1782E
A1783E
A1784W
A1785E
A1786W
For more information, see Diagnostic messages A1745W, A1477W and A1786W,
http://infocenter.arm.com/help/topic/com.arm.doc.faqs/ka4235.html.
A1787W
A1788W
A1789W
A1790W
is not a legal instruction because r0 is the base register and is also in the
destination register list. In this case, the assembler ignores the writeback and
generates:
LDM r0, {r0-r4}
A1791W
A1792E
A1793E
A1794E
A1795E
A1796E
A1797E
A1798W
A1799W
A1800W
A1801W
A1803E
A1804E
A1805W
Register is Read-Only
3-29
A1806W
Register is Write-Only
A1807W
A1808E
A1809W
A1810E
A1811E
A1812W
A1813W
A1814E
No output file
A1815E
A1816E
A1817W
A1818W
ATTR COMPAT flag <flag> and vendor '<vendor>' setting ignored in <scope>
A1819W
A1820E
A1846E
A1847E
This can occur during the assembly of ARM instructions when trying to access
data in another area. For example, using:
LDR r0, [pc, #label - . - 8]
or its equivalent:
LDR r0, [pc, #label-{PC}-8]
A1875E
This occurs if an instruction or directive does not appear in pass 1 but appears in
pass 2 of the assembler.
The following example shows when a line is not seen in pass 1:
AREA x,CODE
[ :DEF: foo
num EQU 42 ; assembler does not see this line during pass 1 because
; foo is not defined at this point during pass 1
3-30
]
foo DCD num
END
A1907W
Test for this symbol has been seen and may cause failure in the second
pass.
The following example generates this error because in pass 1 the value of x is
0x0004+r9, and in pass 2 the value of x is 0x0000+r0:
map 0, r0
if :lnot: :def: sym
map 0, r9
field 4
endif
x
field 4
sym LDR r0, x
A1909E
This occurs if an instruction or directive appears in pass 1 but does not appear in
pass 2 of the assembler.
The following example shows when a line is not seen in pass 2:
AREA x,CODE
[ :LNOT: :DEF: foo
MOV r1, r2 ; assembler does not see this line during pass 2 because
; foo is already defined
]
foo MOV r3, r4
END
A1916E
A1993E
A1994E
A1995E
A1996E
A1997E
A1998E
A1999E
3-31
Chapter 4
Linker Errors and Warnings
The following topics describe the error and warning messages for the linker, armlink:
4-1
4.1
Some errors such as L6220E, L6238E and L6784E can be downgraded to a warning by using:
--diag_warning
4-2
4.2
Out of memory.
This error is reported by RVCT v4.0 and earlier. For more details on why you
might see this error and possible solutions, see the description for error L6815U.
L6001U
L6002U
This indicates that the linker was unable to open a file specified on the linker
command line. This can indicate a problem accessing the file or a fault with the
command line specified. Some common occurrences of this message are:
Either specify the library path with --libpath or set the ARMCC41LIB
environment variable to install_directory\RVCT\Data\...\lib.
See the following in the Linker Reference:
--libpath=pathlist on page 2-96.
See the following in Introducing the ARM Compiler toolchain:
An file I/O error occurred while reading, opening, or writing to the specified file.
L6004U
This can occur where there is whitespace in the list of library objects.
The example below fails:
armlink x.lib(foo.o, bar.o)
Fatal error: L6004U: Missing library member in member list for x.lib.
L6006U
L6007U
4-3
The linker can recognize object files in the ELF format, and library files in AR
formats. The specified file is either corrupt, or is in a file format that the linker
cannot recognize.
L6008U
The linker can recognize library member objects in the ELF file format. The
specified library member is either corrupt, or is in a file format that the linker
cannot recognize.
L6009U
The endianness of the specified file or object did not match the endianness of the
other input files. The linker can handle input of either big endian or little endian
objects in a single link step, but not a mixed input of some big and some little
endian objects.
L6010U
An file I/O error occurred while reading, opening, or writing to the specified file.
L6011U
The linker must be provided with at least one object file to link.
For example, If you try to link with:
armlink lib.a -o foo.axf
L6016U
This can occur when linking with libraries built with the GNU tools. This is
because GNU ar can generate incompatible information.
The workaround is to replace ar with armar and use the same command line
arguments. Alternatively, the error is recoverable by using armar -s to rebuild the
symbol table.
L6017U
L6019U
L6020U
L6022U
The object file is faulty or corrupted. This might indicate a compiler fault. Contact
your supplier.
L6024U
The file specified is not a valid library file, is faulty or corrupted. Try rebuilding it.
4-4
L6025U
The file specified is not a valid library file, is faulty or corrupted. Try rebuilding it.
L6026U
L6031U
An I/O error occurred while trying to open the specified file. This could be due to
an invalid filename.
L6032U
L6033U
L6034U
This is most often caused by a section-relative symbol having a value that exceeds
the section boundaries.
L6035U
The argument is not valid for this option. This could be due to a spelling error, or
due to the use of an unsupported abbreviation of an argument.
L6038U
4-5
An I/O error occurred while creating the temporary file required for storing the
SYMDEFS output.
L6039W
Relocations with respect to mapping symbols are not permitted. This might
indicate a compiler fault. Contact your supplier.
L6043U
Relocations can only be made wrt symbols in the range (1-n), where n is the
number of symbols.
L6047U
The size of this image (<actual_size> bytes) exceeds the maximum allowed
for this version of the linker
L6048U
The linker is unable to continue the link step (<id>). This version of the
linker will not create this image.
L6049U
The linker is unable to continue the link step (<id>). This version of the
linker will not link with one or more given libraries.
L6050U
The code size of this image (<actual_size> bytes) exceeds the maximum
allowed for this version of the linker.
L6058E
L6064E
This might be because you specified an object file as output from from the
compiler without specifying the -c compiler option. For example:
armcc file.c -o file.o
armlink file.o -o file.axf
L6065E
-c on page 3-31.
The linker attempted to write a segment larger than 2GB. The size of a segment
is limited to 2GB.
L6175E
L6176E
A negative max_size cannot be used for region <regname> without the EMPTY
attribute.
4-6
Only regions with the EMPTY attribute are permitted to have a negative
max-size.
L6177E
A negative max_size cannot be used for region <regname> which uses the
+offset form of base address.
Regions using the +offset form of base address are not permitted to have a
negative max-size.
L6188E
A special section is one that can only be used once, such as "Veneer$$Code".
L6195E
means that there are two conflicting definitions of __stdout present in retarget.o
and stdio.o. The one in retarget.o is your own definition. The one in stdio.o is
the default implementation, which was probably linked-in inadvertently.
stdio.o contains a number symbol definitions and implementations of file
functions like fopen, fclose, and fflush.
stdio.o is being linked-in because it satisfies some unresolved references.
To identify why stdio.o is being linked-in, you must use the verbose link option
switch. For example:
armlink [... your normal options...] --verbose --list err.txt
Then study err.txt to see exactly what the linker is linking in, from where, and
why.
You might have to either:
L6201E
The input object specifies more than one entry point. Use the --entry
command-line option to select the entry point to use.
See the following in the Linker Reference:
L6202E
4-7
A root region is a region that has an execution address the same as its load
address. The region does not therefore require moving or copying by the
scatter-load initialization code.
Certain sections must be placed in root region in the image. __main.o and the
linker-generated table (Region$$Table) must be in a root region. If not, the linker
reports, for example:
Region$$Table cannot be assigned to a non-root region.
L6203E
The image entry point you specified with the --entry command-line option must
correspond to a valid instruction in the root-region of the image.
See the following in the Linker Reference:
L6205E
This message is displayed because the image entry point you specified with the
--entry command-line option is not word aligned. For example, you specified
--entry=0x8001 instead of --entry=0x8000.
See the following in the Linker Reference:
L6206E
The image entry point you specified with the --entry command-line option is
outside the image. For example, you might have specified an entry address of
0x80000 instead of 0x8000, as follows:
armlink --entry=0x80000 test.o -o test.axf
L6208E
ARM DUI 0496C
ID080411
4-8
L6209E
L6210E
One or more input objects specifies more than one entry point for the image. Use
the --entry command-line option to select the entry point to use.
See the following in the Linker Reference:
L6211E
This can occur when using the linker option --keep on an assembler object that
contains more than one AREA. The linker must know which AREA you want to keep.
To solve this, use more than one --keep option to specify the names of the AREAs
to keep, such as:
--keep boot.o(vectors) --keep boot.o(resethandler)
Note
Using assembler files with more than one AREA might give other problems
elsewhere, so this is best avoided.
L6213E
The exception-handling index tables generated by the compiler are given the
section name .ARM.exidx. For more information, see Exception Handling ABI for
the ARM Architecture,
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038-/index.html.
At link time these tables must be placed in the same execution region and be
contiguous. If you explicitly place these sections non-contiguously using specific
selector patterns in your scatter file, then this error message is likely to occur. For
example:
LOAD_ROM 0x00000000
{
ER1 0x00000000
{
file1.o (+RO) ; from a C++ source
4-9
* (+RO)
}
ER2 0x01000000
{
file2.o (+RO) ; from a C++ source
}
ER3 +0
{
* (+RW, +ZI)
}
}
This might produce the following error if exception-handling index tables are in
both file1.o and file2.o, because the linker cannot place them in separate
regions:
Error: L6216E: Cannot use base/limit symbols for non-contiguous section
.ARM.exidx
Also, the .init_array sections must be placed contiguously within the same
region for their base and limit symbols to be accessible.
The corrected example is:
LOAD_ROM 0x00000000
{
ER1 0x00000000
{
file1.o (+RO) ; from a C++ source
* (.ARM.exidx) ; Section .ARM.exidx must be placed explicitly,
; otherwise it is shared between two regions, and
; the linker is unable to decide where to place it.
*(.init_array) ; Section .init_array must be placed explicitly,
; otherwise it is shared between two regions, and
; the linker is unable to decide where to place it.
* (+RO)
}
ER2 0x01000000
{
file2.o (+RO) ; from a C++ source
}
ER3 +0
{
* (+RW, +ZI)
}
}
In the corrected example, the base and limit symbols are contained in .init_array
in a single region.
For more information, see the following in Using ARM C and C++ Libraries
and Floating-Point Support:
How C and C++ programs use the library functions on page 2-54
L6217E
L6218E
User Error. Somebody has referenced a symbol and has either forgotten to
define it or has incorrectly defined it.
4-10
The helper functions are automatically generated into the object file by the
compiler.
Note
An undefined reference error can, however, still be generated if linking
objects from legacy projects where the helper functions are in the h_xxx
libraries (h indicates that these are compiler helper libraries, rather than
standard C library code).
Re-compile the object or ensure that these libraries can be found by the
linker.
This error occurs when the default ordering rules used by the linker (RO followed
by RW followed by ZI) are violated. This typically happens when one uses +FIRST
or +LAST, for example in a scatter file, attempting to force RW before RO.
L6220E
Example:
Execution region ROM_EXEC size (4208184 bytes) exceeds limit (4194304
bytes).
This can occur where a region has been given an (optional) maximum length in
the scatter file, but this size of the code/data being placed in that region has
exceeded the given limit. This error is suppressible with --diag_suppress 6220.
For example, this might occur when using .ANYnum selectors with the ALIGN
directive in a scatter file to force the linker to insert padding. You might be able
to fix this using the --any_contingency option.
See the following in Using the Linker:
Placing unassigned sections with the .ANY module selector on page 8-25.
4-11
This represents an incorrect scatter file. A non-ZI section must have a unique load
address and in most cases must have a unique execution address. This error might
be because a load region LR2 with a relative base address immediately follows a
ZI execution region in a load region LR1. From RVCT v3.1 onwards, the linker
no longer assigns space to ZI execution regions.
See the following in the Linker Reference:
L6222E
Where objects are being linked together into a partially-linked object, only one of
the sections in the objects can have an entry point.
Note
It is not possible in this case to use the linker option --entry to select one of the
entry points.
L6223E
This occurs if the linker can not match an input section to any of the selectors in
your scatter file. You must correct your scatter file by adding an appropriate
selector.
See the following in Using the Linker:
L6225E
L6226E
L6227E
L6229E
L6230E
L6231E
L6232E
L6233E
L6234E
4-12
:
* (+FIRST, +RO)
:
+FIRST means place this (single) section first. Selectors that can match multiple
sections (for example, +RO or +ENTRY) are not permitted to be used with +FIRST (or
+LAST). If used together, the error message is generated.
L6235E
The scatter file specifies a section to be +FIRST or +LAST, but that section does not
exist, or has been removed by the linker because it believes it to be unused. Use
the linker option --info unused to reveal which objects are removed from your
project. Example:
ROM_LOAD 0x00000000 0x4000
{
ROM_EXEC 0x00000000
{
vectors.o (Vect, +First) << error here
* (+RO)
}
RAM_EXEC 0x40000000
{
* (+RW, +ZI)
}
}
link with --keep vectors.o to force the linker not to remove this, or switch
off this optimization entirely, with --noremove [not recommended]
Then link with --entry Vector_table to define the real start of your code.
See the following in Using the Linker:
L6237E
ARM DUI 0496C
ID080411
4-13
L6238E
This linker error is given where a stack alignment conflict is detected in object
code. The ABI for the ARM Architecture suggests that code maintains eight-byte
stack alignment at its interfaces. This permits efficient use of LDRD and STRD
instructions (in ARM Architecture 5TE and later) to access eight-byte aligned
double and long long data types.
Symbols such as ~PRES8 and REQ8 are Build Attributes of the objects:
~PRES8 means the object does NOT preserve eight-byte alignment of the
Where assembler code (that does not preserve eight-byte stack alignment)
calls compiled C/C++ code (that requires eight-byte stack alignment).
Where attempting to link legacy objects that were compiled with older tools
with objects compiled with recent tools. Legacy objects that do not have
these attributes are treated as ~PRES8, even if they do actually happen to
preserve eight-byte alignment.
For example:
Error: L6238E: foo.o(.text) contains invalid call from '~PRES8' function
to 'REQ8' function foobar
This means that there is a function in the object foo.o (in the section named .text)
that does not preserve eight-byte stack alignment, but which is trying to call
function foobar that requires eight-byte stack alignment.
A similar warning that might be encountered is:
Warning: L6306W: '~PRES8' section foo.o(.text) should not use the address
of 'REQ8' function foobar
to
STMFD sp!, {r0-r3, r12, lr} ; push even number of registers
The assembler automatically marks the object with the PRES8 attribute if all
instructions preserve eight-byte stack alignment, so it is no longer
necessary to add the PRESERVE8 directive to the top of each assembler file.
4-14
Cannot call non-interworking <t2> symbol '<sym>' in <obj2> from <t1> code
in <obj1>(<sec1>)
Example:
Cannot call non-interworking ARM symbol 'ArmFunc' in object foo.o from
THUMB code in bar.o(.text)
This problem can be caused by foo.c not being compiled with the option --apcs
/interwork, to enable ARM code to call Thumb code (and Thumb to ARM) by
linker-generated interworking veneers.
L6241E
When linking with '--strict', the linker reports conditions that might fail as
errors, for example:
Error: L6241E: foo.o(.text) cannot use the address of '~IW' function main
as the image contains 'IW' functions.
IW means interworking, and ~IW means non-interworking.
L6242E
Cannot link object <objname> as its attributes are incompatible with the
image attributes.
This occurs when you try to link object files built for the ADS ABI (ADS objects
or compiled with --apcs=/adsabi).
To avoid this error message you must re-compile the offending object files that
use the ADS ABI.
L6243E
All sections matching this selector have been removed from the image because
they were unused. For more information, use --info unused.
L6244E
L6245E
L6248E
4-15
See also What does "Error: L6248E: cannot have address type relocation"
mean?, http://infocenter.arm.com/help/topic/com.arm.doc.faqs/ka3554.html.
L6249E
L6250E
L6251E
L6252E
L6253E
L6254E
An I/O error occurred while trying to delete the specified file. The file was either
read-only, or was not found.
L6257E
L6260E
Multiple load regions with the same name (<regionname>) are not allowed.
Multiple execution regions with the same name (<regionname>) are not
allowed.
The Region Table contains information used by the C-library initialization code
to copy, decompress, or create ZI. This error message is given when the scatter
file specifies an image structure that cannot be described by the Region Table.
The error message is most common when PI and non-PI Load Regions are mixed
in the same image.
4-16
L6265E
A file compiled with --apcs=/rwpi is placed in an Execution Region that does not
have the PI attribute.
L6271E
Given a set of COMMON sections with the same name, the linker selects one of them
to be added to the image and discards all others. The selected COMMON section must
define all the symbols defined by any rejected COMMON section, otherwise, a symbol
which was defined by the rejected section now becomes undefined again. The
linker generates an error if the selected copy does not define a symbol that a
rejected copy does. This error is normally be caused by a compiler fault. Contact
your supplier.
L6276E
The image cannot contain contradictory mapping symbols for a given address,
because the contents of each word in the image are uniquely typed as ARM ($a)
or THUMB ($t) code, DATA ($d), or NUMBER. It is not possible for a word to
be both ARM code and DATA. This might indicate a compiler fault. Contact your
supplier.
L6277E
L6278E
L6279E
L6280E
L6281E
L6282E
4-17
L6283E
An object cannot contain a reference to a local symbol, since local symbols are
always defined within the object itself.
L6285E
This error occurs where there is a PI reference between two separate segments, if
the two segments can be moved apart at runtime. When the linker sees that the
two sections can be moved apart at runtime it generates a relocation (an R-Type
relocation) that can be resolved if the sections are moved from their statically
linked address. However the linker faults this relocation (giving error L6285E)
because PI regions must not have relocations with respect to other sections as this
invalidates the criteria for being position independent.
L6286E
This can typically occur in handwritten assembler code, where the limited
number of bits for a field within the instruction opcode is too small to refer to a
symbol so far away. For example, for an LDR or STR where the offset is too large
for the instruction (+/-4095 for ARM state LDR/STR instruction). In other cases,
please make sure you have the latest patch installed from:
http://www.arm.com/support/downloads.
For more information see Value out of range for relocation,
http://infocenter.arm.com/help/topic/com.arm.doc.faqs/ka3553.html.
L6287E
L6292E
This error message is specific to execution regions with the FIXED attribute. FIXED
means make the load address the same as the execution address. The linker can
only do this if the execution address is greater than or equal to the next available
load address within the load region.
See the following in Using the Linker:
L6294E
<type> region <regionname> spans beyond 32 bit address space (base <base>,
size <size> bytes).
The above error message relates to a problem with the scatter file.
L6295E
4-18
L6296E
See L6188E.
L6300W
There can be only one SHLNAME entry in an edit file. Only the first such entry is
accepted by the linker. All subsequent SHLNAME entries are ignored.
L6304W
The specified filename occurred more than once in the list of input files.
L6305W
Image does not have an entry point. (Not specified or not set due to
multiple choices.)
The entry point for the ELF image was either not specified, or was not set because
there was more than one section with an entry point linked-in. You must use linker
option --entry to specify the single, unique entry, for example:
--entry 0x0
or
--entry <label>
See L6238E.
L6307W
L6308W
The name of an object in a library is specified on the link-line, but the library does
not contain an object with that name.
L6309W
A library is specified on the linker command-line, but the library does not contain
any members.
L6310W
\armlib
\cpplib
4-19
any trailing slashes (\) at the end. These are added by the linker
automatically.
L6311W
See L6218E.
L6312W
L6313W
For example, use of IWV$$Code within the scatter file is now obsolete and can be
replaced with Veneer$$Code.
L6314W
Example:
No section matches pattern foo.*o(ZI).
L6315W
The file foo.o is mentioned in your scatter file, but it is not listed on the
linker command-line. To resolve this, add foo.o to the link-line.
You are trying to place the ZI data of foo.o using a scatter file, but foo.o
does not contain any ZI data. To resolve this, remove the +ZI attribute from
the foo.o line in your scatter file.
An object can contain at most one absolute BuildAttribute$$... symbol. Only the
first such symbol from the object symbol table is accepted by the linker. All
subsequent ones are ignored.
L6316W
L6318W
This warning means that in the (usually assembler) file, there is a branch to a
non-code symbol (in another AREA) in the same file. This is most likely a branch
to a label or address where there is data, not code.
For example:
4-20
This warning can also appear when linking objects generated by GCC. GCC uses
linker relocations for references internal to each object. The targets of these
relocations might not have appropriate mapping symbols that permit the linker to
determine whether the target is code or data, so a warning is generated. By
contrast, armcc resolves all such references at compile-time.
L6319W
on the linker command-line in your makefile, but this section might not be present
when building with no C++, in which case this warning is reported:
Ignoring --keep command. Cannot find section *(.init_array)
You can often ignore this warning, or suppress it with --diag_suppress 6319
L6320W
L6323W
L6324W
Ignoring <attr> attribute for region <regname> which uses the +offset form
of base address.
This attribute is not applicable to regions using the +offset form of base address.
If specified for a region, which uses the +offset form, the linker ignores it.
A region that uses the +offset form of base address inherits the PI, RELOC, or
OVERLAY attributes from either:
the parent load region if it is the first execution region in the load region.
See the following in the Linker Reference:
execution address is the same as its load address, and so does not require moving
or copying at run-time.
ARM DUI 0496C
ID080411
4-21
L6329W
All sections matching this pattern have been removed from the image because
they were unused. For more information, use --info unused.
See the following in Using the Linker:
L6330W
This means that an unused section has had its base and limit symbols referenced.
For more information, use --info unused.
See the following in Using the Linker:
L6331W
L6332W
L6334W
L6335W
The compiler is able to perform tailcall optimization for improved code size and
performance. However, there is a problematic sequence for Architecture 4T code
where a Thumb IW function calls (by a veneer) an ARM IW function, which
tailcalls an ARM not-IW function. The return from the ARM not-IW function can
pop the return address off the stack into the PC instead of using the correct BX
instruction. The linker can warn of this situation and report the above warning.
Thumb IW tailcalls to Thumb not-IW do not occur because Thumb tailcalls with
B are so short ranged that they can only be generated to functions in the same ELF
section which must also be Thumb.
The warning is pessimistic in that an object might contain invalid tailcalls, but the
linker cannot be sure because it only looks at the attributes of the objects, not at
the contents of their sections.
To avoid the warning, either recompile your entire code base, including any user
libraries, with --apcs /interwork, or manually inspect the ARM IW function to
check for tailcalls (that is, where function calls are made using an ordinary branch
B instruction), to check whether this is a real problem. This warning can be
suppressed with --diag_suppress L6335W.
L6337W
L6339W
4-22
Execution regions cannot explicitly be given RELOC attribute. They can only gain
this attribute by inheriting from the parent load region or the previous execution
region if using the +offset form of addressing.
See the following in the Linker Reference:
L6340W
options first and last are ignored for link type of <linktype>
The --first and --last options are meaningless when creating a partially-linked
object.
L6366E
<object> attributes<attr> are not compatible with the provided cpu and fpu
attributes<cli> <diff>.
L6367E
L6368E
L6369E
L6370E
L6372E
L6373E
L6384E
This might be because you have used the current base address in a limit
calculation in a scatter file. For example:
ER_foo 0 ImageBase(ER_foo)
L6385W
L6386E
L6387E
L6389E
Load Region <name> on line <line> not yet complete, cannot use operations
that depend on length of region
L6390E
4-23
L6406W
This occurs if there is not sufficient space in the scatter file regions containing
.ANY to place the section listed. You must modify your scatter file to ensure there
is sufficient space for the section.
See the following in Using the Linker:
Placing unassigned sections with the .ANY module selector on page 8-25.
L6407W
Sections of aggregate size 0x<size> bytes could not fit into .ANY
selector(s).
This warning identifies the total amount of image data that cannot be placed in
any .ANY selectors.
For example, .ANY(+ZI) is placed in an execution region that is too small for the
amount of ZI data:
ROM_LOAD 0x8000
{
ROM_EXEC 0x8000
{
.ANY(+RO,+RW)
}
RAM +0 0x{...} <<< region max length is too small
{
.ANY(+ZI)
}
}
Placing unassigned sections with the .ANY module selector on page 8-25.
L6408W
Output is --fpic yet section <sec> from <obj> has no FPIC attribute.
L6409W
L6410W
L6411W
L6412W
Disabling merging for section <sec> from object <obj>, non R_ARM_ABS32
relocation from section <srcsec> from object <srcobj>
L6413W
Disabling merging for section <sec> from object <obj>, Section contains
misaligned string(s).
L6414E
4-24
L6415E
Could not find a unique set of libraries compatible with this image.
Suggest using the --cpu option to select a specific library.
L6417W
L6418W
L6419W
L6420E
L6422U
For the linker to generate PLT, you must be using a target that supports the ARM
instruction set. For example, the linker cannot generate PLT for a Cortex-M3
target.
L6423E
Within the same collection, section <secname> cannot have different sort
attributes.
L6424E
L6425E
Within the same collection, section <secname> cannot have their section
names with different length.
L6426E
Within the same collection, section <secname> cannot have its name
duplicated.
L6427E
L6429U
Attempt to set maximum number of open files to <val> failed with error
code <error>.
An attempt to increase the number of file handles armlink can keep open at any
one time has failed.
L6431W
L6432W
L6433W
L6434W
L6435W
L6436W
4-25
L6437W
L6438E
L6439W
L6440E
L6441U
L6442U
L6443W
Data Compression for region <region> turned off. Region contains reference
to symbol <symname> which depends on a compressed address.
L6445I
L6447E
L6448W
L6449E
L6450U
L6451E
L6452E
L6453E
L6454E
L6455E
L6459U
L6462E
L6463U
Input Objects contain <archtype> instructions but could not find valid
target for <archtype> architecture based on object attributes. Suggest
using --cpu option to select a specific cpu.
4-26
L6468U
--base_platform does not support RELOC Load Regions containing non RELOC
Execution Regions. Please use +0 for the Base Address of Execution Region
<ername> in Load Region <lrname>.
L6471E
L6475W
The symbol you are trying to export, either with an EXPORT command in a steering
file or with the --undefined_and_export command-line option, is not exported
becuase of low visibility.
See the following in the Linker Reference:
L6617E
L6629E
4-27
L6634E
Pre-processor command in
<max_size>
Object <objname> has a link order dependency cycle, check sections with
SHF_LINK_ORDER
L6640E
PDTTable section not least static data address, least static data section
is <secname>
Systems that implement shared libraries with RWPI use a process data table
(PDT). It is created at static link time by the linker and must be placed first in the
data area of the image.
This message indicates that the scatter file does not permit placing the PDT Table
first in the data area of the image.
To avoid the message, adjust your scatter file so that the PDT Table is placed
correctly. This message can also be triggered if you accidentally build object files
with --apcs=/rwpi.
L6642W
L6643E
Unexpectedly reached the end of the buffer when reading the virtual
function elimination information in section <oepname>(<sectionname>).
4-28
L6651E
Section <secname> from object <objname> has SHF_GROUP flag but is not
member of any group.
L6652E
L6654E
Internal error: the vfe section list contains a non-vfe section called
<oepname>(<secname>).
L6665W
The linker has not been told to look in the libraries and so cannot find the symbol
printf.
This also causes an error:
L6218E: Undefined symbol printf (referred from L6665W.o).
If you do not want the libraries, then ignore this message. Otherwise, to fix both
the error and the warning uncomment the line:
IMPORT || Lib$$Request$$armlib||
L6679W
Data in output ELF section #<sec> '<secname>' was not suitable for
compression (<data_size> bytes to <compressed_size> bytes).
L6682E
L6683E
L6684E
Section <spname> from object <oepname> has SHF_STRINGS flag but not
SHF_MERGE flag
L6685E
L6688U
4-29
L6689U
L6690U
L6703W
L6707E
Padding value not specified with PADVALUE attribute for execution region
<regionname>.
Could not process debug frame from <secname> from object <oepname>.
L6709E
L6713W
L6714W
L6720U
L6725W
L6728U
Link order dependency on invalid section number <to> from section number
<from>.
L6730W
A change in the linker behavior gives warnings about strict compliance with the
ABI.
Note
The following example produces a warning only if linking with a toolchain that
is compliant with an earlier version of the Application Binary Interface (ABI).
The ARM Compiler v4.1 toolchain does not give this warning.
Example:
AREA foo, CODE, READONLY
CODE32
ENTRY
KEEP
func proc
NOP
ENDP
DCD foo
END
The warning is related to how the assembler marks sections for interworking.
Previously, the section symbol foo would be marked as ARM or Thumb code in
the ELF file. The DCD foo above would therefore also be marked as subject to
interworking.
4-30
However, the ABI specifies that only functions are be subject to interworking and
marked as ARM or Thumb. The linker therefore warns that it is expecting DCD
<number>, which does not match the symbol type (ARM, or Thumb if you use
CODE16) of the area section.
The simplest solution is to move the data into a separate data area in the assembly
source file.
Alternatively, you can use --diag_suppress 6730 to suppress this warning.
L6731W
Unused virtual function elimination might not work correctly, because the
section referred to from <secname> does not exist.
L6733W
L6738E
L6740W
L6741E
L6742E
L6743E
L6744E
L6745E
L6747W
If the linker detects objects that specify the obsolete ARMv3, it upgrades these to
ARMv4 to be usable with ARM libraries.
L6748U
L6751E
L6753E
CallTree sorting needs Entry Point to lie within a CallTree Sort ER.
L6761E
L6762E
L6763W
L6764E
Cannot create a PLT entry for target architecture 4T that calls Thumb
symbol <symname>
4-31
L6765W
This can occur when linking with GNU C libraries. The GNU startup code crt1.o
does not have any build attributes for the entry point, so the linker cannot
determine which execution state (ARM or Thumb) the code runs in. Because the
GNU C library startup code is ARM code, you can safely ignore this warning, or
suppress it with --diag_suppress 6765.
L6766W
L6769E
L6770E
The size and content of the dynamic array changed too late to be fixed.
L6771W
L6772W
L6775W
<objname>(<secname>) has FDEs which use CIEs which are not in this
section.
L6776W
L6777W
L6778W
L6780W
L6781E
L6782W
L6783E
This indicates that the address for a section points to a location at the end of or
outside of the ELF section. This can be caused by an empty inlined data section
and indicates there might be a problem with the object file. You can use
--diag_warning 6783 to suppress this error.
L6784E
4-32
The linker encountered a symbol with a size that extends outside of its containing
section. This message is only a warning by default in the RVCT 2.2 SP1 and later
toolchains. Use --diag_warning 6784 to suppress this error.
L6785U
L6786W
L6787U
L6788E
This occurs when scatter-loading takes place and an execution region is put in a
position where is overwrites partially or wholly another execution region (which
can be itself or another region).
For example, this works:
LOAD_ROM 0x0000 0x4000
{
EXEC1 0x0000 0x4000
{
* (+RO)
}
EXEC2 0x4000 0x4000
{
* (+RW,+ZI)
}
}
and reports:
Error: L6788E: Scatter-loading of execution region EXEC2 will cause the
contents of execution region EXEC2 to be corrupted at run-time.
L6789U
L6790E
L6791E
L6792E
L6793E
4-33
L6794E
L6795E
L6796E
L6797E
L6798E
L6799E
A landing pad is code that cleans up after an exception has been raised. If the
linker detects old-format exception tables, it automatically converts them to the
new format.
This message does not appear unless you are using a later version of the linker
with an earlier version of the compiler.
L6800W
A personality routine is used to unwind the exception handling stack. If the linker
detects old-format exception tables then it automatically converts them to the new
format. This message indicates a fault in the compiler. Contact your supplier.
L6801E
The linker can diagnose where a non-interworking (~IW) function has its address
taken by code in the other state. This error is disabled by default, but can be
enabled by linking with --strict. The error can be downgraded to just a warning
with --diag_warning 6801 and subsequently suppressed completely if required
with --diag_suppress 6801
Where code, for example, in a.c uses the address of a non-interworking function
in t.c:
armcc -c a.c
armcc --thumb -c t.c
armlink t.o a.o --strict
reports:
Error: L6801E: a.o(.text) containing ARM code cannot use the address of
'~IW' Thumb function foo.
L6802E
L6803W
L6804W
L6805E
4-34
L6806W
L6807E
L6809W
L6810E
Relocation errors and warnings are most likely to occur if you are linking object
files built with previous versions of the ARM tools.
To show relocation errors and warnings use the --strict_relocations switch.
This option enables you to ensure ABI compliance of objects. It is off by default,
and deprecated and obsolete relocations are handled silently by the linker.
See the following in the Linker Reference:
L6813U
This error is reported by ARM Compiler toolchain v4.1 and later. It provides
information about the amount of memory available and the amount of memory
required to perform the link step.
This error occurs because the linker does not have enough memory to link your
target object. This is not common, but might be triggered for a number of reasons,
such as:
4-35
While the linker can generate images of almost any size, it requires a larger
amount of memory to run and finish the link. Try the following solutions to
improve link-time performance, to avoid the Out of memory error:
1.
Shut down all non-essential applications and processes when you are
linking.
For example, if you are running under Eclipse, try running your linker from
the command-line, or exiting and restarting Eclipse between builds.
2.
3.
Note
It is not possible to perform source level debugging if you use this option.
4.
5.
6.
7.
4-36
If you are still experiencing the same problem, raise a support case.
L6828E
L6899E
L6900E
L6901E
L6902E
Expected a string.
L6903E
L6904E
L6905E
L6906E
L6907E
Expected an expression.
L6910E
L6912W
L6913E
L6914W
L6915E
or
Error: L6915E: Library reports error: The semihosting
__user_initial_stackheap cannot reliably set up a usable heap region
if scatter loading is in use
4-37
Note
__user_setup_stackheap() supersedes the deprecated function
__user_initial_stackheap().
4-38
L6916E
L6917E
L6918W
L6922E
L6923E
L6924E
L6925E
Ignoring <token> attribute for region <region>. MemAccess support has been
removed.
L6926E
L6927E
L6932W
L6935E
Debug Group contents are not identical, <name> with signature sym <sig>
from objects (<new>) and (<old>)
L6936E
L6937E
L6939E
L6940E
L6941W
L6942E
L6966E
L6967E
L6968E
4-39
L6969W
L6971E
You might see this message when placing __at sections with a scatter file. For
example, the following code in main.c and the related scatter file gives this error:
int variable __attribute__((at(0x200000)));
LR1 0x0000 0x20000
{
ER1 0x0 0x2000
{
*(+RO)
}
ER2 0x8000 0x2000
{
main.o
}
RAM 0x200000 (0x1FF00-0x2000)
{
*(+RW, +ZI)
}
}
The variable has the type ZI, and the linker attempts to place it at address
0x200000. However, this address is reserved for RW sections by the scatter file.
This produces the error:
Error: L6971E: stdio_streams.o(.data) type RW incompatible with
main.o(.ARM.__AT_0x00200000) type ZI in er RAM.
To fix this change the address in your source code, for example:
int variable __attribute__((at(0x210000)));
L6973E
L6975E
L6976E
L6977E
L6978W
L6979E
4-40
L6980W
L6981E
4-41
Chapter 5
ELF Image Converter Errors and Warnings
The following topic describes the error and warning messages for the ELF image converter,
fromelf:
5-1
5.1
Base and/or size too big for this format, max = 0x<maxval>.
Q0106E
Out of Memory.
Q0107E
Q0108E
Q0119E
Q0120E
Q0122E
If <reason> is Invalid argument, this might be because you have invalid characters
on the command-line. For example, on Windows you might have used the escape
character \ when specifying a filter with an archive file:
fromelf --elf --strip=all t.a\(test*.o\) -o filtered/
On Windows, use:
fromelf --elf --strip=all t.a(test*.o) -o filtered/
Q0128E
This error can occur if you specify a directory for the --output command-line
option, but you did not terminate the directory with a path separator. For example,
--output=my_elf_files/.
See the following in Using the fromelf Image Converter:
Q0129E
Q0130E
Q0131E
This error is given if you attempt to use fromelf on a file which is not in ELF
format, or which is corrupted. Object (.o) files and executable (.axf) files are in
ELF format.
Q0132E
Q0133E
Q0134E
Q0135E
Q0136E
Q0137E
Q0138E
See Q0131E.
Q0147E
5-2
If <reason> is File exists, this might be because you have specified a directory that
has the same name as a file that already exists. For example, if a file called
filtered already exists, then the following command produces this error:
fromelf --elf --strip=all t.a(test*.o) -o filtered/
Q0171E
See Q0131E.
Q0172E
See Q0131E.
Q0186E
The --fieldoffsets option requires the image to be built with dwarf debug tables.
Q0425W
Q0440E
Q0447W
Q0448W
Read past the end of the compressed data while decompressing section
'<secname>' #<secnum> in <file>
Write past the end of the uncompressed data buffer of size <bufsize> while
decompressing section '<secname>' #<secnum> in <file>
Q0450W
Q0451W
Option '--strip symbols' used without '--strip debug' on an ELF file that
has debug information.
Q0452W
Q0453W
Q0454E
5-3
Chapter 6
Librarian Errors and Warnings
The following topic describes the error and warning messages for the ARM Librarian, armar:
6-1
6.1
Out of memory
L6825E
L6826E
L6827E
L6828E
L6829E
L6830E
L6831E
L6832E
L6833E
L6835E
L6836E
L6838E
No archive specified
L6839E
L6840E
L6841E
L6842E
L6843E
L6874W
Minor variants of the same function exist within a library. Find the two equivalent
objects and remove one of them.
L6875W
6-2
Chapter 7
Other Errors and Warnings
The following topic describes other error and warning messages that might be displayed by the
tools:
Note
These error messages can be produced by any of the tools.
When the message is displayed, the X prefixing the message number is replaced by the appropriate
letter relating to the application. For example, the code X3900U, is displayed as L3900U by the linker
when you have specified an unrecognized option.
7-1
7.1
X3901U
X3902U
X3903U
X3904U
X3905U
X3906U
X3907U
X3908U
X3910W
X3912W
X3913W
X3915W
X3916U
X3917U
X9905E
X9906E
X9907E
X9908E
7-2
Appendix A
Revisions for the Errors and Warnings Reference
The following technical changes have been made to the Errors and Warnings Reference:
Table A-1 between Issue C Update 3 and Issue C Update 4
Change
Topics affected
A-1
Topics affected
added L6064E
added L6815U
Topics affected
Change
Topics affected
A-2