9-2
EPSOn
S5U1C17001C ManUal
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
9 linkEr
9.2.2 Output files
Executable object file
File format: Binary file in elf format
File name:
<filename>
.elf
Description: Object file in executable format that can be input in the
gdb
debugger. All the modules comprising
one program are linked together in the file, and the absolute addresses that all the codes will be
mapped are determined. It also contains the necessary debugging information in elf format.
The default file name is
a.out
when no output file name is specified using the
-o
option.
link map file
File format: Text file
File name:
<filename>
.map
Description: Mapping information file showing from which address of a section each input file was mapped.
The file is delivered when the
-M
or
-Map
option is specified.
9.3 Starting Method
9.3.1 Startup format
To invoke the
ld
linker, use the command shown below.
ld
<options>
<file names>
<options>
See Section 9.3.2.
<file names>
Specify one or more object file names and/or one ore more library file names.
Example:
ld -o sample.elf boot.o sample.o ..\lib\24bit\libc.a ..\lib\24bit\libgcc.a
9.3.2 Command-line Options
The
ld
linker accepts the gnu linker standard options. The following lists the principal options only. Refer to the
gnu linker manual for more information.
-o
<filename>
Function:
Specify output file name
Explanation: This option is used to specify the name of the object file output by the
ld
linker.
Default:
The default output file name is
a.out
.
-T
<linker script file name>
Function:
Read linker script file
Explanation: Specify this option when loading relocate-information into the
ld
linker using a linker script file.
Default:
The default linker script (see Section 9.4.1) is used.
-M
-Map
<filename>
Function:
Output link map file
Explanation: The
-M
option outputs the link map information to
stdio
.
The
-Map
option outputs the link map information to a file.
Default:
No link map information is output.
-N
Function:
Disable data segment alignment check
Explanation: When the
-N
option is specified, the linker does not check the alignment of data segments. This
option should be used normally. (see Section 9.6, "Precautions".)
Default:
The linker checks the alignment of data segments.
When inputting options in the command line, one or more spaces are necessary before and after the option.
Example:
ld -o sample.elf -T sample.lds -N boot.o sample.o ..\lib\24bit\libc.a
Summary of Contents for S5U1C17001C
Page 6: ......
Page 17: ...1 General S5U1C17001C Manual 1 General ...
Page 18: ......
Page 21: ...1 2 Install S5U1C17001C Manual 2 Installation ...
Page 22: ......
Page 29: ...3 SoftDev S5U1C17001C Manual 3 Software Development Procedures ...
Page 30: ......
Page 103: ...4 SrcFiles S5U1C17001C Manual 4 Source files ...
Page 104: ......
Page 121: ...5 IDE S5U1C17001C Manual 5 gnU17 iDE ...
Page 122: ......
Page 365: ...6 Compiler S5U1C17001C Manual 6 C Compiler ...
Page 366: ......
Page 385: ...7 Library S5U1C17001C Manual 7 library ...
Page 386: ......
Page 405: ...8 Assemblr S5U1C17001C Manual 8 assembler ...
Page 406: ......
Page 439: ...9 Linker S5U1C17001C Manual 9 linker ...
Page 440: ......
Page 449: ...10 Debugger S5U1C17001C Manual 10 Debugger ...
Page 450: ......
Page 626: ...11 Tools S5U1C17001C Manual 11 Other Tools ...
Page 627: ......
Page 696: ...S1C17 Family C Compiler Package Quick Reference Reference ...