public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: "Yihan Dang" <qcloud1223@qq.com>
To: "Florian Weimer" <fweimer@redhat.com>
Cc: libc-help <libc-help@sourceware.org>
Subject: Re: Can I use printf in dl-load.c?
Date: Thu, 14 Jan 2021 16:31:52 +0800	[thread overview]
Message-ID: <tencent_4D82F68995112E982847EA989F8D28302007@qq.com> (raw)
In-Reply-To: <87k0sgrkv2.fsf@oldenburg2.str.redhat.com>

Hi Florian,&nbsp;
Thank you very much for your reply!


I've checked ldsodefs.h and found _dl_printf there. I guess using functions in stdio.h may cause some problems so there is a seperate printf here.


Also, I did not find any function related to scanf in ldsodefs.h, does that mean there is no way to achieve the similar functionality?


Thank you in advance,
Yihan

---Original---
From: "Florian Weimer"<fweimer@redhat.com&gt;
Date: Thu, Jan 14, 2021 16:19 PM
To: "Yihan Dang via Libc-help"<libc-help@sourceware.org&gt;;
Cc: "Yihan Dang"<qcloud1223@qq.com&gt;;
Subject: Re: Can I use printf in dl-load.c?


* Yihan Dang via Libc-help:

&gt; I'm trying to use printf to get maplength in
&gt; dl-load.c:_dl_map_object_from_fd, and this is how the code looks like:

You need to use _dl_printf.&nbsp; Please note that it does not support all
formatting directives.

Thanks,
Florian
-- 
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill

  reply	other threads:[~2021-01-14  8:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14  7:04 Yihan Dang
2021-01-14  8:19 ` Florian Weimer
2021-01-14  8:31   ` Yihan Dang [this message]
2021-01-14  9:08     ` Florian Weimer

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=tencent_4D82F68995112E982847EA989F8D28302007@qq.com \
    --to=qcloud1223@qq.com \
    --cc=fweimer@redhat.com \
    --cc=libc-help@sourceware.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).