Directives Reference
ARM DUI 0068B Copyright © 2000, 2001 ARM Limited. All r ights reserved. 7-63
7.7.13 INCBIN
The
INCBIN
directive includes a file within the file being assembled. The file is included
as it is, without being assembled.
Syntax
INCBIN filename
where:
filename
is the name of the file to be included in the assembly. The assembler
accepts pathnames in either UNIX or MS-DOS format.
Usage
You can use
INCBIN
to include executable files, literals, or any arbitrary data. The
contents of the file are added to the current ELF section, byte for byte, without being
interpreted in any way. Assembly continues at the line following the
INCBIN
directive.
By default the assem bler searches th e current place f or included files . The current pl ace
is the directory where the calling file is located. Use the
-i
assembler command-lin e
option to add directories to the search path. File names and directory names containing
spaces must not be enclosed in double quotes ( " " ).
Example
AREA Example, CODE, READONLY
INCBIN file1.dat ; includes file1 if it
; exists in the
; current place.
INCBIN c:\project\file2.txt ; includes file2
7.7.14 INCLUDE
See GET or INCLUDE on page 7-61