summaryrefslogtreecommitdiffstats
path: root/linker
Commit message (Collapse)AuthorAgeFilesLines
* bionic: linker: add error message if link failed due to previous errorErik Gilling2009-08-131-1/+4
| | | | Signed-off-by: Erik Gilling <konkers@android.com>
* bionic/linker: keep track of opened libraries by basenameandroid-sdk-tools_r2android-sdk-1.6_r2android-sdk-1.6_r1android-sdk-1.6-docs_r1android-1.6_r2android-1.6_r1.5android-1.6_r1.4android-1.6_r1.3android-1.6_r1.2android-1.6_r1.1android-1.6_r1Erik Gilling2009-07-281-2/+6
| | | | | | | | | | | | | | | | | | | | | | | Prior to this change, the dynamic loader kept track of opened libraries either by their base name (i.e., libfoo.so instead of /system/lib/libfoo.so) when the shared library was loaded through the DT_NEEDED tag in an ELF header, or by whatever name was passed to dlopen(). This created a number of problems, among which: 1. dlopen("libfoo.so") and dlopen("/path/to/libfoo.so") would open the same library twice; 2. dlopen("/path/to/libfoo.so") and then dlopen("libbar.so"), where libbar.so depends on libfoo.so, would open libfoo.so twice. This patch makes the dynamic loader keep track of each loaded library by basename, which resolves the above ambiguity. The patch also enforces library lookup by base name, which means that it will refuse to load another library that has the same name. Thanks for the inspiration Iliyan. Signed-off-by: Erik Gilling <konkers@android.com> Cc: Iliyan Malchev <malchev@google.com>
* linker: remove newlines from DL_ERR so that dlerror works correctlyErik Gilling2009-07-221-34/+34
| | | | Signed-off-by: Erik Gilling <konkers@android.com>
* Pass the elfdata pointer in a slot of the temporary TLS area.David 'Digit' Turner2009-07-171-7/+14
| | | | | | | | | | | | | | | | This is needed to properly initialize the C runtime when libc.so is loaded by the dynamic linker. Move the temporary TLS setup before the first system call, just in case something really horrible happens, we won't crash when trying to write an error code in 'errno' Remove the broken TLS_SLOT_THREAD_ID setup. First, this slot should normally receive the address of a pthread_internal_t, not a kernel thread identifier. Second, it is never used by the linker anyway. Also remove an obsolete comment.
* Add LD_LIBRARY_PATH support to bionic's linkerDavid Bartley2009-06-151-4/+52
|
* linker: Give more context for failures during library dependency resolution.Dima Zavin2009-06-011-1/+4
| | | | Signed-off-by: Dima Zavin <dima@android.com>
* linker: Make the errors reported by dlopen/dlsym be more useful.Dima Zavin2009-05-275-67/+106
| | | | | | | | | | | | | Changed it so that when the linker generates error messages, they are scribbled away into a buffer that dlfcn and friends can read from. Since the error messages are generetad with snprintf, and snprintf MAY call malloc during some code paths, we now link against a version of libc that does not contain malloc/free/realloc/calloc. We then define malloc and friends in the dynamic loader, and make them abort() if they are ever called. Signed-off-by: Dima Zavin <dima@android.com>
* Fix the parsing of the .fini_array in the dynamic linker (it should happen ↵David 'Digit' Turner2009-05-262-24/+148
| | | | | | | in reverse order). Also add a small design overview document for the linker. The latter contains details on how the initialization/finalization is supposed to work.
* linker: Compute symbol name before lookup so we can also use it for error msgDima Zavin2009-05-121-2/+2
| | | | Signed-off-by: Dima Zavin <dima@android.com>
* Increase the limit of loaded shared libraries from 64 to 96 This change is ↵James Dong2009-04-301-1/+1
| | | | | | required for OpenCORE 2.0 This is the same as Change 71 in master branch.
* Automated import from //branches/donutburger/...@140950,140950Iliyan Malchev2009-03-241-15/+38
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-0313-0/+3026
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-0311-2802/+0
|
* auto import from //depot/cupcake/@132589The Android Open Source Project2009-03-036-306/+82
|
* auto import from //depot/cupcake/@137055The Android Open Source Project2009-03-026-82/+306
|
* auto import from //branches/cupcake/...@132276The Android Open Source Project2009-02-191-3/+15
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-107-1/+199
|
* auto import from //branches/cupcake/...@126645The Android Open Source Project2009-01-152-1/+7
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-173-22/+40
|
* Initial Contributionandroid-1.0The Android Open Source Project2008-10-2111-0/+2568