Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the ldd command in Linux

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to use the ldd command in Linux, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Linux ldd command

As mentioned at the beginning, the ldd command prints shared object dependencies. The following is the syntax of the command:

Ldd [option]... File...

The following is an explanation of the tool in its man page:

Ldd outputs the shared objects (shared libraries) required for each program or shared object specified on the command line.

The following uses Q & A to give you a better understanding of how ldd works.

Question 1. How to use the ldd command?

The basic use of ldd is very simple, simply by running the ldd command and the file name of the executable or shared object as input.

Ldd [object-name]

For example:

Ldd test

How to use ldd

So you can see that all the shared library dependencies have been generated in the output.

Q2. How to make ldd generate detailed information in the output?

If you want ldd to generate details, including symbol versioning data, you can use the-v command line option. For example, the command

Ldd-v test

When using the-v command line option, the following is generated in the output:

How to make ldd produce detailed information in output

Q3. How to make ldd have unused direct dependencies?

For this information, use the-u command line option. This is an example:

Ldd-u test

How to make ldd produce unused direct dependencies

Q4. How to make ldd perform relocation?

You can use several command line options here:-d and-r. The former tells ldd to perform data relocation, while the latter causes ldd to perform relocation for data objects and functions. In both cases, the tool reports missing ELF objects, if any.

Ldd-dldd-rQ5, how to get help on ldd?

The help command line option enables ldd to generate useful usage-related information for the tool.

Ldd-help

The above is all the contents of the article "how to use ldd commands in Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report