tldr-pages/tldr

Page request: objcopy

Closed this issue · 4 comments

Command description

The objcopy command is a utility that is part of the GNU Binutils suite. It is used to copy and translate object files.

Command details

No response

Documentation

No response

Platform

Linux

VCS repository link (e.g. GitHub, GitLab)

No response

Additional information

objcopy
Copy and translate object files. More information: https://manned.org/objcopy.

  • Copy one object file to another:
    objcopy {{infile}} {{outfile}}

  • Translate object files from one format to another:
    objcopy -I {{input_format}} -O {{output_format}} {{infile}} {{outfile}}

  • Strip all symbol information:
    objcopy -S {{infile}} {{outfile}}

  • Strip debugging information:
    objcopy -g {{infile}} {{outfile}}

  • Copy a specific section from the source object file to the destination object file:
    objcopy -j {{section}} {{infile}} {{outfile}}

  • Create a binary image for a bootloader:
    objcopy -O binary -j .text {{bootloader.elf}} {{bootloader.bin}}

Thank you for writing a tldr page for this command!

Please note that the purpose of page request issues are just to request someone (or yourself) to write a page and to provide information for doing so.

I would like to ask you to open a pull request for getting used with our workflow and, if you want, making more contributions in the future ;)

You can either use the web interface or the terminal for this, see our guide: https://github.com/tldr-pages/tldr/blob/main/contributing-guides%2Fgit-terminal.md

Hi @q2333gh!

Could you please submit a PR for this page? Pages are better done by their users; however, if you can't, no problem, I can do that for you.

Cheers!

Added in #12765.