summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2007-11-16 14:32:35 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2007-11-16 14:32:35 +0000
commita6eef2edb3dada9ee1a0765dd7901d0a988f30ce (patch)
tree64010526390195481e6443108fc862064b651915 /libc
parente130b681c43ee2215512ffcf6cadcbc4487e96e6 (diff)
If uClibc's ld.so encounters text relocations in a shared library - one
containing an object built without -fpic/-fPIC - then: * If __FORCE_SHAREABLE_TEXT_SEGMENTS__, then it gives an error "Can't modify %s's text section. Use GCC option -fPIC for shared objects, please.\n" and exits. * Otherwise, it makes the library's pages writable and relocates it. If it encounters text relocations in a position-independent executable - one containing an object built without -fpie/-fPIE/-fpic/-fPIC - then: * If __FORCE_SHAREABLE_TEXT_SEGMENTS__, it does nothing about making the pages writable, leading to a crash. * Otherwise, the loop to make the pages writable uses the same variable ppnt as used in an outer loop, messing up that outer loop and also causing a crash. This patch fixes both cases, by giving an error if __FORCE_SHAREABLE_TEXT_SEGMENTS__ and saving and restoring ppnt otherwise. Tested in both cases on ARM EABI. Joseph S. Myers joseph@codesourcery.com
Diffstat (limited to 'libc')
0 files changed, 0 insertions, 0 deletions