dmd.backend.cgobj

Compiler implementation of the D programming language.

Members

Aliases

filespeccmp
alias filespeccmp = stricmp
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
filespeccmp
alias filespeccmp = strcmp
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.

Enums

FD_F0
anonymousenum FD_F0
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
LOCATselfrel
anonymousenum LOCATselfrel
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
RHEADR
anonymousenum RHEADR

Record types:

SEG_ALIGN0
anonymousenum SEG_ALIGN0
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.

Functions

OmfObj_alias
void OmfObj_alias(const(char)* n1, const(char)* n2)

Output an alias definition record.

OmfObj_allowZeroSize
bool OmfObj_allowZeroSize()

Do we allow zero sized objects?

OmfObj_byte
void OmfObj_byte(int seg, targ_size_t offset, uint _byte)

Output byte to object file.

OmfObj_bytes
uint OmfObj_bytes(int seg, targ_size_t offset, uint nbytes, void* p)

Output bytes to object file.

OmfObj_codeseg
int OmfObj_codeseg(char* name, int suffix)

Define a new code segment. Input: name name of segment, if null then revert to default suffix 0 use name as is 1 append "_TEXT" to name Output: cseg segment index of new current code segment Coffset starting offset in cseg

OmfObj_comdat
int OmfObj_comdat(Symbol* s)
Undocumented in source. Be warned that the author may not have intended to support it.
OmfObj_comdatsize
int OmfObj_comdatsize(Symbol* s, targ_size_t symsize)

Setup for Symbol s to go into a COMDAT segment. Output (if s is a function): cseg segment index of new current code segment Coffset starting offset in cseg

OmfObj_common_block
int OmfObj_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.
OmfObj_common_block
int OmfObj_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.
OmfObj_compiler
void OmfObj_compiler()

Embed compiler version in .obj file.

OmfObj_data_readonly
int OmfObj_data_readonly(char* p, int len, int* pseg)

Ouput read only data for data. Output: *pseg segment of that data

OmfObj_data_readonly
int OmfObj_data_readonly(char* p, int len)
Undocumented in source. Be warned that the author may not have intended to support it.
OmfObj_data_start
int OmfObj_data_start(Symbol* sdata, targ_size_t datasize, int seg)

Update data information about symbol align for output and assign segment if not already specified.

OmfObj_dosseg
void OmfObj_dosseg()

Output DOSSEG coment record.

OmfObj_ehsections
void OmfObj_ehsections()
Undocumented in source. Be warned that the author may not have intended to support it.
OmfObj_ehtables
void OmfObj_ehtables(Symbol* sfunc, uint size, Symbol* ehsym)

Stuff pointer to function in its own segment. Used for static ctor and dtor lists.

OmfObj_exestr
void OmfObj_exestr(const(char)* p)

Embed string in executable.

OmfObj_export_symbol
void OmfObj_export_symbol(Symbol* s, uint argsize)

Export a function name.

OmfObj_external
int OmfObj_external(Symbol* s)

Output an external definition. Input: s Symbol to do EXTDEF on

OmfObj_external_def
int OmfObj_external_def(const(char)* name)
Undocumented in source. Be warned that the author may not have intended to support it.
OmfObj_far16thunk
void OmfObj_far16thunk(Symbol* s)

Generate far16 thunk. Input: s Symbol to generate a thunk for

OmfObj_fardata
int OmfObj_fardata(char* name, targ_size_t size, targ_size_t* poffset)

Define a far data segment. Input: name Name of module size Size of the segment to be created

OmfObj_fltused
void OmfObj_fltused()

Mark object file as using floating point.

OmfObj_func_start
void OmfObj_func_start(Symbol* sfunc)
Undocumented in source. Be warned that the author may not have intended to support it.
OmfObj_func_term
void OmfObj_func_term(Symbol* sfunc)

Update function info after codgen

OmfObj_gotref
void OmfObj_gotref(Symbol* s)
Undocumented in source. Be warned that the author may not have intended to support it.
OmfObj_import
void OmfObj_import(elem* e)

Convert reference to imported name.

OmfObj_includelib
bool OmfObj_includelib(const(char)* name)

Output library name. Output: name is modified

OmfObj_init
Obj OmfObj_init(Outbuffer* objbuf, const(char)* filename, const(char)* csegname)

Perform initialization that applies to all .obj output files. Input: filename source file name csegname code segment name (can be null)

OmfObj_initfile
void OmfObj_initfile(const(char)* filename, const(char)* csegname, const(char)* modname)

Initialize the start of object output for this particular .obj file.

OmfObj_jmpTableSegment
int OmfObj_jmpTableSegment(Symbol* s)
OmfObj_ledata
void OmfObj_ledata(int seg, targ_size_t offset, targ_size_t data, uint lcfd, uint idx1, uint idx2)

Output word of data. (Two words if segment:offset pair.) Input: seg CODE, DATA, CDATA, UDATA offset offset of start of data data word of data lcfd LCxxxx | FDxxxx if (FD_F2 | FD_T6) idx1 = external Symbol # else idx1 = frame datum idx2 = target datum

OmfObj_lidata
void OmfObj_lidata(int seg, targ_size_t offset, targ_size_t count)

Output an iterated data block of 0s. (uninitialized data only)

OmfObj_linkerdirective
bool OmfObj_linkerdirective(const(char)* name)

Output linker directive. Output: directive is modified

OmfObj_linnum
void OmfObj_linnum(Srcpos srcpos, int seg, targ_size_t offset)

Record line number linnum at offset.

OmfObj_lzext
void OmfObj_lzext(Symbol* s1, Symbol* s2)

Output a lazy extern record. s1 is the lazy extern, s2 is its default resolution.

OmfObj_mangle
size_t OmfObj_mangle(Symbol* s, char* dest)

Mangle a name.

OmfObj_moduleinfo
void OmfObj_moduleinfo(Symbol* scc)

Append pointer to ModuleInfo to "FM" segment. The FM segment is bracketed by the empty FMB and FME segments.

OmfObj_pubdef
void OmfObj_pubdef(int seg, Symbol* s, targ_size_t offset)
Undocumented in source. Be warned that the author may not have intended to support it.
OmfObj_pubdefsize
void OmfObj_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.
OmfObj_readonly_comdat
int OmfObj_readonly_comdat(Symbol* s)
Undocumented in source. Be warned that the author may not have intended to support it.
OmfObj_reftocodeseg
void OmfObj_reftocodeseg(int seg, targ_size_t offset, targ_size_t val)

Refer to address that is in the code segment. Only offsets are output, regardless of the memory model. Used to put values in switch address tables. Input: seg = where the address is going (CODE or DATA) offset = offset within seg val = displacement from start of this module

OmfObj_reftodatseg
void OmfObj_reftodatseg(int seg, targ_size_t offset, targ_size_t val, uint targetdatum, int flags)

Refer to address that is in the data segment. Input: seg = where the address is going offset = offset within seg val = displacement from address targetdatum = DATA, CDATA or UDATA, depending where the address is flags = CFoff, CFseg

OmfObj_reftofarseg
void OmfObj_reftofarseg(int seg, targ_size_t offset, targ_size_t val, int farseg, int flags)

Refer to address that is in a far segment. Input: seg = where the address is going offset = offset within seg val = displacement from address farseg = far segment index flags = CFoff, CFseg

OmfObj_reftoident
int OmfObj_reftoident(int seg, targ_size_t offset, Symbol* s, targ_size_t val, int flags)

Refer to an identifier. Input: seg = where the address is going (CODE or DATA) offset = offset within seg s . Symbol table entry for identifier val = displacement from identifier flags = CFselfrel: self-relative CFseg: get segment CFoff: get offset

OmfObj_seg_debugT
segidx_t OmfObj_seg_debugT()
Undocumented in source. Be warned that the author may not have intended to support it.
OmfObj_segment_group
void OmfObj_segment_group(targ_size_t codesize, targ_size_t datasize, targ_size_t cdatasize, targ_size_t udatasize)

Output segment and group definitions. Input: codesize size of code segment datasize size of initialized data segment cdatasize size of initialized const data segment udatasize size of uninitialized data segment

OmfObj_setModuleCtorDtor
void OmfObj_setModuleCtorDtor(Symbol* s, bool isCtor)

Set up function to be called as static constructor on program startup or static destructor on program shutdown.

OmfObj_setcodeseg
void OmfObj_setcodeseg(int seg)

Reset code seg to existing seg. Used after a COMDAT for a function is done.

OmfObj_startaddress
void OmfObj_startaddress(Symbol* s)

Set start address

OmfObj_staticctor
void OmfObj_staticctor(Symbol* s, int dtor, int seg)

Symbol is the function that calls the static constructors. Put a pointer to it into a special segment that the startup code looks at. Input: s static constructor function dtor number of static destructors seg 1: user 2: lib 3: compiler

OmfObj_staticdtor
void OmfObj_staticdtor(Symbol* s)
Undocumented in source. Be warned that the author may not have intended to support it.
OmfObj_string_literal_segment
int OmfObj_string_literal_segment(uint sz)

Get segment for readonly string literals. The linker will pool strings in this section.

OmfObj_sym_cdata
Symbol* OmfObj_sym_cdata(tym_t ty, char* p, int len)

Output read only data and generate a symbol for it.

OmfObj_term
void OmfObj_term(const(char)* objfilename)

Terminate package.

OmfObj_termfile
void OmfObj_termfile()

Fixup and terminate object file.

OmfObj_theadr
void OmfObj_theadr(const(char)* modname)

Output module name record.

OmfObj_tlsseg
seg_data* OmfObj_tlsseg()
Undocumented in source. Be warned that the author may not have intended to support it.
OmfObj_tlsseg_bss
seg_data* OmfObj_tlsseg_bss()

Define segment for Thread Local Storage. Output: tlsseg set to segment number for TLS segment.

OmfObj_tlsseg_data
seg_data* OmfObj_tlsseg_data()
Undocumented in source. Be warned that the author may not have intended to support it.
OmfObj_tlv_bootstrap
Symbol* OmfObj_tlv_bootstrap()
Undocumented in source. Be warned that the author may not have intended to support it.
OmfObj_user
void OmfObj_user(const(char)* p)

Embed string in obj.

OmfObj_wkext
void OmfObj_wkext(Symbol* s1, Symbol* s2)

Output a weak extern record. s1 is the weak extern, s2 is its default resolution.

OmfObj_write_byte
void OmfObj_write_byte(seg_data* pseg, uint _byte)

Append byte to segment.

OmfObj_write_bytes
void OmfObj_write_bytes(seg_data* pseg, uint nbytes, void* p)

Append bytes to segment.

OmfObj_write_long
void OmfObj_write_long(int seg, targ_size_t offset, uint data, uint lcfd, uint idx1, uint idx2)

Output long word of data. Input: seg CODE, DATA, CDATA, UDATA offset offset of start of data data long word of data Present only if size == 2: lcfd LCxxxx | FDxxxx if (FD_F2 | FD_T6) idx1 = external Symbol # else idx1 = frame datum idx2 = target datum

OmfObj_write_pointerRef
void OmfObj_write_pointerRef(Symbol* s, uint soff)

write a reference to a mutable pointer into the object file

OmfObj_write_zeros
void OmfObj_write_zeros(seg_data* pseg, targ_size_t count)

Append an iterated data block of 0s. (uninitialized data only)

SEG_ATTR
uint SEG_ATTR(uint A, uint C, uint B, uint P)

For defining segments.

TOLONG
void TOLONG(void* a, uint b)
Undocumented in source. Be warned that the author may not have intended to support it.
TOOFFSET
void TOOFFSET(void* p, targ_size_t value)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
TOWORD
void TOWORD(void* a, uint b)
Undocumented in source. Be warned that the author may not have intended to support it.
cpp_mangle
const(char)* cpp_mangle(Symbol* s)
Undocumented in source. Be warned that the author may not have intended to support it.
error
void error(Loc loc, const(char)* format, ...)
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
error
void error(Loc loc, const(char)* format, ...)
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
error
void error(const(char)* filename, uint linnum, uint charnum, const(char)* format, ...)

Insert an index number. Input: p . where to put the 1 or 2 byte index index = the 15 bit index

fatal
void fatal()
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
filespecdotext
char* filespecdotext(const(char)* filespec)
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
filespecgetroot
char* filespecgetroot(const(char)* name)
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
filespecname
char* filespecname(const(char)* filespec)
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
getcwd
char* getcwd(char* , size_t )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
getcwd
char* getcwd(char* , size_t )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
getindex
int getindex(ubyte* p)

Read index.

getsegment
seg_data* getsegment()

Allocate a new segment. Return index for the new segment.

insidx
int insidx(char* p, uint index)
Undocumented in source. Be warned that the author may not have intended to support it.
insidx
int insidx(char* p, uint index)
Undocumented in source. Be warned that the author may not have intended to support it.
instypidx
int instypidx(char* p, uint index)

Insert a type index number. Input: p . where to put the 1 or 2 byte index index = the 15 bit index

itoa
char* itoa(int , char* , int )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
itoa
char* itoa(int , char* , int )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
list_fixup
FIXUP* list_fixup(list_t fl)
Undocumented in source. Be warned that the author may not have intended to support it.
objrecord
void objrecord(uint rectyp, const(char)* record, uint reclen)

Output an object file data record. Input: rectyp = record type record . the data reclen = # of bytes in record

seg_is_comdat
int seg_is_comdat(int seg)
Undocumented in source. Be warned that the author may not have intended to support it.
stricmp
int stricmp(const(char)* , const(char)* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
strupr
char* strupr(char* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
strupr
char* strupr(char* )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
too_many_symbols
void too_many_symbols()
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

BSSCLASS
enum BSSCLASS;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
CDATACLASS
enum CDATACLASS;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
CODECLASS
enum CODECLASS;

Output header stuff for object files. Input: csegname Name to use for code segment (null if use default)

DATACLASS
enum DATACLASS;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
LEDATAMAX
enum LEDATAMAX;

Ledata records

LINRECMAX
enum LINRECMAX;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
MULTISCOPE
enum MULTISCOPE;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
ONS_OHD
enum ONS_OHD;

Static functions

generate_comdat
int generate_comdat(Symbol* s, bool is_readonly_comdat)
Undocumented in source. Be warned that the author may not have intended to support it.
storelength
uint storelength(uint length, uint i)

Output a common block definition. Input: p . external identifier flag TRUE: in default data segment FALSE: not in default data segment size size in bytes of each elem count number of elems

Static variables

SegData
Rarray!(seg_data*) SegData;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
obj
Objstate obj;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.

Structs

FIXUP
struct FIXUP

Fixup list.

Ledatarec
struct Ledatarec
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
Linnum
struct Linnum

Line number support.

Loc
struct Loc
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
Objstate
struct Objstate

State of object file.

PtrRef
struct PtrRef

Meta