File: patch.hpp

package info (click to toggle)
rgbds 1.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 20,164 kB
  • sloc: cpp: 19,048; asm: 6,208; yacc: 2,405; sh: 1,784; makefile: 213; ansic: 14
file content (29 lines) | stat: -rw-r--r-- 594 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// SPDX-License-Identifier: MIT

#ifndef RGBDS_LINK_PATCH_HPP
#define RGBDS_LINK_PATCH_HPP

#include <string>
#include <vector>

#include "link/section.hpp"

struct Symbol;

struct Assertion {
	Patch patch; // Also used for its `.type`
	std::string message;
	// This would be redundant with `patch.pcSection->fileSymbols`, but `section` is sometimes
	// `nullptr`!
	std::vector<Symbol> *fileSymbols;
};

Assertion &patch_AddAssertion();

// Checks all assertions
void patch_CheckAssertions();

// Applies all SECTIONs' patches to them
void patch_ApplyPatches();

#endif // RGBDS_LINK_PATCH_HPP