ASLINK(1)

okay bestie, welcome to ASLINK(1) β€” that's section 1 of the General Commands Manual, and she is THE companion linker page you've been waiting for. buckle up, we're linking. πŸ¦‹


✨ NAME ✨

SDLD β€” the companion linker for the ASxxxx assemblers. that's the whole name section, she's short and she knows it. πŸ’…


🌸 SYNOPSIS 🌸

here's the vibe, literally copy-paste coded:

sdld [-Options] [-Option with arg] file
sdld [-Options] [-Option with arg] outfile file1 [file2 ...]
sdldgb [-Options] [-Option with arg] file
sdldgb [-Options] [-Option with arg] outfile file1 [file2 ...]
sdldz80 [-Options] [-Option with arg] file
sdldz80 [-Options] [-Option with arg] outfile file1 [file2 ...]
sdld6808 [-Options] [-Option with arg] file
sdld6808 [-Options] [-Option with arg] outfile file1 [file2 ...]

notice how every single one of them can either spit the output somewhere default or take an outfile first and then a whole lil squad of file1 [file2 ...] besties. group project energy. 🫢


⚠️ WARNING ⚠️

no cap, this one matters. the info on this man page is an extract from the full documentation of SDCC, and it is limited to the meaning of the options. that's it. that's the whole scope. πŸ™ˆ

for the complete and current documentation, go read the ASxxxx Cross Assembler Documentation, which lives at /usr/share/doc/sdcc-doc/aslink. she's right there. go say hi. πŸ’œ


πŸŽ€ DESCRIPTION πŸŽ€

ASLINK is the general relocating companion linker for the ASxxx assemblers. relocating. companion. linker. the whole trio. ✨

here's who's supporting who:

  • MCS51 family is supported by sdld.
  • Z80 family is supported by sdldz80.
  • GBZ80 (that's the GameBoy Z80-like CPU, iykyk) is supported by sdldgb.
  • Motorola 6808 family is supported by sdld6808.

every CPU gets their own little linker bestie. main character energy for all of them, no favorites. πŸ‘‘


πŸ’… OPTIONS πŸ’…

okay so the linker can run in command line mode or command file modes. the allowed startup linker commands are:

  • -c/-f β€” command line / command file modes. pick your lane.
  • -p/-n β€” enable/disable echo of file.lnk input to stdout. yes she will read your receipts out loud if you let her.

if command line mode is selected, all linker commands come from stdin. if the command file mode is selected, the commands are input from the specified file β€” and heads up, the extension must be .lnk. no negotiation. πŸ“

after invoking the linker, the valid options are:

πŸ“š Libraries

  • -k library directory path (one definition per line) β€” this specifies one possible path to an object library. more than one path is allowed. stack 'em up.
  • -l library file specification (one definition per line) β€” this specifies a possible library file. more than one file is allowed. same deal, the more the merrier.

🧭 Relocation

  • -b area base address = expression (one definition per line) β€” this specifies an area base address, where the expression may contain constants and/or defined symbols from the linked files.
  • -g global symbol = expression (one definition per line) β€” this specifies the value for the symbol, where the expression may contain constants and/or defined symbols from the linked files.

πŸ—ΊοΈ Map format:

  • -m β€” Generate a map file (file.map). This file contains a list of the symbols (by area) with absolute addresses, sizes of linked areas, and other linking information. it's giving receipts, but make it cartography.
  • -w β€” Specifies that a wide listing format be used for the map file.
  • -x β€” Hexadecimal (default). the default, the moment, the standard. ⭐
  • -d β€” Decimal.
  • -q β€” Octal.

πŸ–¨οΈ Output:

  • -i β€” Intel Hex (file.ihx) image output file.
  • -s β€” Motorola S19 (file.s19) image output file.
  • -j β€” Produce NoICE debug as file (file.noi).
  • -z β€” Produce SDCdb debug as file (file.cdb).

πŸ“‹ Lists:

  • -u β€” Generate an updated listing file (file.rst) derived from the relocated addresses and data from the linker.

🧚 Miscellaneous:

  • -a β€” [iram-size] Check for internal RAM overflow.
  • -v β€” [xram-size] Check for external RAM overflow.
  • -w β€” [code-size] Check for code overflow.
  • -y β€” Generate memory usage summary file (file.mem).
  • -Y β€” Pack internal ram.
  • -A β€” [stack-size] Allocate space for stack.
bestie yes, -w shows up twice in this page β€” once in the Map format section for wide listing format, once here for the code-size overflow check. that's not me being sloppy, that's literally what the page says. keep both in your head. πŸ’€

πŸ›‘ End:

  • -e β€” or a null line, terminates input to the linker. that's the goodbye. wave back. πŸ‘‹
  • fileN β€” Files to be linked. Files may be on the same line as the above options, or on a separate line(s), one file per line, or multiple files separated by spaces or tabs. she's flexible like that. 🌈

πŸ”— SEE ALSO πŸ”—

sdcc(1), asxxxx(1), sdldz80(1), sdldgb(1), sdld6808(1).

go read those too, they're the friend group. 🫢


✍️ AUTHOR ✍️

This manual page was written by Aurelien Jarno <aurel32@debian.org>, for the Debian GNU/Linux system (but may be used by others). absolute icon behavior, writing docs for everyone. πŸ’–


and that's the whole page, bestie! the original's footer line is just ASLINK(1) β€” no fancy version, no date, no source line, just the name chillin' at the bottom like a signature. so consider this your cute sign-off: ASLINK(1), section 1, General Commands Manual, that's a wrap πŸŽ€βœ¨