public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
* Why there are serval different versions related to GLIBC when dumping the symbols of a program by nm whereas the program is built with GLIBC_2.23?
@ 2020-08-17  1:46 孙世龙 sunshilong
  2020-09-02 18:37 ` Adhemerval Zanella
  0 siblings, 1 reply; 4+ messages in thread
From: 孙世龙 sunshilong @ 2020-08-17  1:46 UTC (permalink / raw)
  To: 孙世龙 sunshilong via Libc-help

Hi, list

Why there are serval different versions related to GLIBC when dumping
the symbols of a program by nm whereas the program is built with
GLIBC_2.23?

Here are the dumping symbols:
nm ./test1 | grep -i glibc
                 U drand48@@GLIBC_2.2.5
                 U exit@@GLIBC_2.2.5
                 U __fprintf_chk@@GLIBC_2.3.4
                 U gettimeofday@@GLIBC_2.2.5
                 U __libc_start_main@@GLIBC_2.2.5
                 U malloc@@GLIBC_2.2.5
                 U __printf_chk@@GLIBC_2.3.4
                 U sqrt@@GLIBC_2.2.5
                 U __stack_chk_fail@@GLIBC_2.4
00000000006020c0 B stderr@@GLIBC_2.2.5

Here shows
dpkg -l libc6
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                              Version
Architecture          Description
+++-=================================-=====================-=====================-========================================================================
ii  libc6:amd64                       2.23-0ubuntu11        amd64
           GNU C Library: Shared libraries

I would be grateful to have some help with this question.
Thank you for your attention to this matter.
Sunshilong

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Why there are serval different versions related to GLIBC when dumping the symbols of a program by nm whereas the program is built with GLIBC_2.23?
  2020-08-17  1:46 Why there are serval different versions related to GLIBC when dumping the symbols of a program by nm whereas the program is built with GLIBC_2.23? 孙世龙 sunshilong
@ 2020-09-02 18:37 ` Adhemerval Zanella
  2020-09-03  0:56   ` 孙世龙 sunshilong
  0 siblings, 1 reply; 4+ messages in thread
From: Adhemerval Zanella @ 2020-09-02 18:37 UTC (permalink / raw)
  To: 孙世龙 sunshilong, libc-help



On 16/08/2020 22:46, 孙世龙 sunshilong via Libc-help wrote:
> Hi, list
> 
> Why there are serval different versions related to GLIBC when dumping
> the symbols of a program by nm whereas the program is built with
> GLIBC_2.23?
> 
> Here are the dumping symbols:
> nm ./test1 | grep -i glibc
>                  U drand48@@GLIBC_2.2.5
>                  U exit@@GLIBC_2.2.5
>                  U __fprintf_chk@@GLIBC_2.3.4
>                  U gettimeofday@@GLIBC_2.2.5
>                  U __libc_start_main@@GLIBC_2.2.5
>                  U malloc@@GLIBC_2.2.5
>                  U __printf_chk@@GLIBC_2.3.4
>                  U sqrt@@GLIBC_2.2.5
>                  U __stack_chk_fail@@GLIBC_2.4
> 00000000006020c0 B stderr@@GLIBC_2.2.5
>

This is the initial version when the symbol was added.  And it can vary
for different architectures (with different baseline versions).

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Why there are serval different versions related to GLIBC when dumping the symbols of a program by nm whereas the program is built with GLIBC_2.23?
  2020-09-02 18:37 ` Adhemerval Zanella
@ 2020-09-03  0:56   ` 孙世龙 sunshilong
  2020-09-03 10:47     ` Adhemerval Zanella
  0 siblings, 1 reply; 4+ messages in thread
From: 孙世龙 sunshilong @ 2020-09-03  0:56 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: libc-help

Hi,

Thank you for the clarification.

>This is the initial version when the symbol was added.  And it can vary
>for different architectures (with different baseline versions).

So, __printf_chk is not supported before GLIBC_2.2.4.
Can I draw this conclusion?

But I am amazed that malloc is not supported before GLIBC_2.2.5.
As far as I know, malloc is a very basic API.
So I think it is supported by the very beginning version of GLIBC.

If there is something wrong, please let me know.

Thank you for your attention to my question.

Best regards
Sunshilong

On Thu, Sep 3, 2020 at 2:37 AM Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
>
>
> On 16/08/2020 22:46, 孙世龙 sunshilong via Libc-help wrote:
> > Hi, list
> >
> > Why there are serval different versions related to GLIBC when dumping
> > the symbols of a program by nm whereas the program is built with
> > GLIBC_2.23?
> >
> > Here are the dumping symbols:
> > nm ./test1 | grep -i glibc
> >                  U drand48@@GLIBC_2.2.5
> >                  U exit@@GLIBC_2.2.5
> >                  U __fprintf_chk@@GLIBC_2.3.4
> >                  U gettimeofday@@GLIBC_2.2.5
> >                  U __libc_start_main@@GLIBC_2.2.5
> >                  U malloc@@GLIBC_2.2.5
> >                  U __printf_chk@@GLIBC_2.3.4
> >                  U sqrt@@GLIBC_2.2.5
> >                  U __stack_chk_fail@@GLIBC_2.4
> > 00000000006020c0 B stderr@@GLIBC_2.2.5
> >
>
> This is the initial version when the symbol was added.  And it can vary
> for different architectures (with different baseline versions).

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Why there are serval different versions related to GLIBC when dumping the symbols of a program by nm whereas the program is built with GLIBC_2.23?
  2020-09-03  0:56   ` 孙世龙 sunshilong
@ 2020-09-03 10:47     ` Adhemerval Zanella
  0 siblings, 0 replies; 4+ messages in thread
From: Adhemerval Zanella @ 2020-09-03 10:47 UTC (permalink / raw)
  To: 孙世龙 sunshilong; +Cc: libc-help



On 02/09/2020 21:56, 孙世龙 sunshilong wrote:
> Hi,
> 
> Thank you for the clarification.
> 
>> This is the initial version when the symbol was added.  And it can vary
>> for different architectures (with different baseline versions).
> 
> So, __printf_chk is not supported before GLIBC_2.2.4.
> Can I draw this conclusion?

I think you meant GLIBC_2.3.4 and it is version the symbol was added.

> 
> But I am amazed that malloc is not supported before GLIBC_2.2.5.
> As far as I know, malloc is a very basic API.
> So I think it is supported by the very beginning version of GLIBC.
> 
> If there is something wrong, please let me know.

You need to check the *base* abi version for the specific ABI. For x86_64
specifically it is GLIBC_2.2.5 while for i686 it is GLIBC_2.0.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-03 10:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-17  1:46 Why there are serval different versions related to GLIBC when dumping the symbols of a program by nm whereas the program is built with GLIBC_2.23? 孙世龙 sunshilong
2020-09-02 18:37 ` Adhemerval Zanella
2020-09-03  0:56   ` 孙世龙 sunshilong
2020-09-03 10:47     ` Adhemerval Zanella

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).