Update cheatsheets

This commit is contained in:
ivuorinen
2024-05-11 00:13:50 +00:00
parent fd46502679
commit bf2106e027
4 changed files with 88 additions and 13 deletions

29
tldr/linux/objcopy Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# objcopy
> Copy the contents of an object file to another file.
> More information: <https://manned.org/objcopy>.
- Copy data to another file:
`objcopy {{path/to/source_file}} {{path/to/target_file}}`
- Translate object files from one format to another:
`objcopy --input-target={{input_format}} --output-target {{output_format}} {{path/to/source_file}} {{path/to/target_file}}`
- Strip all symbol information from the file:
`objcopy --strip-all {{path/to/source_file}} {{path/to/target_file}}`
- Strip debugging information from the file:
`objcopy --strip-debug {{path/to/source_file}} {{path/to/target_file}}`
- Copy a specific section from the source file to the destination file:
`objcopy --only-section {{section}} {{path/to/source_file}} {{path/to/target_file}}`