7-2
EPSOn
S5U1C17001C ManUal
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
7 liBrary
7.1.2 Precautions to Be Taken When adding a library
There is a dependency relationship between the libraries.
When writing to a
*.mak
or
*.lds
file, specify the libraries in the sequence below.
1. Additional libraries
2.
libc.a
3.
libgcc.a ( libgccM.a / libgccMD.a )
4.
libc.a
(Duplication with 2 does not cause an error. Both files can be referenced normally.)
The object file (or library) can reference only the files present after it, in the order in which they are passed to the
linker. If the added library is specified last, none of the external libraries can be used in the added library. Because
the basic functions such as
float
and
double
arithmetic and the ANSI library cannot be used, always make sure
the added library is located before the emulation and ANSI libraries.
Example:
1. NG
ld.exe -T withmylib.lds -o withmylib.elf boot.o libc.a libgcc.a libc.a mylib.a
If
mylib.a
is using the emulation and ANSI libraries, an error should always occur during linking.
2. OK
ld.exe -T withmylib.lds -o withmylib.elf boot.o mylib.a libc.a libgcc.a libc.a
No errors should occur during linking, allowing
mylib.a
to use the emulation and ANSI libraries normally.
If the added libraries have a dependent relationship, make sure the basic library is located last.
Example:
lib1.a
calls only the emulation and ANSI libraries
lib2.a
calls
lib1.a
in addition to the emulation and ANSI libraries
lib3.a
calls
lib1.a
and
lib2.a
in addition to the emulation and ANSI libraries
ld.exe -T withmylib.lds -o withmylib.elf boot.o lib3.a lib2.a lib1.a libc.a libgcc.a
libc.a
Refer to Section 5.7.5, "Setting Linker Options", for how to add libraries using the
IDE
.
Содержание S5U1C17001C
Страница 6: ......
Страница 17: ...1 General S5U1C17001C Manual 1 General ...
Страница 18: ......
Страница 21: ...1 2 Install S5U1C17001C Manual 2 Installation ...
Страница 22: ......
Страница 29: ...3 SoftDev S5U1C17001C Manual 3 Software Development Procedures ...
Страница 30: ......
Страница 103: ...4 SrcFiles S5U1C17001C Manual 4 Source files ...
Страница 104: ......
Страница 121: ...5 IDE S5U1C17001C Manual 5 gnU17 iDE ...
Страница 122: ......
Страница 365: ...6 Compiler S5U1C17001C Manual 6 C Compiler ...
Страница 366: ......
Страница 385: ...7 Library S5U1C17001C Manual 7 library ...
Страница 386: ......
Страница 404: ...7 18 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 7 liBrary THIS PAGE IS BLANK ...
Страница 405: ...8 Assemblr S5U1C17001C Manual 8 assembler ...
Страница 406: ......
Страница 438: ...8 32 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 8 aSSEMBlEr THIS PAGE IS BLANK ...
Страница 439: ...9 Linker S5U1C17001C Manual 9 linker ...
Страница 440: ......
Страница 448: ...9 8 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 9 linkEr THIS PAGE IS BLANK ...
Страница 449: ...10 Debugger S5U1C17001C Manual 10 Debugger ...
Страница 450: ......
Страница 625: ...10 174 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 10 DEBUggEr THIS PAGE IS BLANK ...
Страница 626: ...11 Tools S5U1C17001C Manual 11 Other Tools ...
Страница 627: ......
Страница 695: ...11 68 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 11 OTHEr TOOlS THIS PAGE IS BLANK ...
Страница 696: ...S1C17 Family C Compiler Package Quick Reference Reference ...