Obj

Generic interface to the four object module file formats supported. Instead of using virtual functions (i.e. virtual dispatch) it uses static dispatch. Since config.objfmt never changes after initialization of the compiler, static branch prediction should make it faster than virtual dispatch.

Making static dispatch work requires tediously repetitive boilerplate, which we accomplish via string mixins.

version(!STUB)
extern (C++) nothrow
class Obj {}

Members

Static functions

_alias
void _alias(const(char)* n1, const(char)* n2)
Undocumented in source. Be warned that the author may not have intended to support it.
_byte
void _byte(int seg, targ_size_t offset, uint _byte)
Undocumented in source. Be warned that the author may not have intended to support it.
_import
void _import(elem* e)
Undocumented in source. Be warned that the author may not have intended to support it.
addScnhdr
uint addScnhdr(const(char)* scnhdr_name, uint flags)
Undocumented in source. Be warned that the author may not have intended to support it.
addrel
void addrel(int seg, targ_size_t offset, Symbol* targsym, uint targseg, int rtype, int val)
Undocumented in source. Be warned that the author may not have intended to support it.
addrel
void addrel(int seg, targ_size_t offset, uint type, uint symidx, targ_size_t val)
Undocumented in source. Be warned that the author may not have intended to support it.
addstr
uint addstr(Outbuffer* strtab, const(char)* p)
Undocumented in source. Be warned that the author may not have intended to support it.
allowZeroSize
bool allowZeroSize()
Undocumented in source. Be warned that the author may not have intended to support it.
bytes
uint bytes(int seg, targ_size_t offset, uint nbytes, void* p)
Undocumented in source. Be warned that the author may not have intended to support it.
codeseg
int codeseg(char* name, int suffix)
Undocumented in source. Be warned that the author may not have intended to support it.
comdat
int comdat(Symbol* s)
Undocumented in source. Be warned that the author may not have intended to support it.
comdatsize
int comdatsize(Symbol* s, targ_size_t symsize)
Undocumented in source. Be warned that the author may not have intended to support it.
common_block
int common_block(Symbol* s, targ_size_t size, targ_size_t count)
Undocumented in source. Be warned that the author may not have intended to support it.
common_block
int common_block(Symbol* s, int flag, targ_size_t size, targ_size_t count)
Undocumented in source. Be warned that the author may not have intended to support it.
compiler
void compiler()
Undocumented in source. Be warned that the author may not have intended to support it.
data_readonly
int data_readonly(char* p, int len, int* pseg)
Undocumented in source. Be warned that the author may not have intended to support it.
data_readonly
int data_readonly(char* p, int len)
Undocumented in source. Be warned that the author may not have intended to support it.
data_start
int data_start(Symbol* sdata, targ_size_t datasize, int seg)
Undocumented in source. Be warned that the author may not have intended to support it.
dosseg
void dosseg()
Undocumented in source. Be warned that the author may not have intended to support it.
ehsections
void ehsections()
Undocumented in source. Be warned that the author may not have intended to support it.
ehtables
void ehtables(Symbol* sfunc, uint size, Symbol* ehsym)
Undocumented in source. Be warned that the author may not have intended to support it.
exestr
void exestr(const(char)* p)
Undocumented in source. Be warned that the author may not have intended to support it.
export_symbol
void export_symbol(Symbol* s, uint argsize)
Undocumented in source. Be warned that the author may not have intended to support it.
external
int external(Symbol* s)
Undocumented in source. Be warned that the author may not have intended to support it.
external_def
int external_def(const(char)* name)
Undocumented in source. Be warned that the author may not have intended to support it.
far16thunk
void far16thunk(Symbol* s)
Undocumented in source. Be warned that the author may not have intended to support it.
fardata
int fardata(char* name, targ_size_t size, targ_size_t* poffset)
Undocumented in source. Be warned that the author may not have intended to support it.
fltused
void fltused()
Undocumented in source. Be warned that the author may not have intended to support it.
func_start
void func_start(Symbol* sfunc)
Undocumented in source. Be warned that the author may not have intended to support it.
func_term
void func_term(Symbol* sfunc)
Undocumented in source. Be warned that the author may not have intended to support it.
getGOTsym
Symbol* getGOTsym()
Undocumented in source. Be warned that the author may not have intended to support it.
getsegment
int getsegment(const(char)* sectname, const(char)* segname, int align_, int flags)
Undocumented in source. Be warned that the author may not have intended to support it.
getsegment
int getsegment(const(char)* name, const(char)* suffix, int type, int flags, int align_)
Undocumented in source. Be warned that the author may not have intended to support it.
getsegment
int getsegment(const(char)* sectname, uint flags)
Undocumented in source. Be warned that the author may not have intended to support it.
getsegment2
int getsegment2(uint shtidx)
Undocumented in source. Be warned that the author may not have intended to support it.
gotref
void gotref(Symbol* s)
Undocumented in source. Be warned that the author may not have intended to support it.
includelib
bool includelib(const(char)* name)
Undocumented in source. Be warned that the author may not have intended to support it.
init
Obj init(Outbuffer* objbuf, const(char)* filename, const(char)* csegname)
Undocumented in source. Be warned that the author may not have intended to support it.
initfile
void initfile(const(char)* filename, const(char)* csegname, const(char)* modname)
Undocumented in source. Be warned that the author may not have intended to support it.
jmpTableSegment
int jmpTableSegment(Symbol* s)
Undocumented in source. Be warned that the author may not have intended to support it.
ledata
void ledata(int seg, targ_size_t offset, targ_size_t data, uint lcfd, uint idx1, uint idx2)
Undocumented in source. Be warned that the author may not have intended to support it.
lidata
void lidata(int seg, targ_size_t offset, targ_size_t count)
Undocumented in source. Be warned that the author may not have intended to support it.
linkerdirective
bool linkerdirective(const(char)* p)
Undocumented in source. Be warned that the author may not have intended to support it.
linnum
void linnum(Srcpos srcpos, int seg, targ_size_t offset)
Undocumented in source. Be warned that the author may not have intended to support it.
lzext
void lzext(Symbol* s1, Symbol* s2)
Undocumented in source. Be warned that the author may not have intended to support it.
mangle
size_t mangle(Symbol* s, char* dest)
Undocumented in source. Be warned that the author may not have intended to support it.
moduleinfo
void moduleinfo(Symbol* scc)
Undocumented in source. Be warned that the author may not have intended to support it.
pubdef
void pubdef(int seg, Symbol* s, targ_size_t offset)
Undocumented in source. Be warned that the author may not have intended to support it.
pubdefsize
void pubdefsize(int seg, Symbol* s, targ_size_t offset, targ_size_t symsize)
Undocumented in source. Be warned that the author may not have intended to support it.
readonly_comdat
int readonly_comdat(Symbol* s)
Undocumented in source. Be warned that the author may not have intended to support it.
refGOTsym
void refGOTsym()
Undocumented in source. Be warned that the author may not have intended to support it.
reftocodeseg
void reftocodeseg(int seg, targ_size_t offset, targ_size_t val)
Undocumented in source. Be warned that the author may not have intended to support it.
reftodatseg
void reftodatseg(int seg, targ_size_t offset, targ_size_t val, uint targetdatum, int flags)
Undocumented in source. Be warned that the author may not have intended to support it.
reftofarseg
void reftofarseg(int seg, targ_size_t offset, targ_size_t val, int farseg, int flags)
Undocumented in source. Be warned that the author may not have intended to support it.
reftoident
int reftoident(int seg, targ_size_t offset, Symbol* s, targ_size_t val, int flags)
Undocumented in source. Be warned that the author may not have intended to support it.
seg_debugS
int seg_debugS()
Undocumented in source. Be warned that the author may not have intended to support it.
seg_debugS_comdat
int seg_debugS_comdat(Symbol* sfunc)
Undocumented in source. Be warned that the author may not have intended to support it.
seg_debugT
int seg_debugT()
Undocumented in source. Be warned that the author may not have intended to support it.
seg_drectve
int seg_drectve()
Undocumented in source. Be warned that the author may not have intended to support it.
seg_pdata
int seg_pdata()
Undocumented in source. Be warned that the author may not have intended to support it.
seg_pdata_comdat
int seg_pdata_comdat(Symbol* sfunc)
Undocumented in source. Be warned that the author may not have intended to support it.
seg_xdata
int seg_xdata()
Undocumented in source. Be warned that the author may not have intended to support it.
seg_xdata_comdat
int seg_xdata_comdat(Symbol* sfunc)
Undocumented in source. Be warned that the author may not have intended to support it.
segment_group
void segment_group(targ_size_t codesize, targ_size_t datasize, targ_size_t cdatasize, targ_size_t udatasize)
Undocumented in source. Be warned that the author may not have intended to support it.
setModuleCtorDtor
void setModuleCtorDtor(Symbol* s, bool isCtor)
Undocumented in source. Be warned that the author may not have intended to support it.
setcodeseg
void setcodeseg(int seg)
Undocumented in source. Be warned that the author may not have intended to support it.
startaddress
void startaddress(Symbol* s)
Undocumented in source. Be warned that the author may not have intended to support it.
staticctor
void staticctor(Symbol* s, int dtor, int seg)
Undocumented in source. Be warned that the author may not have intended to support it.
staticdtor
void staticdtor(Symbol* s)
Undocumented in source. Be warned that the author may not have intended to support it.
string_literal_segment
int string_literal_segment(uint sz)
Undocumented in source. Be warned that the author may not have intended to support it.
sym_cdata
Symbol* sym_cdata(tym_t ty, char* p, int len)
Undocumented in source. Be warned that the author may not have intended to support it.
term
void term(const(char)* objfilename)
Undocumented in source. Be warned that the author may not have intended to support it.
termfile
void termfile()
Undocumented in source. Be warned that the author may not have intended to support it.
theadr
void theadr(const(char)* modname)
Undocumented in source. Be warned that the author may not have intended to support it.
tlsseg
seg_data* tlsseg()
Undocumented in source. Be warned that the author may not have intended to support it.
tlsseg_bss
seg_data* tlsseg_bss()
Undocumented in source. Be warned that the author may not have intended to support it.
tlsseg_data
seg_data* tlsseg_data()
Undocumented in source. Be warned that the author may not have intended to support it.
tlv_bootstrap
Symbol* tlv_bootstrap()
Undocumented in source. Be warned that the author may not have intended to support it.
user
void user(const(char)* p)
Undocumented in source. Be warned that the author may not have intended to support it.
wkext
void wkext(Symbol* s1, Symbol* s2)
Undocumented in source. Be warned that the author may not have intended to support it.
write_byte
void write_byte(seg_data* pseg, uint _byte)
Undocumented in source. Be warned that the author may not have intended to support it.
write_bytes
void write_bytes(seg_data* pseg, uint nbytes, void* p)
Undocumented in source. Be warned that the author may not have intended to support it.
write_long
void write_long(int seg, targ_size_t offset, uint data, uint lcfd, uint idx1, uint idx2)
Undocumented in source. Be warned that the author may not have intended to support it.
write_pointerRef
void write_pointerRef(Symbol* s, uint off)
Undocumented in source. Be warned that the author may not have intended to support it.
write_zeros
void write_zeros(seg_data* pseg, targ_size_t count)
Undocumented in source. Be warned that the author may not have intended to support it.
writerel
size_t writerel(int targseg, size_t offset, uint type, uint symidx, targ_size_t val)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta