Fix incorrect PC in LOAD blocks at link time

This commit is contained in:
ISSOtm
2020-04-07 12:23:42 +02:00
parent 5b6c1569a4
commit 927c65e863
10 changed files with 112 additions and 86 deletions

View File

@@ -20,7 +20,6 @@
struct Assertion {
struct Patch patch;
// enum AssertionType type; The `patch`'s field is instead re-used
struct Section *section;
char *message;
/*
* This would be redundant with `.section->fileSymbols`... but

View File

@@ -19,6 +19,8 @@
#include "linkdefs.h"
struct Section;
struct AttachedSymbol {
struct Symbol *symbol;
struct AttachedSymbol *next;
@@ -27,9 +29,13 @@ struct AttachedSymbol {
struct Patch {
char *fileName;
int32_t offset;
uint32_t pcSectionID;
uint32_t pcOffset;
enum PatchType type;
int32_t rpnSize;
uint8_t *rpnExpression;
struct Section const *pcSection;
};
struct Section {