This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH BFD section load page support


In general, the linker uses the memory pages when allocating sections in
memory; two sections targeted for different memory pages may have the same
memory address (which is usually how vma allocation works).  Run-time (vma)
pages are ignored by the linker since they don't really matter until runtime;
the lma pages are what is stored (load_page) with each section so that A)
they can be put in the appropriate location (or omitted) when building a ROM
image or B) put in the appropriate place by a run-time loader or debugger.

Typical usage has page 0 correspond to PROG space on TI devices, and page 1
to DATA space (the 'c54x and several other chips have a dual, orthogonal
address space).  Up to 256 distinct pages are allowed;  typically target
designs provide a method for switching among pages.

The TI COFF output stores a "memory page" field in the section header; there
is no documentation and the interpretation as the "load-time page" of the
section comes from examining how it is actually used by TI's tools

Any of you other TI hackers have more comment on this?.

Tim

Ian Lance Taylor wrote:

>    Date: Fri, 14 Jan 2000 15:46:01 +0000
>    From: Timothy Wall <twall@domesolutions.com>
>
>    The linker manipulates sections based on the load page.  It would be
>    rather difficult to conditionally handle load page directives in linker
>    scripts only if the output type is a variation of TI COFF.
>
> We might be able to add a new BFD entry point, or simply a new BFD
> function along the lines of bfd_get_gp_size, or the various weird
> functions declared near the bottom of bfd-in.h.  That would be cheaper
> overall than adding a field to asection.
>
> Can you describe what the linker does based on load pages?
>
> The general principle of BFD is to put general information in generic
> structures and specific information in specific structures.  The load
> page sounds to me like specific information, so I would prefer to keep
> it out of the generic structures.
>
> Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]