summaryrefslogtreecommitdiff
path: root/masm/strtab.c
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-10-04 19:41:10 -0400
committerFreya Murphy <freya@freyacat.org>2024-10-04 19:41:10 -0400
commit1c11a13ff33873bcc79d4597d31cd252d5c6c1ae (patch)
treea4321b97f5ad69d1a9b9d06dd629a4dc532758b0 /masm/strtab.c
parentupdate msim usage (diff)
downloadmips-1c11a13ff33873bcc79d4597d31cd252d5c6c1ae.tar.gz
mips-1c11a13ff33873bcc79d4597d31cd252d5c6c1ae.tar.bz2
mips-1c11a13ff33873bcc79d4597d31cd252d5c6c1ae.zip
refactor masm to add codegen step
Diffstat (limited to 'masm/strtab.c')
-rw-r--r--masm/strtab.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/masm/strtab.c b/masm/strtab.c
index 404ea73..bd914b0 100644
--- a/masm/strtab.c
+++ b/masm/strtab.c
@@ -4,7 +4,7 @@
#include "asm.h"
-int strtab_get_str(struct str_table *strtab, const char *str, size_t *res)
+int strtab_get_str(struct elf_str_table *strtab, const char *str, size_t *res)
{
for (size_t i = 0; i < strtab->size; i ++) {
if (strcmp(strtab->ptr + i, str) == 0) {
@@ -17,7 +17,7 @@ int strtab_get_str(struct str_table *strtab, const char *str, size_t *res)
return M_ERROR;
}
-int strtab_write_str(struct str_table *strtab, const char *str, size_t *res)
+int strtab_write_str(struct elf_str_table *strtab, const char *str, size_t *res)
{
if (strtab_get_str(strtab, str, res) == M_SUCCESS)
return M_SUCCESS;
@@ -36,7 +36,7 @@ int strtab_write_str(struct str_table *strtab, const char *str, size_t *res)
return M_SUCCESS;
}
-int strtab_init(struct str_table *strtab)
+int strtab_init(struct elf_str_table *strtab)
{
strtab->size = 1;
strtab->ptr = malloc(1);
@@ -48,7 +48,7 @@ int strtab_init(struct str_table *strtab)
return M_SUCCESS;
}
-void strtab_free(struct str_table *strtab)
+void strtab_free(struct elf_str_table *strtab)
{
free(strtab->ptr);
}