diff options
| author | Andrew Chambers <[email protected]> | 2021-10-24 14:34:23 +1300 |
|---|---|---|
| committer | Andrew Chambers <[email protected]> | 2021-10-24 14:34:37 +1300 |
| commit | cd21b90feaa9b66296b8614023349fae7d314b4b (patch) | |
| tree | 198930320598fa39505d955f8ba3f8c927418689 /minias.h | |
| parent | 0d53c9d7b78aec53922bd0d57dbe48db27570506 (diff) | |
Weak symbols.
Diffstat (limited to 'minias.h')
| -rw-r--r-- | minias.h | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -31,7 +31,8 @@ typedef struct { Value value; int64_t wco; /* worst case offset */ int64_t size; - int global; + int bind; /* STB_GLOBAL, STB_LOCAL, STB_WEAK */ + int type; int defined; Section *section; } Symbol; @@ -54,6 +55,7 @@ typedef enum { ASM_MEMARG, // Directives. ASM_DIR_GLOBL, + ASM_DIR_WEAK, ASM_DIR_SECTION, ASM_DIR_ASCII, ASM_DIR_ASCIIZ, @@ -182,6 +184,11 @@ typedef struct Set { Value value; } Set; +typedef struct Weak { + AsmKind kind; + const char *sym; +} Weak; + typedef struct DirSection { AsmKind kind; int32_t type; @@ -306,6 +313,7 @@ union Parsev { Jmp jmp; Fill fill; Set set; + Weak weak; Byte dirbyte; Short dirshort; Int dirint; |
