This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Regarding "Inconsistency detected by ld.so"
- From: Alan Modra <amodra at gmail dot com>
- To: Sakthi <karthikeyan24s at hotmail dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 11 Apr 2013 13:40:21 +0930
- Subject: Re: Regarding "Inconsistency detected by ld.so"
- References: <1365433766502-227752 dot post at n7 dot nabble dot com> <1365438468344-227765 dot post at n7 dot nabble dot com> <1365513485443-227891 dot post at n7 dot nabble dot com> <20130410021312 dot GB24281 at bubble dot grove dot modra dot org> <1365583712046-228020 dot post at n7 dot nabble dot com>
On Wed, Apr 10, 2013 at 01:48:32AM -0700, Sakthi wrote:
> In Short :
>
> I've one standalone application (32 - Bit) for which need contiguous memory
> layout. Due to the shared libraries falling in a place (libc @0fe40000 and
> ld @0ffc0000) which blocks us from using contiguous memory.
>
> I tried certain things with prelink tool to relocate those libraries and
> able to successfully to relocate in expected place. But, I like to achieve
> the same thing using linker script.
OK, now I think I see what you're trying to do. You're trying to
reserve the address space of interest in your (non-pie) executable,
and get a PT_LOAD header but haven't put any contents in your fake
section so get zeros for p_vaddr etc. Try the following.
TSTSTART = 0x0f850000;
.tststart TSTSTART : ALIGN (0x10000)
{
. = 0x23456;
} :tststart
Replace the 0x23456 with the length you need.
--
Alan Modra
Australia Development Lab, IBM