/* SPDX-License-Identifier: MIT */ #ifndef RGBDS_LINK_SYMBOL_HPP #define RGBDS_LINK_SYMBOL_HPP // GUIDELINE: external code MUST NOT BE AWARE of the data structure used! #include #include #include "either.hpp" #include "linkdefs.hpp" struct FileStackNode; struct Section; struct Label { int32_t sectionID; int32_t offset; // Extra info computed during linking Section *section; }; struct Symbol { // Info contained in the object files std::string name; ExportLevel type; char const *objFileName; FileStackNode const *src; int32_t lineNo; Either< int32_t, // Constants just have a numeric value Label // Label values refer to an offset within a specific section > data; Label &label() { return data.get