summaryrefslogtreecommitdiffstats
path: root/linker
Commit message (Collapse)AuthorAgeFilesLines
* bionic: Adjust stack and linker based on target specific VM splitNaseer Ahmed2010-07-062-1/+10
| | | | Change-Id: I37784401c505f7678a550dd0e5e88fcf4235de8f
* merge from open-source masterThe Android Open Source Project2010-03-223-14/+86
|\ | | | | | | Change-Id: I70266ee8c520b216773f267e46c8273d2334c31d
| * Added support for dladdr()Matt Fischer2010-03-173-14/+86
| | | | | | | | | | | | | | | | dladdr() is a GNU extension function, which allows the caller to retrieve symbol information for a specified memory address. It is useful for things like generating backtrace information at runtime. Change-Id: I3a1def1a6c9c666d93e1e97b7d260dfa5b9b79a9
| * am fe62de1a: Add support for R_ARM_REL32 to the dynamic linker.David 'Digit' Turner2009-12-022-6/+14
| |\ | | | | | | | | | | | | | | | | | | Merge commit 'fe62de1ad036a1417df44b7b1a7c65cc79dc7091' into eclair-plus-aosp * commit 'fe62de1ad036a1417df44b7b1a7c65cc79dc7091': Add support for R_ARM_REL32 to the dynamic linker.
| | * Add support for R_ARM_REL32 to the dynamic linker.David 'Digit' Turner2009-12-022-6/+14
| | | | | | | | | | | | Merged from eclair-mr2
| * | merge from open-source masterJean-Baptiste Queru2009-11-085-4/+224
| |\ \
| * \ \ am 763ac283: Merge changes Ibcba4b4f,I9af341e1 into eclairIliyan Malchev2009-10-233-61/+70
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | Merge commit '763ac28357f604e0e4196e0a7ad5b0f5cdcf274a' into eclair-plus-aosp * commit '763ac28357f604e0e4196e0a7ad5b0f5cdcf274a': bionic/linker: make the buddy allocator compute max_order on its own bionic/linker: change the buddy allocator to take a handle to the managed area
| * | | am ff7b46b8: Merge change I3c998761 into eclairDavid 'Digit' Turner2009-10-161-3/+7
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge commit 'ff7b46b87c4d85881d88c2105a94be6c6accb628' into eclair-plus-aosp * commit 'ff7b46b87c4d85881d88c2105a94be6c6accb628': Allow the dynamic linker to relocate references to thumb symbols in NDK libraries.
* | | | | Fix debug output in the dynamic linker.David 'Digit' Turner2010-02-117-15/+809
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides a mini-printf implementation that reduces the size of the dynamic linker by 25 KB, by preventing the drag of formatting-related routines from the C library. Also allow traces to be sent to the log, instead of stdout. NOTE: You now need to modify Android.mk to enable/disable debug output.
* | | | | bionic/linker: rename ba_prelink to ba_nonprelinkIliyan Malchev2010-02-101-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- fixes b/2432550 -- ba_prelink is used to manage non-prelinked libraries, hence ba_nonprelink is a more appropriate name for it Signed-off-by: Iliyan Malchev <malchev@google.com>
* | | | | Fix typo in a comment.Doug Kwan2010-01-251-1/+1
| | | | |
* | | | | Align TEXT section to 4K boundary so that we can use both ld and gold.Doug Kwan2010-01-251-1/+6
| | | | |
* | | | | Use correct TLS codepath for linkerGary King2010-01-121-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replicate ARM libc build's HAVE_ARM_TLS_REGISTER preprocessor definition logic, to ensure that the runtime linker uses the correct codepath for accessing the TLS address
* | | | | am ebf3ea00: am 34ea5117: Add support for R_ARM_REL32 to the dynamic linker.David 'Digit' Turner2009-11-172-6/+14
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge commit 'ebf3ea006e5367fff93d2491eec24c4b1a633805' * commit 'ebf3ea006e5367fff93d2491eec24c4b1a633805': Add support for R_ARM_REL32 to the dynamic linker.
| * \ \ \ \ am 34ea5117: Add support for R_ARM_REL32 to the dynamic linker.David 'Digit' Turner2009-11-172-6/+14
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge commit '34ea5117dbeba41ae5dfdfb2c2ec8cae23388b66' into eclair-mr2-plus-aosp * commit '34ea5117dbeba41ae5dfdfb2c2ec8cae23388b66': Add support for R_ARM_REL32 to the dynamic linker.
| | * | | | | Add support for R_ARM_REL32 to the dynamic linker.David 'Digit' Turner2009-11-172-6/+14
| | | | | | |
* | | | | | | am 83362689: merge from open-source masterJean-Baptiste Queru2009-11-095-4/+224
|\ \ \ \ \ \ \ | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge commit '83362689f5b1f6393d376d242fe29541b63ead2d' * commit '83362689f5b1f6393d376d242fe29541b63ead2d': added and modified linker to support SuperH architecture Add the BSD sys_signame array. added and modified bionic code to support SuperH architecture
| * | | | | | merge from open-source masterJean-Baptiste Queru2009-11-095-4/+224
| |\ \ \ \ \ \ | | | |_|_|_|/ | | |/| | | |
| | * | | | | added and modified linker to support SuperH architectureShin-ichiro KAWASAKI2009-11-065-4/+224
| | | | | | |
* | | | | | | Add weak symbol support. Also fix a bug caused by a typo.Doug Kwan2009-10-261-21/+71
| | | | | | |
* | | | | | | am 9e78de3e: am 70bba516: am 763ac283: Merge changes Ibcba4b4f,I9af341e1 ↵Iliyan Malchev2009-10-233-61/+70
|\ \ \ \ \ \ \ | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into eclair Merge commit '9e78de3e3c90ec3c2970431d8eae7378fdc0dac6' * commit '9e78de3e3c90ec3c2970431d8eae7378fdc0dac6': bionic/linker: make the buddy allocator compute max_order on its own bionic/linker: change the buddy allocator to take a handle to the managed area
| * | | | | | am 70bba516: am 763ac283: Merge changes Ibcba4b4f,I9af341e1 into eclairIliyan Malchev2009-10-233-61/+70
| |\ \ \ \ \ \ | | | |/ / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge commit '70bba5160f83ecd6251c4539f747ae39e9ed469c' into eclair-mr2-plus-aosp * commit '70bba5160f83ecd6251c4539f747ae39e9ed469c': bionic/linker: make the buddy allocator compute max_order on its own bionic/linker: change the buddy allocator to take a handle to the managed area
| | * | | | | am 763ac283: Merge changes Ibcba4b4f,I9af341e1 into eclairIliyan Malchev2009-10-233-61/+70
| | |\ \ \ \ \ | | | | |_|_|/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge commit '763ac28357f604e0e4196e0a7ad5b0f5cdcf274a' into eclair-mr2 * commit '763ac28357f604e0e4196e0a7ad5b0f5cdcf274a': bionic/linker: make the buddy allocator compute max_order on its own bionic/linker: change the buddy allocator to take a handle to the managed area
| | | * | | | bionic/linker: make the buddy allocator compute max_order on its ownIliyan Malchev2009-10-192-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Iliyan Malchev <malchev@google.com>
| | | * | | | bionic/linker: change the buddy allocator to take a handle to the managed areaIliyan Malchev2009-10-193-62/+64
| | | | |_|/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- rename struct ba_info to struct ba -- move the static ba descriptor from ba.c to linker.c and rename it ba_prelink -- ba_init, ba_allocate, ba_free, ba_start_addr, and ba_len all take a pointer to struct ba Signed-off-by: Iliyan Malchev <malchev@google.com>
* | | | | | Clean up some linker code.Doug Kwan2009-10-231-23/+14
|/ / / / /
* | | | | am eeaf6544: Merge change I7934a799 into eclair-mr2David 'Digit' Turner2009-10-191-3/+14
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | Merge commit 'eeaf6544b676f68ccdd70a3fa78f44789a1bf69c' into eclair-mr2-plus-aosp * commit 'eeaf6544b676f68ccdd70a3fa78f44789a1bf69c': Prevent spurious EINTR to freeze process debugging
| * | | | Merge change I7934a799 into eclair-mr2Android (Google) Code Review2009-10-191-3/+14
| |\ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | * changes: Prevent spurious EINTR to freeze process debugging
| | * | | Prevent spurious EINTR to freeze process debuggingDavid 'Digit' Turner2009-10-161-3/+14
| | | | |
* | | | | am 8213d5c3: am ff7b46b8: Merge change I3c998761 into eclairDavid 'Digit' Turner2009-10-161-3/+7
|\ \ \ \ \ | |/ / / / | | | | / | |_|_|/ |/| | | | | | | | | | | Merge commit '8213d5c3c072b23f5cc1922d232efe7338091d9b' into eclair-mr2-plus-aosp * commit '8213d5c3c072b23f5cc1922d232efe7338091d9b': Allow the dynamic linker to relocate references to thumb symbols in NDK libraries.
| * | | Allow the dynamic linker to relocate references to thumb symbols in NDK ↵David 'Digit' Turner2009-10-131-3/+7
| |/ / | | | | | | | | | | | | | | | | | | libraries. The lowest bit of the symbol's value should be ignored when looking at UNDEF symbols for correctness. It is used as an ARM/Thumb flag by the linker.
* | | merge from open-source masterJean-Baptiste Queru2009-10-141-0/+1
|\ \ \ | |/ / |/| / | |/
| * Fill l_ld of linkmaps with value from soinfo::dynamic.Thinker K.F Li2009-09-151-0/+1
| | | | | | | | | | | | | | GDB will try to read l_ld of linkmaps and compare the value to vma of .dynamic sections from shared objects. Since linker does not assign l_ld, GDB will complain about and re-compute l_addr from l_ld. And, GDB will get a wrong value.
* | bionic/linker: allow resolving of symbols from library back to executableIliyan Malchev2009-09-291-0/+25
| | | | | | | | Signed-off-by: Iliyan Malchev <malchev@google.com>
* | bionic/linker: change lookup() to return soinfo, not baseIliyan Malchev2009-09-293-9/+9
| |
* | Revert "Revert "bionic/linker: fix symbol lookup during relocations""Iliyan Malchev2009-09-291-26/+74
| | | | | | | | This reverts commit 33acbf0719c4f3db059bc9e1f52cf554a5d0295f.
* | Revert "bionic/linker: fix symbol lookup during relocations"Mathias Agopian2009-09-271-74/+26
| | | | | | | | This reverts commit 8d0c0334f1106d36f2fd5c1cf6d5dc75a4b88850.
* | bionic/linker: fix symbol lookup during relocationsIliyan Malchev2009-09-271-26/+74
| | | | | | | | | | | | | | | | | | When resolving relocations while loading a library, the linker used to find symbols by looking them up in the list of all linked libraries for the current process, as opposed to following just the library's DT_NEEDED entries. This can cause a problem where the symbol is picked up from the wrong library. Signed-off-by: Iliyan Malchev <malchev@google.com>
* | 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
|