]> Shamusworld >> Repos - rmac/blobdiff - object.c
Lots of fixes for floating point handling; version now at 1.11.0.
[rmac] / object.c
index 7fd8fcce06ed190924fd0c175ff970f5322764e2..086d407eed73f6d436b6a607828db20e687ad9d5 100644 (file)
--- a/object.c
+++ b/object.c
@@ -229,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);
@@ -264,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);
@@ -310,7 +312,7 @@ int WriteObject(int fd)
 
                ssize = sy_assign(NULL, NULL);                          // Assign index numbers to the symbols
                tds = sect[TEXT].sloc + sect[DATA].sloc;        // Get size of TEXT and DATA segment
-               buf = malloc(0x600000);                                         // Allocate 6mb object file image memory
+               buf = malloc(0x800000);                                         // Allocate 8MB object file image memory
 
                if (buf == NULL)
                {
@@ -318,7 +320,7 @@ int WriteObject(int fd)
                        return ERROR;
                }
 
-               memset(buf, 0, 0x600000);               // Clear allocated memory
+               memset(buf, 0, 0x800000);               // Clear allocated memory
                objImage = buf;                                 // Set global object image pointer
                strtable = malloc(0x200000);    // Allocate 2MB string table buffer
 
@@ -475,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;
                }
 
@@ -485,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;
                }