RISC OS Build EnvironmentROBE

Reference guide22Compilers, Linkers, and 64-bit Binary Tools

Introduction and Overview

This chapter groups the core compiler, linker, library, and binary-utility wrappers used when working directly with the toolchains. It keeps the common compile-and-link path together, while leaving Pascal, assembler, and module-generation material to their own dedicated reference chapters.

Technical Details

Compiler and linker wrappers

The main direct-build wrappers in this group are riscos-cc, riscos-c++, riscos-link, and riscos-libfile for the 32-bit Norcroft toolchain, plus the parallel 64-bit wrappers for C++, GCC-based C and Fortran compilation, object inspection, and post-link binary processing.

64-bit parallels

Where the image includes 64-bit support, the corresponding wrappers are riscos64-cc, riscos64-link, riscos64-c++, riscos64-gcc, riscos64-fortran, riscos64-gfortran, riscos64-libfile, riscos64-objdump, riscos64-objcopy, riscos64-mkreloc, and riscos64-addsignatures. Those tools are summarised in 64-bit Development.

Library and header search path variables

The image also sets a group of host environment variables that mirror the named RISC OS path variables a real RISC OS system would provide, such as C$Path, OSLib$Path, and TCPIPLibs$Path. They are provided for projects and direct toolchain invocations to use with RISC OS path-style arguments, such as -ITCPIPLibs: or -ITBox:, in the same way the equivalent variable would be used on RISC OS itself.

C is the one variable the environment's own default configuration relies on directly: it is the default -IC: include path, and most exported libraries are also reachable as C:LibName. through one of its entries, as reported by riscos-libsearch. Clearing it removes the toolchain's ability to find anything under C:, including C:o.stubsGS, which riscos-link needs for ordinary links. The other variables below are not required by the environment's own default build path, but are kept available, and pointing at the same directories, for projects that prefer to reference a library by its own RISC OS-style name.

System Variables

C
Search path for the core C library headers, objects, and most exported libraries

Resolved by -IC: for headers and by plain C:-prefixed filenames for objects and libraries, such as the C:o.stubsGS stub object linked into most command-line builds. This is the general-purpose path most exported libraries are reachable through, even ones that also have their own dedicated variable below.

HDR
The RISC OS-equivalent path for assembler header files

Mirrors Hdr$Path on RISC OS, the path used by ObjAsm's GET directive for shared assembler header files. Provided for direct ObjAsm invocations and project makefiles that want to use GET Hdr:Name by the familiar RISC OS name.

OSLIB
The RISC OS-equivalent path for the OSLib library

Mirrors OSLib$Path on RISC OS. Provided so that projects can reference OSLib headers and the OSLib object library with OSLib:-prefixed names, as they would on RISC OS itself.

RISC_OSLIB
The RISC OS-equivalent path for the original Acorn RISC OS library

Mirrors RISC_OSLib$Path on RISC OS. RISC_OSLib is the original Acorn application library, used by tools such as !Draw, !Paint, and !Edit; this variable lets a project reference it by that name rather than through C.

DESKLIB
The RISC OS-equivalent path for the DeskLib library

Mirrors the path variable DeskLib-based projects expect on RISC OS, letting a project reference DeskLib headers and objects by that name.

CPLUSPLUS
The RISC OS-equivalent path for the C++ headers

Generally refers to the CFront-style C++ headers used by the 32-bit Norcroft C++ translator; the name is also reserved for a possible future use referring to a full C++ standard header set. This is unrelated to the separate 64-bit C++ headers used by riscos64-c++.

TBOX
The RISC OS-equivalent path for the Toolbox client libraries

Mirrors TBox$Path on RISC OS, letting a project reference the Toolbox object and gadget client libraries by that name, such as -ITBox:.

TCPIPLIBS
The RISC OS-equivalent path for the TCP/IP client libraries

Mirrors TCPIPLibs$Path on RISC OS, letting a project reference the networking client libraries by that name, such as -ITCPIPLibs:. Generally only relevant to 32-bit builds.

Commands

riscos-cc
Compile C source for RISC OS
riscos-cc option source-file additional-source-or-object
-h
or -help
-Print compiler help.
-verify -Print the constructed compiler, assembler, and linker commands before they are executed.
-ansi -Select ANSI-style include and library handling.
-pcc -Enable PCC-style C compatibility mode for older UNIX C source.
-arthur
or -super
-Select the alternate library behaviour traditionally associated with Arthur compatibility.
-fussy
or -strict
-Request stricter standards conformance checking.
-pedantic -Accepted as an alias for -strict.
-list -Create a listing file.
-counts -Enable compiler count output and imply -list.
-via -Read additional command-line arguments from a via file.
-errors -Write diagnostics to the named file.
-littleend
or -li
-Generate little-endian code.
-bigend
or -be
-Generate big-endian code.
-apcs -Select the APCS variant and qualifiers, such as 3/32.
-depend -Write make-style dependency information to the named file.
-throwback -Enable desktop-tool throwback error reporting.
-desktop -Set the compiler work directory used for implicit outputs.
-C++ -Switch the compiler into the C++-translation path used by the Norcroft C++ front end.
-I -Add a directory to the #include search path.
-j -Replace the default include path with the supplied search path.
-E -Run only the preprocessor.
-C -Preserve comments in preprocessor output. Use this with -E.
-M -Write make-style dependencies instead of normal preprocessor output.
-MX -As -M, but suppress system include dependencies.
-MD -Write dependency output to a companion .d file while still compiling normally.
-D -Predefine a symbol, optionally with a value, before compilation starts.
-U -Undefine a predefined symbol before compilation starts.
-o -Name the output of the active stage: object file with -c, assembler file with -S, or linked image otherwise.
-g -Generate debugger-friendly code.
-gF -Request procedure-level debugger information.
-gL -Request line-number debugger information.
-gV -Request local-variable debugger information.
-G -Pass debugger-related control to the compiler and request the matching linker debug mode.
-asdname -Set the debugger library name.
-Ospace -Optimise for smaller output size.
-Otime -Optimise for faster execution.
-p -Generate profiling-enabled code.
-pG -Select extended profiling mode.
-pX -Select extended profiling mode.
-S -Write assembler output instead of object code.
-zM -Generate code suitable for building a relocatable RISC OS module.
-c -Compile only; do not invoke the linker.
-link -Request that the link stage is enabled.
-l -Replace the default library set with the supplied libraries.
-W -Disable all warnings or selected warning classes.
-WA -Suppress assignment-test warnings.
-WN -Suppress implicit-narrowing warnings.
-WP -Suppress preprocessor system-include warnings.
-WV -Suppress implicit-void warnings.
-WS -Suppress static-initialisation warnings.
-WB -Suppress bad-pragma warnings.
-WC -Suppress generic preprocessor warnings.
-WD -Suppress deprecated-interface warnings.
-WF -Suppress implicit-function-declaration warnings.
-e -Disable all errors or selected error classes.
-eC -Suppress implicit-cast errors.
-eM -Enable MPW-compatible relaxed behaviour, including counted strings and related compatibility relaxations.
-eP -Suppress junk-after-preprocessor-directive errors.
-eV -Suppress value-of-block errors.
-eZ -Suppress zero-length-array errors.
-zp -Emulate short-form compiler pragma directives.
-zr -Restrict LDM and STM sizes to help control interrupt latency.
-f -Enable selected compiler-defined feature flags.
-R -Request the compiler mode in which writable string-literal support is disabled.
-ZI -Supply both a system flavour name and a pre-include file to the underlying compiler.
-zB -Control target bit ordering in the underlying compiler.
-zC -Request signed-char treatment.
-zI -Pre-include a file before normal compilation begins.
-zJ -Enable indirect-setjmp handling.
-zO -Request one object area per function.
-zQ -Enable internal compiler debugging categories in builds that include them.
-zS -Set the compiler's internal system-flavour name.
-zU -Enable the compiler's PCC feature set.
-zZ -Select the alternate language-compatibility mode used internally for translated C++ handling.
-zT -Prefer time or space optimisation through the compiler's internal control form.
<source-file>-One or more C source files to preprocess, compile, or compile and link, usually from a c directory.
<additional-source-or-object>-Additional source files or existing object files supplied to the same build or link step.

riscos-cc is the Norcroft C driver in the build environment. It can preprocess, compile, optionally stop after writing assembler or object output, or continue through the link stage to build a final RISC OS image.

The new canonical command documentation broadens the stage-control description beyond the older Part 4 summary. Use -E for preprocessing only, -M or -MX for dependency-oriented preprocessing, -MD for sidecar dependency files during normal compilation, -S for assembler output, -c to suppress linking, and -link when a build script needs to force the link stage back on.

Language and compatibility control includes -ansi, -pcc, -fussy, -strict, -pedantic, and -C++. The canonical documentation also records the accepted APCS qualifier families in more detail, including qualifiers such as /reentrant, /nonreentrant, /fpe3, /fpe2, /swstackcheck, /26bit, /32bit, and /fpregargs with their abbreviated forms.

Diagnostics and build-system integration are also wider than the old short help suggested. -errors redirects diagnostics, -throwback emits desktop-tool throwback messages, -desktop sets the reporting directory prefix expected by desktop tools, and -depend writes make-style dependency information to an explicit file. The warning, error-suppression, pragma-emulation, and feature toggles listed above come directly from the new standalone compiler documentation so that the Part 4 entry remains self-sufficient.

For normal RISC OS work, -apcs 3/32 remains the common 32-bit APCS form, while -zM generates code suitable for relocatable modules. If more control over the final image is needed, compile with -c and then invoke riscos-link directly.

Unlike riscos-amu, which creates its object directories automatically, riscos-cc does not create the directory implied by a o.name-style output path. Create the o directory yourself before compiling directly, or the compiler aborts with Compilation aborted: couldn't write file 'o/main'.

riscos-cc -apcs 3/32 c/main -c Norcroft RISC OS ARM C vsn 5.18 (JRF:5.18.134) [Mar 5 2026]
riscos-c++
Translate, compile, and link C++ sources through the Norcroft CFront toolchain
riscos-c++ option file additional-file
<file>-Input file. Recognised file types are C++ source, C source, and object files. At least one input file must be supplied.
<additional-file>-Additional C++, C, or object inputs to process in the same invocation.
+v -Output each constructed command line before it is executed.
+w -Disable CFront warning messages.
+p -Request stricter standards-conformance checks from CFront.
+g -Generate debugger-friendly output. This adds -g to compilation and -d to linking.
+a1 -Generate ANSI-style translator output. This also enables ANSI-style #line directives unless +L is supplied separately.
+L -Generate ANSI-style #line directives in the translated C output.
+X opt -Pass one option directly to CFront.
+h, +H, -h, -H -Display the help text and exit.
-desktop <directory>-Use directory as the DDEUtils desktop prefix while processing each input file.
-apcs <specifiers>-Pass APCS settings to both the preprocessor and the C compiler.
-depend <file>-Pass dependency output control to the preprocessor as -Depend file.
-throwback -Enable Throwback reporting in the preprocessor, CFront, and the C compiler.
-fussy -Pass -fussy to the C compiler.
-Xcpp <opt>-Pass one option directly to the preprocessor.
-Xcc <opt>-Pass one option directly to the C compiler.
-Xlinker <opt>-Pass one option directly to the linker.
-C -Keep comments during preprocessing.
-D <symbol>-Define a preprocessor symbol.
-U <symbol>-Undefine a preprocessor symbol.
-I <directory>-Add a directory to the include search path.
-J <directory>-Replace the default include search path.
-E -Preprocess only. CFront, compilation, and linking are skipped.
-F -Run the preprocessor and CFront, then stop before invoking the C compiler or linker.
-Llibraries -Supply a comma-separated library list for the linker. The wrapper converts commas to spaces before invoking link.
-S
or -s
-Produce assembler output and suppress the link step.
-o <file>-Write compiler or linker output to file.
-c -Compile only; do not link.
-W -Pass warning-control options to both the preprocessor and the C compiler.
-e -Pass error-control options to both the preprocessor and the C compiler.
-M -Pass -M to the C compiler and suppress CFront processing.
-f <flags>-Enable compiler feature flags. Repeated uses are merged, sorted, and deduplicated before being passed on. The flag a is discarded by the wrapper.

riscos-c++ is the 32-bit Norcroft C++ wrapper. It drives the C preprocessor, the CFront translator, the C compiler, and the linker as needed so that C++ source can be translated, compiled, and linked with one command.

The command accepts a mixture of C++ source files, C source files, and object files. C++ inputs are normally preprocessed, translated to C by CFront, compiled by cc, and then linked. C source files are compiled directly, and object files are passed straight to the linker.

The wrapper recognises the filename extensions .c++, .cpp, .c, and .o. If an input file has no extension, it is treated as a C++ source file. Recognised source and object filenames are rewritten into RISC OS form before the toolchain is invoked.

Unless an explicit output filename is supplied with -o, compiled object files are written to o.leaf, assembler output is written to s.leaf, and linked output defaults to the leafname of the first input file.

If no library list is supplied with -L, the linker uses the default C++ support libraries from C$LibRoot: o.c++lib and o.stubs.

The main stage controls are -E for preprocessing only, -F for preprocessing plus CFront translation only, -c to compile without linking, and -S or -s to stop after assembler output. When both C and C++ sources are present, each file is processed according to its recognised type and the resulting object files are linked together unless linking has been suppressed.

Use repeated -Xcpp, -Xcc, -Xlinker, or +X options to pass tool-specific arguments through directly. The wrapper help recommends repeating these options rather than trying to quote multiple parameters into one string.

The CFront translator itself is not currently supplied in this image, so any stage that needs it fails with riscos-cfront: not found; only the preprocessor, C compiler, and linker stages are usable until CFront is provided.

riscos-c++ -o App c++.main c.support o.helper riscos-c++ -F c++.example riscos-c++ -Xcpp -DDEBUG -Xcc -zM -Xlinker -map c++.main
riscos-libfile
Create and maintain ALF library archives
riscos-libfile option library file-or-member-list
-c -Create a new library from the supplied files.
-i -Insert files into an existing library, replacing members of the same name.
-d -Delete the named members from the library.
-e -Extract the named members to files of the same name.
-o -Add or refresh the external symbol table in an object library.
-l -List library members. This may be combined with other operations.
-s -List the external symbol table. This may be combined with other operations.
-t -Use null timestamps when creating or updating the library.
-v -Read additional arguments from a via file.
-q -Treat the supplied directory as the effective current directory for relative extraction paths.
-h -Display help.
<library>-Library archive to create, inspect, or modify.
<file-or-member-list>-One or more files from disc for create or insert, or member names already in the library for delete or extract. Wildcards may be used.

riscos-libfile creates and maintains ALF library archives. It may be used for general-purpose file archives, but its most common use in the build environment is to create object libraries from AOF files for later use with riscos-link.

When building object libraries for later linking, use -o so the external symbol table is present and up to date. If -o is omitted during insert or delete operations, the symbol table is removed to avoid leaving stale symbol information behind. Conversely, when extracting files you would usually leave -o off, because rebuilding the symbol table during extraction is rarely useful.

Directories named in the file list are archived recursively. That is convenient for backups and source-tree packaging, but it also means that broad wildcards or directory arguments can include much more content than expected. For distribution libraries, prefer relative pathnames rather than absolute ones so extraction is not tied to one user's disc layout.

Extraction behaviour depends on the stored names. Absolute pathnames are restored to their absolute locations. Relative pathnames are restored relative to the effective current directory, or relative to the directory named by -q if that option is used. Do not mix absolute and relative pathnames in one library unless you are certain that the extraction behaviour will be acceptable.

The -t option is mainly useful for convergence testing and reproducible output, because it stores null timestamps rather than build-time timestamps. The upstream documentation also notes that library creation is performed in memory, so very large create or update operations may be limited by available RAM.

riscos-libfile -c -o mylib o/*
riscos64-cc
Compile or link 64-bit C source for RISC OS
riscos64-cc option sourcefile-or-object additional-input
-l -Add one library to the final link. A library written as a RISC OS path-style filename is passed through as a file rather than resolved as lib....
-c -Compile only; do not link.
-o -Write the output file explicitly. For linked RISC OS binaries, the usual host suffix is ,ff8.
-E -Run only the preprocessor.
-help -Print wrapper help.
--help-gcc -Print help for the underlying GNU GCC arguments.
<sourcefile-or-object>-C source file, assembler source file, or an existing object file.
<additional-input>-Additional source files, object files, or libraries supplied to the same build.

riscos64-cc is the normal configured 64-bit C compiler wrapper for this environment. It wraps aarch64-unknown-linux-gnu-gcc, runs through riscos64-transformcli by default, and adds the target macros, include paths, code-generation defaults, and final RISC OS link stage expected by the 64-bit tool family.

The wrapper defines __riscos and __riscos64, undefines the usual Linux and Unix target macros, adds the current directory plus the ${RO64EXPORT} include trees, selects -nostdlib, -march=armv8-a, -mno-outline-atomics, defaults to -fPIC unless the caller already chose a PIC mode, and adds -fpatchable-function-entry=8,8 so later link processing can patch in RISC OS-style function signatures.

If source files are supplied and neither -c nor -E is used, the wrapper first compiles to object code and then invokes riscos64-link. A one-file build defaults to <leafname>,ff8; a multi-file compile-and-link run defaults to !RunImage,ff8.

If you invoke the wrapper only with existing object files, it behaves as a thin front end to riscos64-link. In that mode you should usually supply -o explicitly, because there is no source leafname from which to derive the output name.

riscos64-cc main.c riscos64-cc -c -o main.o main.c
riscos64-c++
Compile or link 64-bit RISC OS C++ programs through the AArch64 wrapper
riscos64-c++ option -c -E -o output-file -l library -help -help-g++ input
-c -Compile only; stop after producing object code.
-E -Run only the preprocessor.
-o -Name the output file for the current stage. When linking, use a RISC OS filetype suffix such as ,ff8 if you want to control the final filetype explicitly.
-l -Add a library to the link step. RISC OS path-style libraries such as C:c++64.o.libc++-64 are passed through as filenames rather than lib... names.
-help -Display the wrapper help.
--help-g++ -Display the upstream GNU C++ compiler help.
<input>-One or more C++ source files or existing object files.

riscos64-c++ wraps aarch64-unknown-linux-gnu-g++ with the defaults used by the 64-bit RISC OS environment. It accepts the usual RISC OS-style source naming used by the local wrappers, can preprocess, compile, or compile-and-link, and uses riscos64-transformcli by default so that source-tree naming and RISC OS path conventions are handled consistently.

The wrapper defines __riscos and __riscos64, undefines the usual Linux and Unix target macros, adds the 64-bit export include paths, selects -nostdlib, -nostdinc++, -march=armv8-a, and -mno-outline-atomics, and defaults to -fPIC unless you override it explicitly. It also adds -fpatchable-function-entry=8,8 so that generated entry points match the expected RISC OS call conventions more closely.

64-bit C++ support is intentionally limited. The wrapper always disables exceptions and RTTI with -fno-exceptions and -fno-rtti, and templates and module builds should still be treated as specialised workflows. The normal project layout therefore keeps implementation files in cc/ and headers in h/, with a conservative C++ style that interoperates cleanly with C APIs.

When source files are supplied and neither -c nor -E is used, the wrapper compiles to object code and then invokes riscos64-link to produce a RISC OS binary. A one-file build defaults to an output named after the source leaf with filetype ,ff8; multi-file compile-and-link defaults to !RunImage,ff8.

When invoked only with existing object files, riscos64-c++ becomes a thin front end to riscos64-link. In that object-only mode it does not add the C++ support libraries automatically, so manual link commands may still need to supply -lsupc++ and the C++ runtime library file explicitly. In makefile-driven builds, use ${C++LIB} rather than spelling out that library path by hand.

riscos64-c++ -c -o o.hello cc.hello riscos64-link o.hello -lsupc++ C:c++64.o.libc++-64 -o hello,ff8
riscos64-gcc
Invoke the underlying 64-bit GCC compiler with only the RISC OS target macros added
riscos64-gcc option file
-help -Print the wrapper help summary.
--help-gcc -Print help for the underlying GNU GCC options.
<file>-Optional source, object, or other GCC input passed through unchanged.

riscos64-gcc is the thinnest 64-bit C compiler wrapper. It calls aarch64-unknown-linux-gnu-gcc, undefines the usual Linux and Unix target macros, and defines __riscos and __riscos64.

Unlike riscos64-cc, it does not add the 64-bit export include paths, does not select a RISC OS-oriented output naming convention, does not default to PIC, and does not switch the final link stage over to riscos64-link. Use it when you want direct GCC behaviour with only the target-identification macros normalised.

riscos64-gcc --help-gcc
riscos64-fortran
Compile or link 64-bit Fortran source for RISC OS
riscos64-fortran option sourcefile-or-object objectfile
-l -Add one library to the linked output.
-c -Compile only; do not link.
-o -Write the output file explicitly. For linked RISC OS binaries, the usual host suffix is ,ff8.
-E -Run the preprocessor only.
-help -Print wrapper help.
--help-gfortran -Print help for the underlying GFortran arguments.
<sourcefile-or-object>-Fortran source file, usually addressed as f90.name, or an existing object file when using the wrapper as a link front-end.
<objectfile>-Optional positional output object file in the compile-only form.

riscos64-fortran is the configured 64-bit Fortran wrapper for this environment. It wraps aarch64-unknown-linux-gnu-gfortran, accepts the local RISC OS-style source layout, and when linking from source it passes the final stage to riscos64-link so that the result is a normal RISC OS binary.

The wrapper adds the target macros __riscos and __riscos64, removes the usual Linux and Unix target macros, selects -march=armv8-a -mno-outline-atomics, adds -fPIC unless the caller already chose a PIC mode, adds -fpatchable-function-entry=8,8, and includes both the current directory and ${RO64EXPORT}/Fortran.

Fortran source files normally live in f90/ without a host .f90 suffix, so a compile such as riscos64-fortran -c -o o.hello f90.hello maps naturally to host file f90/hello. Compile modules before the files that use them so that the compiler-generated .mod interface files are available.

If source files are linked directly and neither -c nor -E is used, the wrapper adds -lgfortran automatically for the final link. A single source file defaults to <name>,ff8; multiple inputs default to !RunImage,ff8. If you invoke the wrapper only with existing object files, it behaves as a front-end to riscos64-link and does not add the Fortran runtime automatically, so supply -lgfortran yourself when any Fortran object is present.

For C and Fortran interworking, use iso_c_binding, bind(C, name="..."), and the Fortran value attribute for scalar C arguments passed by value.

Linking a Fortran program directly prints a few Failed to patch symbol name '...' at &offset warnings from riscos64-addsignatures. These come from prebuilt libgfortran runtime functions that were not compiled with the wrapper's patchable-entry padding; they are harmless and the link still succeeds.

riscos64-fortran -c -o o.hello f90.hello riscos64-fortran f90.hello -o hello,ff8 Warning: Failed to patch symbol name '_gfortran_transfer_character_wide_write' at &d958
riscos64-gfortran
Invoke the underlying 64-bit GFortran compiler with minimal wrapper defaults
riscos64-gfortran option file
-help -Print wrapper help.
--help-gfortran -Print help for the underlying GFortran arguments.
<file>-Optional source, object, or other file argument passed through to GFortran unchanged.

riscos64-gfortran is the thin wrapper around aarch64-unknown-linux-gnu-gfortran. It is intended for cases where you want raw GFortran behaviour but still want the RISC OS target macros defined consistently.

Unlike riscos64-fortran, it does not add the Fortran include path, does not apply the wrapper-level PIC and output naming defaults, and does not switch the final link stage over to riscos64-link. Its additions are limited to defining __riscos and __riscos64 and undefining the usual Linux and Unix target macros.

Use this command for direct compiler experiments or when you deliberately want ordinary GFortran option handling. For normal RISC OS 64-bit builds from the local f90/ source layout, the higher-level riscos64-fortran wrapper is usually the better fit.

riscos64-gfortran --help-gfortran
riscos64-libfile
Manipulate 64-bit object libraries through a libfile-style wrapper
riscos64-libfile option library file-or-member-list
-c -Create a new library containing the supplied files.
-i -Insert files into an existing library, replacing members of the same name.
-d -Delete the named members from the library.
-e -Extract the named members to files of the same name.
-o -Add an external symbol index to the archive.
-l -List archive members. This may be combined with other operations.
-s -List the archive's global defined symbols. This may be combined with other operations.
-v -The built-in help still advertises a via-file form, but the current wrapper source does not implement it.
<library>-Archive file to create, inspect, or modify.
<file-or-member-list>-Files to add or member names to delete or extract.

riscos64-libfile provides a familiar libfile-style interface for 64-bit object libraries, but internally it uses GNU ar for archive operations and GNU nm for symbol listing.

The wrapper normally runs through riscos64-transformcli, so RISC OS-style file and path naming can still be used. Operation names broadly match the 32-bit riscos-libfile command, but the file format is an ordinary GNU archive of 64-bit ELF objects rather than an ALF library.

If you modify a library and are not extracting members, the wrapper normally adds an archive symbol index automatically unless you were only listing content. Use -l for a member listing and -s for a global-symbol listing.

The documented -v file syntax is not implemented by the current wrapper source, so do not rely on via-file input here.

riscos64-libfile -c mylib.a o64/main.o o64/util.o
riscos64-objdump
Run the 64-bit GNU objdump tool on ELF objects, archives, and linked images
riscos64-objdump objdump-option file additional-file
<objdump-option>-Any GNU objdump option. The wrapper adds no tool-specific options of its own.
<file>-ELF object, archive, or linked image to inspect.
<additional-file>-Additional files to inspect.

riscos64-objdump is the direct wrapper for aarch64-unknown-linux-gnu-objdump. It exists so that users can inspect 64-bit target objects without remembering the full cross-tool name.

The wrapper adds no RISC OS policy of its own; all options are passed straight through to GNU objdump. In this environment it is especially useful for --syms, --reloc, and disassembly output when debugging 64-bit links or feeding symbol listings to the helper tools used by riscos64-link.

riscos64-objdump --reloc --syms --wide test.elf
riscos64-objcopy
Run the 64-bit GNU objcopy tool on ELF objects and linked images
riscos64-objcopy objcopy-option input-file output-file
<objcopy-option>-Any GNU objcopy option. The wrapper adds no tool-specific options of its own.
<input-file>-Input ELF object, archive member, or linked image.
<output-file>-Optional output file.

riscos64-objcopy is the direct wrapper for aarch64-unknown-linux-gnu-objcopy. It is supplied for convenience when working with 64-bit target objects from the build environment.

The wrapper adds no extra policy; all options are passed through unchanged. In the normal 64-bit link pipeline, the same underlying tool is used by riscos64-link to extract the loadable sections from the final ELF and write the flat RISC OS binary.

riscos64-objcopy -O binary test.elf test,ff8
riscos64-mkreloc
Generate the relocation helper and relocation table used by 64-bit RISC OS binaries
riscos64-mkreloc relocation-and-symbol-listing -s -o output
-s -Write GNU assembler source for the generated relocation helper and table.
-o -Write an assembled ELF object containing the generated relocation helper and table. This is the default if neither output switch is supplied.
<relocation-and-symbol-listing>-Combined relocation and symbol listing, normally produced by riscos64-objdump --reloc --syms --wide intermediate.elf.
<output>-Destination assembler file or object file, according to the selected output mode.

riscos64-mkreloc is a specialist helper for the 64-bit link pipeline. It reads a combined objdump listing, finds the relocations that must survive into the final flat RISC OS binary, and emits the relocation data and helper code needed to apply those relocations at run time.

The tool is normally invoked automatically by riscos64-link after an initial partial ELF link. That wrapper runs riscos64-objdump --reloc --syms --wide over the intermediate ELF, then passes the resulting text file to this command in object-output mode.

The generated object defines __RelocData in a dedicated .riscos.reloc section and, unless the linked objects already provide one, a default __RelocCode routine. The relocation table records the source and target regions as code, read-only data, or read-write data so that the binary can repair embedded addresses when loaded somewhere other than its link-time base.

The tool expects ordinary AArch64 absolute relocations described by the objdump output, and classifies sections by their conventional names such as .text, .rodata*, .data.rel.ro*, .data*, and .bss*. Use it as part of the wrapper-controlled 64-bit build flow rather than as a general relocation extractor.

For diagnostics, set ROBUILD_MKRELOC_DEBUG to a non-zero value before running the command. That enables verbose reporting about the relocations and symbols being processed.

riscos64-objdump --reloc --syms --wide test.elf > test.syms riscos64-mkreloc test.syms -o test.reloc.o
riscos64-addsignatures
Patch RISC OS-style function signatures into a finished 64-bit binary
riscos64-addsignatures map-or-symbol-listing binary
<map-or-symbol-listing>-Either a linker map written by ld --Map or a symbol table listing written by riscos64-objdump --syms --wide.
<binary>-Finished flat binary to patch in place.

riscos64-addsignatures is the final metadata-patching step used by the 64-bit link wrappers. It scans a finished binary for the reserved padding placed immediately before function entry points and replaces that padding with RISC OS-style function signatures containing the function names.

In the normal build flow, riscos64-link invokes this command automatically after producing the final flat binary from the linked ELF. Most users therefore never need to run it manually unless they are debugging a custom link pipeline or repairing a binary that was linked outside the wrapper.

The first argument may be either a linker map or an objdump symbol-table listing. A linker map is sufficient for normal external function names, but an objdump --syms listing is more complete because it can also include local and static function symbols from the .text section.

Only function symbols in code are considered, and only when the binary still contains the expected NOP padding before the function entry. In wrapper-driven builds that padding is normally created by the compiler wrappers with -fpatchable-function-entry=8,8. Hand-written assembler routines or objects built without those defaults are usually skipped rather than causing a failure.

If a function name is longer than the available reserved space, the tool truncates it to fit instead of aborting the build. The binary named in the second argument is rewritten in place.

riscos64-objdump --syms --wide test.elf > test.syms riscos64-addsignatures test.syms test,ff8