Bug 3133 - LDSO_STANDALONE_SUPPORT does not work on ARM
Summary: LDSO_STANDALONE_SUPPORT does not work on ARM
Status: RESOLVED FIXED
Alias: None
Product: uClibc
Classification: Unclassified
Component: Shared Library Support (show other bugs)
Version: 0.9.30.1
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: Carmelo Amoroso
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-25 12:25 UTC by Sven-Ola
Modified: 2011-03-03 08:26 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
Fix LDSO_STANDALONE_SUPPORT (494 bytes, patch)
2011-01-25 12:25 UTC, Sven-Ola
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven-Ola 2011-01-25 12:25:47 UTC
Created attachment 2875 [details]
Fix LDSO_STANDALONE_SUPPORT

I've added the LDSO_STANDALONE_SUPPORT patch posted on the uclibc-mailing-list in sept-2010. The patch should add the standalone-run feature to the ld-uClibc.so program (that is: specifiy a binary to run on the command line).

This does not work, because of a minor flaw in ldso/ldso/dl-elf.c. This is the scenario:

exec: ./lib/ld-uClibc.so.0 ./bin/busybox
call to _dl_load_elf_shared_library()
minvma value extracted from segment->p_vaddr (== 0x8000)
minvma &= ~0xffff (== set to zero)
mmap(zero, ..., MAP_FIXED) (== invalid from kernel)

This is at least true for Linux sgt 2.6.32.9 #1 Thu Nov 25 23:27:59 KST 2010 armv7l GNU/Linux (that is a Samsung-Galaxy-Tab mobile phone running Debian-Squeeze-Armel).

Attached Patch solves this -> needs sensible review by some ld.so wizard.
Comment 1 Carmelo Amoroso 2011-01-26 10:49:33 UTC
Thanks,
we will review it asap.
Comment 2 Carmelo Amoroso 2011-01-28 15:34:33 UTC
Hi,
the patch looks good. I'm wondering which is the value of the pagesize on you target.

Could you post a proper patch (git formatted, comment, signed-off) ? I'll ack it and commit.

thanks
Comment 3 Carmelo Amoroso 2011-03-03 08:26:38 UTC
Fixed in master.