Why nm shows no symbols for /lib/i386-linux-gnu/libc.so.6?
Clash Royale CLAN TAG#URR8PPP
up vote
16
down vote
favorite
I expected to see number of symbols in the libc.so.6 file including printf. I used the nm tool to find them, however it says there is no symbol in libc.so.6.
linux shared-library symbol-table nm
add a comment |Â
up vote
16
down vote
favorite
I expected to see number of symbols in the libc.so.6 file including printf. I used the nm tool to find them, however it says there is no symbol in libc.so.6.
linux shared-library symbol-table nm
Does not matter. But it is Debian.
â masec
May 14 '16 at 5:14
add a comment |Â
up vote
16
down vote
favorite
up vote
16
down vote
favorite
I expected to see number of symbols in the libc.so.6 file including printf. I used the nm tool to find them, however it says there is no symbol in libc.so.6.
linux shared-library symbol-table nm
I expected to see number of symbols in the libc.so.6 file including printf. I used the nm tool to find them, however it says there is no symbol in libc.so.6.
linux shared-library symbol-table nm
linux shared-library symbol-table nm
edited May 12 '16 at 2:50
Jeff Schaller
34.2k951113
34.2k951113
asked May 11 '16 at 20:48
masec
12019
12019
Does not matter. But it is Debian.
â masec
May 14 '16 at 5:14
add a comment |Â
Does not matter. But it is Debian.
â masec
May 14 '16 at 5:14
Does not matter. But it is Debian.
â masec
May 14 '16 at 5:14
Does not matter. But it is Debian.
â masec
May 14 '16 at 5:14
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
31
down vote
accepted
It's probably got its regular symbols stripped and what's left is its dynamic symbols, which you can get with nm -D
.
add a comment |Â
up vote
0
down vote
Find out if it is a shared object, or, a regular ASCII file. If it is a shared object you should see "ELF 32-bit LSB shared object,"
file /lib/i386-linux-gnu/libc.so.6
libc.so.6
is oviously a shared object.
â Gilles
May 11 '16 at 22:24
I never assume in a Linux environment. Considering someone could have touched the root directories. Yes, by name it is obviously a share object. And, it doesn't hurt to verify; when you are not getting the expected output.
â jncc99
May 11 '16 at 23:42
add a comment |Â
up vote
0
down vote
@PSkocik answered this. I just want to add more detail. There are two kinds of symbol sections in ELF: .symtab
and .dynsym
(see LSB_5.0.0 for detail). .symtab
is for the linking step of the shared lib itself. Once linking is finished, .symtab
section is not needed anymore. .dynsym
section contains important symbols that are supposed to be searched by dynamic linker at running time. nm
by default only dump symbols in .symtab
section.
LSB_5.0.0 10.2.2.1
says a conforming shared lib should have either .symtab
or .dynsym
but not both. As part of the ABI library, libc is stripped out of the .symtab
to be spec conforming.
New contributor
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
31
down vote
accepted
It's probably got its regular symbols stripped and what's left is its dynamic symbols, which you can get with nm -D
.
add a comment |Â
up vote
31
down vote
accepted
It's probably got its regular symbols stripped and what's left is its dynamic symbols, which you can get with nm -D
.
add a comment |Â
up vote
31
down vote
accepted
up vote
31
down vote
accepted
It's probably got its regular symbols stripped and what's left is its dynamic symbols, which you can get with nm -D
.
It's probably got its regular symbols stripped and what's left is its dynamic symbols, which you can get with nm -D
.
answered May 11 '16 at 20:53
PSkocik
17.4k34893
17.4k34893
add a comment |Â
add a comment |Â
up vote
0
down vote
Find out if it is a shared object, or, a regular ASCII file. If it is a shared object you should see "ELF 32-bit LSB shared object,"
file /lib/i386-linux-gnu/libc.so.6
libc.so.6
is oviously a shared object.
â Gilles
May 11 '16 at 22:24
I never assume in a Linux environment. Considering someone could have touched the root directories. Yes, by name it is obviously a share object. And, it doesn't hurt to verify; when you are not getting the expected output.
â jncc99
May 11 '16 at 23:42
add a comment |Â
up vote
0
down vote
Find out if it is a shared object, or, a regular ASCII file. If it is a shared object you should see "ELF 32-bit LSB shared object,"
file /lib/i386-linux-gnu/libc.so.6
libc.so.6
is oviously a shared object.
â Gilles
May 11 '16 at 22:24
I never assume in a Linux environment. Considering someone could have touched the root directories. Yes, by name it is obviously a share object. And, it doesn't hurt to verify; when you are not getting the expected output.
â jncc99
May 11 '16 at 23:42
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Find out if it is a shared object, or, a regular ASCII file. If it is a shared object you should see "ELF 32-bit LSB shared object,"
file /lib/i386-linux-gnu/libc.so.6
Find out if it is a shared object, or, a regular ASCII file. If it is a shared object you should see "ELF 32-bit LSB shared object,"
file /lib/i386-linux-gnu/libc.so.6
answered May 11 '16 at 22:16
jncc99
364
364
libc.so.6
is oviously a shared object.
â Gilles
May 11 '16 at 22:24
I never assume in a Linux environment. Considering someone could have touched the root directories. Yes, by name it is obviously a share object. And, it doesn't hurt to verify; when you are not getting the expected output.
â jncc99
May 11 '16 at 23:42
add a comment |Â
libc.so.6
is oviously a shared object.
â Gilles
May 11 '16 at 22:24
I never assume in a Linux environment. Considering someone could have touched the root directories. Yes, by name it is obviously a share object. And, it doesn't hurt to verify; when you are not getting the expected output.
â jncc99
May 11 '16 at 23:42
libc.so.6
is oviously a shared object.â Gilles
May 11 '16 at 22:24
libc.so.6
is oviously a shared object.â Gilles
May 11 '16 at 22:24
I never assume in a Linux environment. Considering someone could have touched the root directories. Yes, by name it is obviously a share object. And, it doesn't hurt to verify; when you are not getting the expected output.
â jncc99
May 11 '16 at 23:42
I never assume in a Linux environment. Considering someone could have touched the root directories. Yes, by name it is obviously a share object. And, it doesn't hurt to verify; when you are not getting the expected output.
â jncc99
May 11 '16 at 23:42
add a comment |Â
up vote
0
down vote
@PSkocik answered this. I just want to add more detail. There are two kinds of symbol sections in ELF: .symtab
and .dynsym
(see LSB_5.0.0 for detail). .symtab
is for the linking step of the shared lib itself. Once linking is finished, .symtab
section is not needed anymore. .dynsym
section contains important symbols that are supposed to be searched by dynamic linker at running time. nm
by default only dump symbols in .symtab
section.
LSB_5.0.0 10.2.2.1
says a conforming shared lib should have either .symtab
or .dynsym
but not both. As part of the ABI library, libc is stripped out of the .symtab
to be spec conforming.
New contributor
add a comment |Â
up vote
0
down vote
@PSkocik answered this. I just want to add more detail. There are two kinds of symbol sections in ELF: .symtab
and .dynsym
(see LSB_5.0.0 for detail). .symtab
is for the linking step of the shared lib itself. Once linking is finished, .symtab
section is not needed anymore. .dynsym
section contains important symbols that are supposed to be searched by dynamic linker at running time. nm
by default only dump symbols in .symtab
section.
LSB_5.0.0 10.2.2.1
says a conforming shared lib should have either .symtab
or .dynsym
but not both. As part of the ABI library, libc is stripped out of the .symtab
to be spec conforming.
New contributor
add a comment |Â
up vote
0
down vote
up vote
0
down vote
@PSkocik answered this. I just want to add more detail. There are two kinds of symbol sections in ELF: .symtab
and .dynsym
(see LSB_5.0.0 for detail). .symtab
is for the linking step of the shared lib itself. Once linking is finished, .symtab
section is not needed anymore. .dynsym
section contains important symbols that are supposed to be searched by dynamic linker at running time. nm
by default only dump symbols in .symtab
section.
LSB_5.0.0 10.2.2.1
says a conforming shared lib should have either .symtab
or .dynsym
but not both. As part of the ABI library, libc is stripped out of the .symtab
to be spec conforming.
New contributor
@PSkocik answered this. I just want to add more detail. There are two kinds of symbol sections in ELF: .symtab
and .dynsym
(see LSB_5.0.0 for detail). .symtab
is for the linking step of the shared lib itself. Once linking is finished, .symtab
section is not needed anymore. .dynsym
section contains important symbols that are supposed to be searched by dynamic linker at running time. nm
by default only dump symbols in .symtab
section.
LSB_5.0.0 10.2.2.1
says a conforming shared lib should have either .symtab
or .dynsym
but not both. As part of the ABI library, libc is stripped out of the .symtab
to be spec conforming.
New contributor
New contributor
answered 4 mins ago
kula85
1
1
New contributor
New contributor
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f282616%2fwhy-nm-shows-no-symbols-for-lib-i386-linux-gnu-libc-so-6%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Does not matter. But it is Debian.
â masec
May 14 '16 at 5:14