X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=object.h;h=fe5997c745e76fa3dc31edcab1c4311e7af9a160;hp=01f4dadd2f1fcccb3bdefc3cfc72053d1c0db55f;hb=HEAD;hpb=75cce0d9eb190f6094f66ae283b5981af25e5a57 diff --git a/object.h b/object.h index 01f4dad..84d2d60 100644 --- a/object.h +++ b/object.h @@ -1,9 +1,9 @@ // -// RMAC - Reboot's Macro Assembler for the Atari Jaguar Console System +// RMAC - Renamed Macro Assembler for all Atari computers // OBJECT.H - Writing Object Files -// Copyright (C) 199x Landon Dyer, 2011 Reboot and Friends +// Copyright (C) 199x Landon Dyer, 2011-2022 Reboot and Friends // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986 -// Source Utilised with the Kind Permission of Landon Dyer +// Source utilised with the kind permission of Landon Dyer // #ifndef __OBJECT_H__ @@ -11,12 +11,43 @@ #include "rmac.h" -#define BSDHDRSIZE 0x20 // Size of BSD header +#define BSDHDRSIZE 0x20 // Size of BSD header +#define HDRSIZE 0x1C // Size of Alcyon header -// Globals, externals etc -extern char *objimage; +// +// Alcyon symbol flags +// +#define AL_DEFINED 0x8000 +#define AL_EQUATED 0x4000 +#define AL_GLOBAL 0x2000 +#define AL_EQUREG 0x1000 +#define AL_EXTERN 0x0800 +#define AL_DATA 0x0400 +#define AL_TEXT 0x0200 +#define AL_BSS 0x0100 +#define AL_FILE 0x0080 + +enum ELFSectionNames +{ + ES_NULL, ES_TEXT, ES_DATA, ES_BSS, ES_RELATEXT, ES_RELADATA, ES_SHSTRTAB, + ES_SYMTAB, ES_STRTAB +}; + +// +// ELF special section indices (field st_shndx) +// Lifted from glibc (https://sourceware.org/git/?p=glibc.git;a=blob;f=elf/elf.h) +// +#define SHN_UNDEF 0 /* Undefined section */ +#define SHN_ABS 0xFFF1 /* Associated symbol is absolute */ +#define SHN_COMMON 0xFFF2 /* Associated symbol is common */ -// Prototypes -int object(WORD); +// Exported variables. +extern uint8_t * objImage; +extern int elfHdrNum[]; +extern uint32_t extraSyms; + +// Exported functions +int WriteObject(int); #endif // __OBJECT_H__ +