From 0654ded863f88d4f0e1298cf73e154d2ef9adfb7 Mon Sep 17 00:00:00 2001 From: u0_a390 <84712110+pranav10780@users.noreply.github.com> Date: Fri, 10 May 2024 22:00:28 +0530 Subject: [PATCH] objcopy: add page (#12765) * objcopy: add page --------- Co-authored-by: K.B.Dharun Krishna --- pages/linux/objcopy.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/linux/objcopy.md diff --git a/pages/linux/objcopy.md b/pages/linux/objcopy.md new file mode 100644 index 000000000..0fa6b238e --- /dev/null +++ b/pages/linux/objcopy.md @@ -0,0 +1,24 @@ +# objcopy + +> Copy the contents of an object file to another file. +> More information: . + +- 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}}`