Subject: Re: More on unusual N_TXTADDR() (TEXT)
To: None <tech-kern@sun-lamp.cs.berkeley.edu, cagney@highland.oz.au>
From: Paul Kranenburg <pk@cs.few.eur.nl>
List: tech-kern
Date: 06/17/1994 10:54:49
> 
> When LD reads in object files (because N_TXTADDR is 4k out) it defines
> the macro TEXT_START such that the 4k is subtracted.  Having done this,
> the code to manipulate relocations and symbols becomes easy.  Everything
> in the loaded object file again has a consistent base address.
>
This is not quite what is done in ld. N_TXTADDR() or TEXT_START() is never
applied to *input* object files. In stead, ld has a set of basic assumptions
on how to handle (relocatable) address references in them, which boils down
to this: all addresses are to be interpreted as referrring to locations as
if the object text segment was loaded at address 0 with the data segment
following immediately.


------------------------------------------------------------------------------