From: Mark Hatle <mark.hatle@windriver.com>
To: <maninder1.s@samsung.com>
Cc: "v.narang@samsung.com" <v.narang@samsung.com>,
"yocto@yoctoproject.org" <yocto@yoctoproject.org>,
AJEET YADAV <ajeet.y@samsung.com>
Subject: Re: [prelink-cross] [PATCH 1/1] debug-for-missing-loader-and-libc
Date: Mon, 6 Apr 2015 10:55:30 -0500 [thread overview]
Message-ID: <5522AC72.2070101@windriver.com> (raw)
In-Reply-To: <1789275301.445341428309468219.JavaMail.weblogic@epmlwas01c>
On 4/6/15 3:37 AM, Maninder Singh wrote:
> Hi,
>
> During cross prelink if we miss out ld-linux.so.* or libc.so.* It prints below info:
> ./prelink: /test_binary: Could not parse `prelink-rtld: dl-version.c:219: rtld_check_map_versions:
> Assertion `needed != ((void *)0)' failed.'
>
> And thus we miss actual cause for this failure, by this patch we will know failure reason.
> ./prelink: /test_binary: Could not parse `./prelink-rtld: error while loading shared libraries: ld-linux.so.3'
> (In this case ld-linux.so.3 was missing)
>
> Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
> Signed-off-by: Vaneet Narang <v.narang@samsung.com>
> Reviewed-by: Ajeet Yadav <ajeet.v@samsung.com>
> Reviewed-by: Geon-ho Kim <gh007.kim@samsung.com>
> ---
> src/rtld/dl-version.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
> diff --git a/src/rtld/dl-version.c b/src/rtld/dl-version.c
> index e4040a6..eb62943 100644
> --- a/src/rtld/dl-version.c
> +++ b/src/rtld/dl-version.c
> @@ -216,6 +216,12 @@ _dl_check_map_versions (struct ldlibs_link_map *map, int verbose, int trace_mode
> /* If NEEDED is NULL this means a dependency was not found
> and no stub entry was created. This should never happen. */
> + if(needed == NULL)
> + {
> + _dl_signal_error (errval, NULL, NULL, strtab + ent->vn_file);
> + printf("error while loading shared libraries: %s", strtab + ent->vn_file);
> + exit(0);
I'm likely to change this to an exit 1. As I want to make sure that any
failures have a non 0 return code.
I believe the assert is in the original rtld code, but I'll check that and
remove it if it's something I added.
--Mark
> + }
> assert (needed != NULL);
> /* Make sure this is no stub we created because of a missing
> --
> 1.7.1
>
> And also if it is ok we can remove this one --- assert (needed != NULL);
> because we are using exit(0) for (needed==NULL)
>
> Thanks,
> Maninder Singh
>
next prev parent reply other threads:[~2015-04-06 15:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-06 8:37 [prelink-cross] [PATCH 1/1] debug-for-missing-loader-and-libc Maninder Singh
2015-04-06 15:55 ` Mark Hatle [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-04-06 8:29 [prelink-cross][PATCH " Maninder Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5522AC72.2070101@windriver.com \
--to=mark.hatle@windriver.com \
--cc=ajeet.y@samsung.com \
--cc=maninder1.s@samsung.com \
--cc=v.narang@samsung.com \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.