OBJCOPY(1)

✨ OBJCOPY(1) β€” the sdobjcopy glow-up ✨

okay bestie, gather round 🫢 this is OBJCOPY(1) from the General Commands Manual, section 1, and yes it's giving very much "SDCC side quest" energy.


πŸ’– NAME πŸ’–

sdobjcopy β€” copy and translate object files. A part of SDCC.

like, it takes your object files and it copies them, and it translates them, and honestly? iconic. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

sdobjcopy [option(s)] in-file [out-file]

🌸 DESCRIPTION 🌸

Copies a binary file, possibly transforming it in the process ✨ (and yes, we're doing the transformation mid-copy, main character energy fr fr).

The options are:

  • -I, --input-target <bfdname> β€” Assume input file is in format <bfdname>.
  • -O, --output-target <bfdname> β€” Create an output file in format <bfdname>.
  • -B, --binary-architecture <arch> β€” Set output arch, when input is arch-less.
  • -F, --target <bfdname> β€” Set both input and output format to <bfdname>. two birds, one slay πŸ’…
  • --debugging β€” Convert debugging information, if possible.
  • -p, --preserve-dates β€” Copy modified/access timestamps to the output.
  • -D, --enable-deterministic-archives β€” Produce deterministic output when stripping archives.
  • -U, --disable-deterministic-archives β€” Disable -D behavior (this is the default, bestie).
  • -j, --only-section <name> β€” Only copy section <name> into the output.
  • --add-gnu-debuglink=<file> β€” Add section .gnu_debuglink linking to <file>.
  • -R, --remove-section <name> β€” Remove section <name> from the output.
  • -S, --strip-all β€” Remove all symbol and relocation information.
  • -g, --strip-debug β€” Remove all debugging symbols & sections.
  • --strip-dwo β€” Remove all DWO sections.
  • --strip-unneeded β€” Remove all symbols not needed by relocations.
  • -N, --strip-symbol <name> β€” Do not copy symbol <name>.
  • --strip-unneeded-symbol <name> β€” Do not copy symbol <name> unless needed by relocations.
  • --only-keep-debug β€” Strip everything but the debug information.
  • --extract-dwo β€” Copy only DWO sections.
  • --extract-symbol β€” Remove section contents but keep symbols.
  • -K, --keep-symbol <name> β€” Do not strip symbol <name>.
  • --keep-file-symbols β€” Do not strip file symbol(s).
  • --localize-hidden β€” Turn all ELF hidden symbols into locals.
  • -L, --localize-symbol <name> β€” Force symbol <name> to be marked as a local.
  • --globalize-symbol <name> β€” Force symbol <name> to be marked as a global.
  • -G, --keep-global-symbol <name> β€” Localize all symbols except <name>.
  • -W, --weaken-symbol <name> β€” Force symbol <name> to be marked as a weak.
  • --weaken β€” Force all global symbols to be marked as weak.
  • -w, --wildcard β€” Permit wildcard in symbol comparison.
  • -x, --discard-all β€” Remove all non-global symbols.
  • -X, --discard-locals β€” Remove any compiler-generated symbols.
  • -i, --interleave [<number>] β€” Only copy N out of every <number> bytes.
  • --interleave-width <number> β€” Set N for --interleave.
  • -b, --byte <num> β€” Select byte <num> in every interleaved block.
  • --gap-fill <val> β€” Fill gaps between sections with <val>.
  • --pad-to <addr> β€” Pad the last section up to address <addr>.
  • --set-start <addr> β€” Set the start address to <addr>.
  • {--change-start|--adjust-start} <incr> β€” Add <incr> to the start address.
  • {--change-addresses|--adjust-vma} <incr> β€” Add <incr> to LMA, VMA and start addresses.
  • {--change-section-address|--adjust-section-vma} <name>{=|+|-}<val> β€” Change LMA and VMA of section <name> by <val>.
  • --change-section-lma <name>{=|+|-}<val> β€” Change the LMA of section <name> by <val>.
  • --change-section-vma <name>{=|+|-}<val> β€” Change the VMA of section <name> by <val>.
  • {--[no-]change-warnings|--[no-]adjust-warnings} β€” Warn if a named section does not exist.
  • --set-section-flags <name>=<flags> β€” Set section <name>'s properties to <flags>.
  • --add-section <name>=<file> β€” Add section <name> found in <file> to output.
  • --rename-section <old>=<new>[,<flags>] β€” Rename section <old> to <new>.
  • --long-section-names {enable|disable|keep} β€” Handle long section names in Coff objects.
  • --change-leading-char β€” Force output format's leading character style.
  • --remove-leading-char β€” Remove leading character from global symbols.
  • --reverse-bytes=<num> β€” Reverse <num> bytes at a time, in output sections with content.
  • --redefine-sym <old>=<new> β€” Redefine symbol name <old> to <new>.
  • --redefine-syms <file> β€” --redefine-sym for all symbol pairs listed in <file>.
  • --srec-len <number> β€” Restrict the length of generated Srecords.
  • --srec-forceS3 β€” Restrict the type of generated Srecords to S3.
  • --strip-symbols <file> β€” -N for all symbols listed in <file>.
  • --strip-unneeded-symbols <file> β€” --strip-unneeded-symbol for all symbols listed in <file>.
  • --keep-symbols <file> β€” -K for all symbols listed in <file>.
  • --localize-symbols <file> β€” -L for all symbols listed in <file>.
  • --globalize-symbols <file> β€” --globalize-symbol for all in <file>.
  • --keep-global-symbols <file> β€” -G for all symbols listed in <file>.
  • --weaken-symbols <file> β€” -W for all symbols listed in <file>.
  • --alt-machine-code <index> β€” Use the target's <index>'th alternative machine.
  • --writable-text β€” Mark the output text as writable.
  • --readonly-text β€” Make the output text write protected.
  • --pure β€” Mark the output file as demand paged.
  • --impure β€” Mark the output file as impure.
  • --prefix-symbols <prefix> β€” Add <prefix> to start of every symbol name.
  • --prefix-sections <prefix> β€” Add <prefix> to start of every section name.
  • --prefix-alloc-sections <prefix> β€” Add <prefix> to start of every allocatable section name.
  • --file-alignment <num> β€” Set PE file alignment to <num>.
  • --heap <reserve>[,<commit>] β€” Set PE reserve/commit heap to <reserve>/ <commit>.
  • --image-base <address> β€” Set PE image base to <address>.
  • --section-alignment <num> β€” Set PE section alignment to <num>.
  • --stack <reserve>[,<commit>] β€” Set PE reserve/commit stack to <reserve>/ <commit>.
  • --subsystem <name>[:<version>] β€” Set PE subsystem to <name> [& <version>].
  • --compress-debug-sections β€” Compress DWARF debug sections using zlib.
  • --decompress-debug-sections β€” Decompress DWARF debug sections using zlib.
  • -v, --verbose β€” List all object files modified.
  • @<file> β€” Read options from <file>.
  • -V, --version β€” Display this program's version number.
  • -h, --help β€” Display this output.
  • --info β€” List object formats & architectures supported.

and look at this lil receipt, it's literally the program telling you what it can do:

/usr/bin/sdobjcopy: supported targets: asxxxx srec symbolsrec binary ihex

πŸŽ€ REPORTING BUGS πŸŽ€

Found a bug? first of all, no cap, sorry bestie 😭 Report bugs to:

<http://sourceforge.net/tracker/?group_id=599@report_bugs_to@atid=100599>

Copyright 2012 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) any later version. This program has absolutely no warranty.

⚠️ okay so "absolutely no warranty" is not a vibe, it's a fact β€” no warranty, periodt. don't come for them.

🌈 SEE ALSO 🌈

The full documentation for objcopy is maintained as a Texinfo manual. If the info and objcopy programs are properly installed at your site, the command

info objcopy

should give you access to the complete manual. ✨ go read it, iykyk.


and that's the whole page, bestie β€” this is the OBJCOPY(1) page from the General Commands Manual (section 1), part of SDCC, Β© 2012 Free Software Foundation, Inc. πŸ¦‹πŸ’… stay iconic, stay stripped, bye!! 🫢