]> Shamusworld >> Repos - rmac/blobdiff - object.c
Added floating point support to expression evaluator, introduced FLOAT token, fixup...
[rmac] / object.c
index 522a4d918ce6bacc5d5b0bd0c3805a1867a3dd2c..73614f2e9c2e5df211dec678f38a80037fa35c72 100644 (file)
--- a/object.c
+++ b/object.c
@@ -178,6 +178,7 @@ uint8_t * AddBSDSymEntry(uint8_t * buf, SYM * sym, int globflag)
 uint8_t * AddELFSymEntry(uint8_t * buf, SYM * sym, int globflag)
 {
        chptr = buf;
+       ch_size = 0;
        D_long(strindx);                // st_name
        D_long(sym->svalue);    // st_value
        D_long(0);                              // st_size
@@ -228,6 +229,7 @@ uint8_t * AddELFSymEntry(uint8_t * buf, SYM * sym, int globflag)
 int DepositELFSectionHeader(uint8_t * ptr, uint32_t name, uint32_t type, uint32_t flags, uint32_t addr, uint32_t offset, uint32_t size, uint32_t link, uint32_t info, uint32_t addralign, uint32_t entsize)
 {
        chptr = ptr;
+       ch_size = 0;
        D_long(name);
        D_long(type);
        D_long(flags);
@@ -263,6 +265,7 @@ printf("DepositELFSHSTEntry: s = \"%s\"\n", s);
 uint32_t DepositELFSymbol(uint8_t * ptr, uint32_t name, uint32_t addr, uint32_t size, uint8_t info, uint8_t other, uint16_t shndx)
 {
        chptr = ptr;
+       ch_size = 0;
        D_long(name);
        D_long(addr);
        D_long(size);
@@ -474,7 +477,7 @@ int WriteObject(int fd)
 
                if (buf == NULL)
                {
-                       error("cannot allocate object file memory (in BSD mode)");
+                       error("cannot allocate object file memory (in ELF mode)");
                        return ERROR;
                }
 
@@ -484,7 +487,7 @@ int WriteObject(int fd)
 
                if (strtable == NULL)
                {
-                       error("cannot allocate string table memory (in BSD mode)");
+                       error("cannot allocate string table memory (in ELF mode)");
                        return ERROR;
                }