// Deposit the relocation record
D_long(r_offset);
- D_long((r_sym << 8) | r_type);
+ D_long(((r_sym << 8) | r_type));
D_long(r_addend);
rsize += 0x0C;
}
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);
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);
// Macros to deposit code in the current section
// D_rword deposits a "6502" format (low, high) word (01).
-// D_rlong deposits a MWC "canonical byte order" longword (2301).
#define D_byte(b) {*chptr++=(uint8_t)(b); sloc++; ch_size++; \
if(orgactive) orgaddr++;}
#define D_word(w) {chcheck(2);*chptr++=(uint8_t)((w)>>8); \
*chptr++=(uint8_t)((lw)>>8); \
*chptr++=(uint8_t)(lw); \
sloc += 4; ch_size += 4; if(orgactive) orgaddr += 4;}
-#define D_rword(w) {*chptr++=(uint8_t)w; *chptr++=(uint8_t)(w>>8); \
+#define D_rword(w) {*chptr++=(uint8_t)(w); *chptr++=(uint8_t)((w)>>8); \
sloc+=2; ch_size+=2;if(orgactive) orgaddr += 2;}
-//#define D_rlong(lw) {*chptr++=(uint8_t)(lw>>16);*chptr++=(uint8_t)(lw>>24);\
-// *chptr++=(uint8_t)lw;*chptr++=(uint8_t)(lw>>8); \
-// sloc+=4; ch_size += 4;if(orgactive) orgaddr += 4;}
// Fill n bytes with zeroes
#define D_ZEROFILL(n) {memset(chptr, 0, n); chptr+=n; sloc+=n; ch_size+=n;\
if (orgactive) orgaddr+=n;}
#define MAJOR 1 // Major version number
#define MINOR 8 // Minor version number
-#define PATCH 5 // Patch release number
+#define PATCH 6 // Patch release number
#endif // __VERSION_H__