This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: LMA access segfault on x86 PC
I am running a sample C program to test memory overlay on Redhat GNU/Linux.
I want to overlay 2 sections at the same Virtual address.
They will have different load address. So I need to copy the section data
from Load address to Virtual address at runtime.
Here if I try to access the Virtual address I get Segmentation fault.
I hope I am making it clear.
----- Original Message -----
From: Daniel Jacobowitz <drow@false.org>
Date: Wednesday, April 30, 2008 6:19 pm
Subject: Re: LMA access segfault on x86 PC
To: kishore_2005@dataone.in
Cc: binutils@sourceware.org
> On Wed, Apr 30, 2008 at 11:30:21AM +0500, kishore_2005@dataone.in wrote:
> > I am trying to get overlay working with gcc on x86 PC.
> > In the linker file, section command I have added the following lines.
>
> What is the PC running? Most operating systems load user programs at
> their virtual address, not their load address.
>
> --
> Daniel Jacobowitz
> CodeSourcery