Because the mscoff relocations cannot be computed until after all the segments are written out, and we need more information than the mscoff relocations provide, make our own relocation type. Later, translate to mscoff relocation structure.
Add new scnhdr.
Add a relocation entry for seg/offset.
Output a string into a string table Input: strtab = string table for entry str = string to add
Output an alias definition record.
Do we allow zero sized objects?
Output byte_ to object file.
Output bytes to object file.
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 Offset(cseg) starting offset in cseg
Setup for Symbol s to go into a COMDAT segment. Output (if s is a function): cseg segment index of new current code segment Offset(cseg) starting offset in cseg
Output a common block definition.
Embed compiler version in .obj file.
Ouput read only data for data
Update data information about symbol align for output and assign segment if not already specified.
Stuff the following data (instance of struct FuncTable) in a separate segment: pointer to function pointer to ehsym length of function
Embed string in executable.
Export a function name.
Output an external for existing symbol. Input: s Symbol to do EXTDEF on (Name is to be mangled)
Output an external symbol for name. Input: name Name to do EXTDEF on (Not to be mangled)
Generate far16 thunk. Input: s Symbol to generate a thunk for
Mark object file as using floating point.
Update function info before codgen
Update function info after codgen
Get segment, which may already exist. Input: flags2 put out some data for this, so the linker will keep things in order
Create a new segment corresponding to an existing scnhdr index shtidx
Output library name.
Start a .obj file. Called before any other obj_xxx routines. One source file can generate multiple .obj files.
Start a module within a .obj file. There can be multiple modules within a single .obj file.
Output an iterated data block of 0s.
Output linker directive name.
Record file and line number at segment and offset.
Stuff pointer to ModuleInfo in its own segment. Input: scc symbol for ModuleInfo
Output a public definition.
Refer to address that is in the current function code (funcsym_p). 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
Refer to address that is in the data segment. Input: seg:offset = the address being fixed up val = displacement from start of target segment targetdatum = target segment number (DATA, CDATA or UDATA, etc.) flags = CFoff, CFseg
Refer to an identifier.
Return segment indices for .pdata and .xdata sections
Stuff pointer to function in its own segment. Used for static ctor and dtor lists.
Reset code seg to existing seg. Used after a COMDAT for a function is done.
Set start address
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 !=0 if leave space for static destructor seg 1: user 2: lib 3: compiler
Symbol is the function that calls the static destructors. Put a pointer to it into a special segment that the exit code looks at. Input: s static destructor function
Get segment for readonly string literals. The linker will pool strings in this section.
Output read only data and generate a symbol for it.
Terminate package.
Fixup and terminate object file.
Define segments for Thread Local Storage. Output: seg_tlsseg set to segment number for TLS segment.
Define segments for Thread Local Storage. Output: seg_tlsseg_bss set to segment number for TLS segment.
Embed string in obj.
Output a weak extern record.
Append byte to segment.
Append bytes to segment.
write a reference to a mutable pointer into the object file
Append an iterated data block of 0s. (uninitialized data only)
Output file name record.
Mangle a name.
Patch pseg/offset by adding in the vmaddr difference from pseg/offset to start of seg.
Because the mscoff relocations cannot be computed until after all the segments are written out, and we need more information than the mscoff relocations provide, make our own relocation type. Later, translate to mscoff relocation structure.
Compiler implementation of the D programming language.