MIPS RISC architecture
Understanding and using COFF
Fast allocation and deallocation of memory based on object lifetimes
Software—Practice & Experience
Compiling with continuations
Optimally profiling and tracing programs
POPL '92 Proceedings of the 19th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Communications of the ACM
A retargetable debugger
Efficient software-based fault isolation
SOSP '93 Proceedings of the fourteenth ACM symposium on Operating systems principles
System V application binary interface (3rd ed.)
System V application binary interface (3rd ed.)
Effective partial redundancy elimination
PLDI '94 Proceedings of the ACM SIGPLAN 1994 conference on Programming language design and implementation
ATOM: a system for building customized program analysis tools
PLDI '94 Proceedings of the ACM SIGPLAN 1994 conference on Programming language design and implementation
Optimizing an ANSI C interpreter with superoperators
POPL '95 Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Simple and effective link-time optimization of Modula-3 programs
PLDI '95 Proceedings of the ACM SIGPLAN 1995 conference on Programming language design and implementation
EEL: machine-independent executable editing
PLDI '95 Proceedings of the ACM SIGPLAN 1995 conference on Programming language design and implementation
Assembling code for machines with span-dependent instructions
Communications of the ACM
The Implementation of Functional Programming Languages (Prentice-Hall International Series in Computer Science)
The New Jersey machine-code toolkit
TCON'95 Proceedings of the USENIX 1995 Technical Conference Proceedings
Automatic checking of instruction specifications
ICSE '97 Proceedings of the 19th international conference on Software engineering
Specifying representations of machine instructions
ACM Transactions on Programming Languages and Systems (TOPLAS)
A Calculus for Compiling and Linking Classes
ESOP '00 Proceedings of the 9th European Symposium on Programming Languages and Systems
Pragmatic aspects of reusable program generators
Journal of Functional Programming
Building the world from first principles: declarative machine descriptions and compiler construction
PADL'05 Proceedings of the 7th international conference on Practical Aspects of Declarative Languages
Hi-index | 0.00 |
Relocation adjusts machine instructions to account for changes in the locations of the instructions themselves or of external symbols to which they refer. Standard linkers implement a finite set of relocation transformations, suitable for a single architecture. These transformations are enumerated, named, and engraved in a machine-dependent object-file format, and linkers must recognize them by name. These names and their associated transformations are an unnecessary source of machine-dependence.The New Jersey Machine-Code Toolkit is an application generator. It helps programmers create applications that manipulate machine code, including linkers. Guided by a short instruction-set specification, the toolkit generates the bit-manipulating code. Instructions are described by constructors, which denote functions mapping lists of operands to instructions' binary representations. Any operand can be designated as "relocatable," meaning that the operand's value need not be known at the time the instruction is encoded. For instructions with relocatable operands, the toolkit computes relocating transformations. Tool writers can use the toolkit to create machine-independent software that relocates machine instructions. mld, a retargetable linker built with the toolkit, needs only 20 lines of C code for relocation, and that code is machine-independent.The toolkit discovers relocating transformations by currying encoding functions. An attempt to encode an instruction with a relocatable operand results in the creation of a closure. The closure can be applied when the values of the relocatable operands become known. Currying provides a general, machine-independent method of relocation.Currying rewrites a λ-term into two nested λ-terms. The standard implementation has the first λ allocate a closure and store therein its operands and a pointer to the second λ. Using this strategy in the toolkit means that, when it builds an application, the toolkit generates code for many different inner λ-terms---one for each instruction that uses a relocatable address. Hoisting some of the computation out of the second λ into the first makes many of the second λs identical---a handful are enough for a whole instruction set. This optimization reduces the size of machine-dependent assembly and linking code by 15--20% for the MIPS, SPARC, and PowerPC, and by about 30% for the Pentium. It also makes the second λs equivalent to relocating transformations named in standard object-file formats.