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: Regarding "Inconsistency detected by ld.so"


Not sure this problem is due to the new test segment added in the linker
script. tried with below command and shows ELF segment is not aligned
properly.

root@localhost:/root/test> /lib/ld-2.11.1.so --list ./testsample
./testsample: error while loading shared libraries: ./testsample: ELF load
command address/offset not properly aligned

...

After checking the below link, guess I'm into the same problem where I want
to relocate the mapped libc and ld by creating an illusion in linker script
that memory is mapped in the specific region.

http://sourceware.org/ml/libc-alpha/2012-02/msg00045.html


points: 

By default libc and ld are mapped to x-y (which is not TASK_UNMAPPED) and
now I've modified default linker script to add a new section (PT_LOAD) which
is mapped between x-y

x address is aligned after setting the location counter.

. =x;
. = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) &
(CONSTANT (MAXPAGESIZE) - 1));

-- 
Any pointers ?

Thanks in Advance.



--
View this message in context: http://sourceware-org.1504.n7.nabble.com/Regarding-Inconsistency-detected-by-ld-so-tp227752p227765.html
Sent from the Sourceware - binutils list mailing list archive at Nabble.com.


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