Linux objcopy Commands

Source: Internet
Author: User
Tags srec

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.