First, Introduction
function
Copy part or all of the target file to a different destination file, or convert the destination file into a format.
Description
The Objcopy tool uses the BFD library to read and write to the target file, which copies the contents of one target file into another target file. Objcopy uses its options to control its different actions, it can copy the target file sing woo the original file format. It is important to note that objcopy can copy a fully linked file between two formats, and copying a relocatable target file between the two formats may not work properly.
Objcopy creates temporary files when the conversion is done, and then deletes the temporary files. Objcopy uses BFD to do all of its conversion work; it accesses all the formats described in BFD, and you can identify most formats without specifying them.
Objcopy can be used to generate S-record files by specifying an output target of SREC (for example,-O Srec).
By specifying the input target to be a binary file (for example,-o binary), objcopy can generate a binary file in its original format. When objcopy generates a binary file in its original format, it generates a basic memory copy of the input target file, and all the labels and relocatable information are removed. The memory copy begins at the lowest segment of the load address and is copied to the output file.
When generating a S-record or original binary, you can use the-s as a useful option to remove some sections that contain debugging information. Sometimes-R can be used to remove some unnecessary sections of a binary file.
Second, the command format
objcopy [Options] ... input file [output file]
Options See
http://blog.chinaunix.net/uid-9525959-id-2001841.html
Http://www.cnblogs.com/openix/archive/2012/04/08/2437384.html
Iii. Examples of Use
http://blog.chinaunix.net/uid-9525959-id-2001841.html
Linux objcopy Commands