From 0bc1394750885d4e4b2064aff6c48dd542c6f4b8 Mon Sep 17 00:00:00 2001 From: Leonid Lisovskiy Date: Mon, 20 Jun 2016 20:29:44 +0300 Subject: ldso: Consistently set & use DL_OPENED flag in both ld.so and libdl Previously, DL_OPENED flag was set in libdl only and never used. Set it centralized in _dl_load_elf_shared_library() & use it in both ld.so and libdl. Additionally, rename it to DL_OPENED2 for clarity. Signed-off-by: Leonid Lisovskiy --- ldso/ldso/dl-elf.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ldso/ldso/dl-elf.c') diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c index 04e8c60a4..8f71aeb05 100644 --- a/ldso/ldso/dl-elf.c +++ b/ldso/ldso/dl-elf.c @@ -546,6 +546,7 @@ struct elf_resolve *_dl_load_elf_shared_library(unsigned int rflags, if (tpnt->st_dev == st.st_dev && tpnt->st_ino == st.st_ino) { /* Already loaded */ tpnt->usage_count++; + tpnt->init_flag |= DL_OPENED2; _dl_close(infile); return tpnt; } -- cgit v1.2.3