* Virtual address value in ELF file format...
@ 1999-05-27 10:12 Hyung Min SEO
1999-05-28 22:17 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: Hyung Min SEO @ 1999-05-27 10:12 UTC (permalink / raw)
To: 'glibc-linux@ricardo.ecn.wfu.edu', axp-list
Hi
I'm studying the ELF binary file format now.
The ELF binary file has the Program header table and it ( Elf64_Phdr
structure) contains p_vaddr member value.
How can I set the p_vaddr value in some ELF file?
And how can I get the virtual address for any physical address?
If I want the ELF file to load at physical address 0x416000, how can I get
virtual address?
Does many other ELF file has the virtual address? Is there not overlap each
other?
Thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Virtual address value in ELF file format...
1999-05-27 10:12 Virtual address value in ELF file format Hyung Min SEO
@ 1999-05-28 22:17 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 1999-05-28 22:17 UTC (permalink / raw)
To: axp-list, 'glibc-linux@ricardo.ecn.wfu.edu'
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~
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-05-28 23:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-05-27 10:12 Virtual address value in ELF file format Hyung Min SEO
1999-05-28 22:17 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox