This is the mail archive of the glibc-linux@ricardo.ecn.wfu.edu mailing list for the glibc project.


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

Re: Virtual address value in ELF file format...


On Thu, May 27, 1999 at 07:12:25PM +0900, Hyung Min SEO wrote:
> How can I set the p_vaddr value in some ELF file?

With a linker script laying out the sections.

> And how can I get the virtual address for any physical address?

You can't in general.  What are you really asking?

> If I want the ELF file to load at physical address 0x416000, how can I get
> virtual address?

I presume you are tring to do MILO-ish sort of loading things?
In which case you know the mapping from virtual to physical in
that environment and arrange things appropriately.

There is a provision for setting separate virtual and physical
load points, but this is only useful for writing ROMs.

See http://www.cygnus.com/pubs/gnupro/5_ut/b_Usingld/ldLinker_scripts.html
for a good explanation of how to use linker scripts.


r~

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