This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

Re: LMA access segfault on x86 PC


I am referring to this tutorial for linker file syntax http://www.math.utah.edu/docs/info/ld_3.html
Please refer to 'AT ( ldadr )' section in the URL.
Does that part apply only to MMU-less systems?

----- Original Message -----
From: Daniel Jacobowitz <drow@false.org>
Date: Wednesday, April 30, 2008 7:27 pm
Subject: Re: LMA access segfault on x86 PC
To: kishore_2005@dataone.in
Cc: binutils@sourceware.org


> On Wed, Apr 30, 2008 at 06:30:07PM +0500, kishore_2005@dataone.in wrote:
> > 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.
> 
> You can't do this in an environment with an MMU unless you manage the
> page mappings and protections yourself.  You will have to read up on
> mmap (MMAP_FIXED) to simulate it.
> 
> -- 
> Daniel Jacobowitz
> CodeSourcery


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