Regarding "Inconsistency detected by ld.so"

Sakthi karthikeyan24s@hotmail.com
Mon Apr 8 16:27:00 GMT 2013
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.



More information about the Binutils mailing list