tool-z80nm

Lists symbols in z80asm object and library files to verify linked routines.

1.1k|206|Updated Mar 16, 2016
One-click install
npx skills add https://github.com/z88dk/z88dk --skill tool-z80nm-z88dk
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tool-z80nm
Source: https://github.com/z88dk/z88dk/tree/main/.agents/skills/tool-z80nm
Command: npx skills add https://github.com/z88dk/z88dk --skill tool-z80nm-z88dk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? After rebuilding a z88dk library or applying a patch, developers often cannot tell whether a routine actually made it into the .lib or .o file they linked. This Skill provides the z88dk-z80nm commands and a link-proof methodology to confirm symbol presence. ## Core Features & Use Cases - Symbol Listing: Run z88dk-z80nm on .o and .lib files to dump symbols, with flags like -a (all), -l (local symbols), -e (expression patches), and -c (code dump). - Link Verification Methodology: Cross-check nm output against the program map generated by zcc -m to determine whether a symbol is linked, present but unused, or missing entirely. - Use Case: After rebuilding math32_8085.lib, run z88dk-z80nm piped through rg to confirm f32_fsadd exists in the library, then grep the app .map file to prove it was pulled into the binary. ## Quick Start Ask the assistant to verify that a specific symbol is present in a z88dk library file and in the linked program map after a rebuild.

Frequently Asked Questions about tool-z80nm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I list symbols in a z88dk library file?▼

Run z88dk-z80nm followed by the library path, such as z88dk-z80nm lib/clibs/math32_8085.lib. Pipe the output through rg or grep to filter for specific symbols like fsdiv or fsadd.

How to verify a symbol was linked into my z88dk binary?▼

First confirm the symbol exists in the .lib using z88dk-z80nm, then compile with zcc -m to generate a map file and search it for the symbol. A symbol in both the library and the map is linked; one only in the library was not pulled in.

What flags does z88dk-z80nm support?▼

z88dk-z80nm supports -a to show all symbols, -l for local symbols, -e for expression patches, and -c for a code dump. There is no useful -h help flag; pass a library or object file directly.

Why is my rebuilt z88dk library symbol not in the binary?▼

If the symbol appears in the .lib but not the .map file, it was not pulled into the binary due to no call site, weak linkage, or a wrong library path. If it is in neither, the rebuild did not install what you expected or the symbol name is wrong.

How do I distinguish symbols between multi-CPU z88dk libraries?▼

Check the CPU and section sizes shown in the nm listing when similar libraries sit side by side, such as math32.lib versus math32_8085.lib. This confirms you linked the variant intended for your target CPU.