git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

commit 2ae012c9a4feba943e2cad5601612574100d5fe2
parent 17791a30c6aa9262de5f4ab2ed867e6f7e497076
Author: bbbbbr <bbbbbr@users.noreply.github.com>
Date:   Thu, 22 Sep 2022 16:42:40 -0700

Merge pull request #418 from bbbbbr/docs_4_1_0

Docs: linkerfiles with autobanking
Diffstat:
Mdocs/pages/06_toolchain.md18++++++++++++++++++
1 file changed, 18 insertions(+), 0 deletions(-)

diff --git a/docs/pages/06_toolchain.md b/docs/pages/06_toolchain.md @@ -105,6 +105,24 @@ You may also want to read a tutorial on Makefiles. For example: https://makefiletutorial.com/ https://www.tutorialspoint.com/makefile/index.htm +@anchor linkerfiles_and_autobanking +## Linker Files and ROM Auto Banking + +When @ref bankpack is called through @ref lcc it will now always use linkerfile output (`-lkout=`) for passing files to the linker (all input object files and linkerfiles will get get consolidated to a single linkerfile). + +Bankpack: +- `lkin=<filename>` : Adds a input linkerfile (can specify multiple ones) +- `-lkout=<filename>` : Enables linkerfile output and sets name (only one can be specified). ALL loaded object files, both from the command line and any loaded from linkerfiles will have their names written to this single output. + +LCC + Bankpack: +- `lcc` passes all input linkerfiles (from `-Wl-f<name>`) to bankpack (`-lkin=`) +- Linkerfile output is always used when lcc calls `bankpack` (`-lkout=`) +- A temporary file name is used for bankpack linkerfile output. +- `lcc` clears out the linker object file and linkerfile lists, then uses the single linkerfile generated by `bankpack` + +Also see the `linkerfile` example project. + + @anchor build_tools # Build Tools

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.