This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Consolidate object search in DSO in _dl_find_dso_for_object


On 02/15/2013 12:43 PM, Siddhesh Poyarekar wrote:
Hi,

As Carlos, suggested, here's a patch to consolidate the object search
loop in various places in current code into a separate function.
There are only 3 places where this consolidation is needed (4 with
__cxa_thread_atexit_impl); the other two have a completely different
logic.

Built and regression tested on x86_64. OK to commit?

Siddhesh

	* elf/Versions (ld): Add _dl_find_dso_for_object.
	* elf/dl-addr.c (_dl_addr): Use _dl_find_dso_for_object.
	* elf/dl-open.c (_dl_find_dso_for_object): New function.
	(dl_open_worker): Use _dl_find_dso_for_object.
	* elf/dl-sym.c (do_sym): Likewise.
	* sysdeps/generic/ldsodefs.h: Declare _dl_find_dso_for_object.

diff --git a/elf/Versions b/elf/Versions
index 87e27c5..97615de 100644
--- a/elf/Versions
+++ b/elf/Versions
@@ -62,5 +62,6 @@ ld {
      _dl_debug_state;
      # Pointer protection.
      __pointer_chk_guard;
+    _dl_find_dso_for_object;
    }
  }

The above should be alphabetically, so please add at the proper place.


I didn't review the rest properly, just wanted to point this one out,
Andreas
--
 Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]