summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 16f7d16)
raw | patch | inline | side by side (parent: 16f7d16)
author | Iliyan Malchev <malchev@google.com> | |
Wed, 10 Feb 2010 23:19:37 +0000 (15:19 -0800) | ||
committer | Iliyan Malchev <malchev@google.com> | |
Thu, 11 Feb 2010 03:14:35 +0000 (19:14 -0800) |
-- 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>
-- 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>
linker/linker.c | patch | blob | history |
diff --git a/linker/linker.c b/linker/linker.c
index d61d0d7f99e93958ad6f698de0d2bc204c8ff4b0..40fdbab6bae368c4d92fb864b18f10b448f220f6 100644 (file)
--- a/linker/linker.c
+++ b/linker/linker.c
#endif
-/* Set up for the buddy allocator managing the prelinked libraries. */
-static struct ba_bits ba_prelink_bitmap[(LIBLAST - LIBBASE) / LIBINC];
-static struct ba ba_prelink = {
+/* Set up for the buddy allocator managing the non-prelinked libraries. */
+static struct ba_bits ba_nonprelink_bitmap[(LIBLAST - LIBBASE) / LIBINC];
+static struct ba ba_nonprelink = {
.base = LIBBASE,
.size = LIBLAST - LIBBASE,
.min_alloc = LIBINC,
/* max_order will be determined automatically */
- .bitmap = ba_prelink_bitmap,
- .num_entries = sizeof(ba_prelink_bitmap)/sizeof(ba_prelink_bitmap[0]),
+ .bitmap = ba_nonprelink_bitmap,
+ .num_entries = sizeof(ba_nonprelink_bitmap)/sizeof(ba_nonprelink_bitmap[0]),
};
static inline int validate_soinfo(soinfo *si)
for it from the buddy allocator, which manages the area between
LIBBASE and LIBLAST.
*/
- si->ba_index = ba_allocate(&ba_prelink, si->size);
+ si->ba_index = ba_allocate(&ba_nonprelink, si->size);
if(si->ba_index >= 0) {
- si->base = ba_start_addr(&ba_prelink, si->ba_index);
+ si->base = ba_start_addr(&ba_nonprelink, si->ba_index);
PRINT("%5d mapping library '%s' at %08x (index %d) " \
"through buddy allocator.\n",
pid, si->name, si->base, si->ba_index);
if (reserve_mem_region(si) < 0) {
- ba_free(&ba_prelink, si->ba_index);
+ ba_free(&ba_nonprelink, si->ba_index);
si->ba_index = -1;
si->base = 0;
goto err;
/* Now actually load the library's segments into right places in memory */
if (load_segments(fd, &__header[0], si) < 0) {
if (si->ba_index >= 0) {
- ba_free(&ba_prelink, si->ba_index);
+ ba_free(&ba_nonprelink, si->ba_index);
si->ba_index = -1;
}
goto fail;
PRINT("%5d releasing library '%s' address space at %08x "\
"through buddy allocator.\n",
pid, si->name, si->base);
- ba_free(&ba_prelink, si->ba_index);
+ ba_free(&ba_nonprelink, si->ba_index);
}
notify_gdb_of_unload(si);
free_info(si);
vecs += 2;
}
- ba_init(&ba_prelink);
+ ba_init(&ba_nonprelink);
si->base = 0;
si->dynamic = (unsigned *)-1;