5 ms·
Linkers and Loaders (1999)
- unwiredben 8y agoCool! I did a little review of this book back when I was the CodeWarrior for Windows compiler/linker developer at Metrowerks. It's a really useful work.
- Postosuchus 8y agoThis is cool! Anyone bothered to re-assemble it into a single PDF?
- tyingq 8y agoThis looks like it: http://www.becbapatla.ac.in/cse/naveenv/docs/LL1.pdf http://www.becbapatla.ac.in/cse/naveenv/docs/LL1.pdf
- pflanze 8y agoIf you prefer the HTML pages for offline reading like I do, you can save yourself the work of selectively downloading them and get the whole bunch from: http://christianjaeger.ch/scratch/www.iecc.com-linker-only_html.tgz http://christianjaeger.ch/scratch/www.iecc.com-linker-only_h... The only change I made is to the www.iecc.com/linker/index.html file (to show the icon for the html links).
- deleted 8y ago[deleted]
- pflanze 8y agoI have removed the file again.
- barrkel 8y agoThis is a good introduction to a topic that very little is generally written about, and is practically useful to few people outside operating systems and compilers - and compilers usually use someone else's linker, although they still need to know about relocations, fixups, external linkage schemes etc to generate workable machine code. If you squint a bit, there's a continuum between image-based languages like Smalltalk and Lisp (optionally), where allocations persist across restarts, and linkers, where the memory "allocation" happens at compile time and is only used at runtime, through to smart linkers, which closely resemble the marking and compacting phases of a simple garbage collector. The compiler needs to advertise its roots, pointers and pointed to targets to the linker so that relocations can work. Even fixups, the micro language that the linker needs to evaluate when resolving symbols, has analogies with restoring an image - any non-persistable references need to be restored.
- slededit 8y agoC and C++ programmers could benefit from this. So many times I had to explain an error message or problems that would be obvious if they knew how it worked.
- frankzinger 8y agoAnother take on the topic which has been passed around before here on HN: https://lwn.net/Articles/276782/ https://lwn.net/Articles/276782/.
- gpapilion 8y agoI have a hard copy of this book. It was incredibly valuable when writing a boot loader that understood the elf format.
- lkuty 8y agoI have it too. I should read it one day. As well as dozens of other books.
- spamvictim 8y agoHi. I wrote "Linkers and Loaders." I'm glad to see you all find it's useful but if so, please take a copy out of the library or (perish forbid) buy a copy. You can find new and used copies in the usual online stores. The chapters on my web site are unedited review drafts with a lot of errors that were fixed in the printed book.
- JdeBP 8y agoWhat? Buy a second copy? (-: I have it on the bookshelf next to me as I type this. I actually have quite a few books, and one of the subjects that really only two that I ever bought has treated well is DLLs in Win32, OS/2, and the like. Almost every author treats them as an afterthought or a variation on Unix shared libraries, when they are not. There's all sorts of stuff peculiar to DLLs; from compression in LX format DLLs, through techniques for ensuring that as many fixups as possible are concentrated in one or a few pages, through module deduplication and search paths, to the application-mode bootstrapping in the likes of DOSCALL1.DLL and NTDLL.DLL. They were Matt Pietrek's books on Windows 95 and Windows NT. No-one properly documented OS/2 DLLs in a book, especially the way that LIBPATHSTRICT changed them. * https://groups.google.com/d/msg/comp.os.os2.programmer.misc/Cu-WS91aqvk/bQOTFG_i7gsJ https://groups.google.com/d/msg/comp.os.os2.programmer.misc/... * https://groups.google.com/d/msg/comp.os.os2.programmer.misc/Cu-WS91aqvk/sIoF8sanzAMJ https://groups.google.com/d/msg/comp.os.os2.programmer.misc/...
- speedplane 8y agoMaybe I started programming professionally too late, but the memory saving you get from using a DLL never seemed worth the added complexity and and potential incompatiblity problems that invariably pop up. There are other decent uses for DLLs (plugins, Unix support like Cygwin), but saving memory seems terribly insignificant.
- palunon 8y agoThis is a often huge difference between programming for Unix-likes and Windows. With Windows, you tend to bundle your application with all of its dependencies in your installation folder... With traditional Unix developpement you often rely on your dependencies being installed on the target system by the package manager, and building against shared librairies is the norm. You don't need the complexity of Windows DLLs either, the toolchain handle most of the complexity
- dtornabene 8y agocurious how useful this would be given that the published date of the book is 2000 and this link is 1999. Serious question if anyone can answer it, I'm getting into lowlevel work lately and would appreciate the education if its still an accurate reflection of technique/technology.
- theoh 8y agoI bought a copy back then out of curiosity (as a Linux user). It's an excellent book, and I don't think many of the techniques described in it are out of date. Things like the ELF format still form the infrastructure for Linux binaries. There's a bit of historical info too, but IMO reading that is analogous to reading about a language like C — it's of central importance if you want to understand how and why these systems developed. So, I would recommend it.
- dtornabene 8y agothanks for taking the time to respond, much appreciated.