Search code examples
linkerloader

Levine, Linkers and Loaders


I'm reading: Levine, Linkers and Loaders. On page 95, he says:

Module-A 0->600H
Module-B 0->400H
Module-C 0->500H

In single segment storage allocation surely this should be:

0-600 601-A01 A02-F03

? He says it's from 0-F00??? Basically he's just concatenating all the modules so..

I was wondering if someone could suggest a suitable book. I'm trying to understand linker symbol table, loader, link-editor, GOT/PLT and how the language fits in with all this.. to be precise.. if i have a bunch of functions&variables/c-file, how are they stored in the .obj, what does the .obj file contain (sections, segments) and how does this fit in with ELF and how does ELF fit in with paged memory.. I'm finding Levine hard to understand and very verbose.. he's got stuff on Pentium/SPARC/IBM/Motorola processors and it all seems a bit dated and ancient and incredibly frustrating.. I've tried looking at various wikipedia entries and googling but that's even worse! So far, the only decent "book" i've found is the Intel Software Developers Manual Vol 3, but that does not cover relocation and is much too advanced and detailed for a newbie - it's got stuff on SSE etc.

I use Linux, gcc, g++ so.. i just want a clear understanding of what all those mysterious thingies mean when you do a objdump/nm A modern day Levine, without the mistakes would be nice.. and it would be super if it covered the Microsoft PE format as well..

And i've tried the Intel SysV ABI which was excellent but it's not suitable for someone who's a newbie.


Solution

  • A modern day Levine, without the mistakes would be nice

    Ian Lance Taylor has recently implemented an ELF-only linker, and described it in a series of blog posts. They are definitely more focused and less verbose then Levine.