473,659 Members | 3,239 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

basic doubt on shared libraries


Hi Friends,

Could you please tell me about,

1. What a shared library in c contains
2. (.a) file extension for shared libraries.
3. Is shared libraries are reentrant.
Thanking you in advance,
ragi

Aug 26 '06 #1
3 2540
In article <11************ **********@m73g 2000cwd.googleg roups.com>,
ragi <ra******@gmail .comwrote:
Could you please tell me about,
1. What a shared library in c contains
2. (.a) file extension for shared libraries.
3. Is shared libraries are reentrant.
In answer to your first question: NO, all of those are off-topic
here. Shared libraries mean different things in different implementations .
As in a newsgroup more specific to your implementation.
--
Prototypes are supertypes of their clones. -- maplesoft
Aug 26 '06 #2
There is a wikipedia entry for Library which explains shared libraries:
http://en.wikipedia.org/wiki/Library_(computer_science)
I may be wrong, but I think whether a library (function) is reentrant
or not depends on how you code it. You can use some non-reentrant
system call or library function in your library, and then your library
becomes non-reentrant. If you use reentrant system calls or functions
in your library, then your library is reentrant. Actually, I think it
is more correct to say whether a function, rather than a library, is
reentrant. Some functions in a library may be reentrant, whereas
others in the same library are non-reentrant.

Aug 27 '06 #3
>There is a wikipedia entry for Library which explains shared libraries:
>http://en.wikipedia.org/wiki/Library_(computer_science)
I may be wrong, but I think whether a library (function) is reentrant
or not depends on how you code it.
True, it's possible to make a function non-reentrant unnecessarily
by poor cooding.

However, some functions, like strtok() as defined by Standard C,
cannot be made reentrant and still conform to the requirements for
the function. You can sometimes add an argument that points to
storage that holds state for the function to make it reentrant, but
then it no longer has the same function signature required. It's
now a different function and it needs a different name.
>You can use some non-reentrant
system call or library function in your library, and then your library
becomes non-reentrant.
If you use reentrant system calls or functions
in your library, then your library is reentrant. Actually, I think it
is more correct to say whether a function, rather than a library, is
reentrant.
A reasonable definition of a "reentrant library" would seem to be:
A library is reentrant if and only if all of the functions in it
are reentrant.
>Some functions in a library may be reentrant, whereas
others in the same library are non-reentrant.
It is sometimes the case that a non-reentrant initialization function
must be called before any of the other functions are used, and that
the reentrant functions use a number of "write-once" variables set
by the initialization function (for example, loading locale-specific
messages for the appropriate language). This would make the library
non-reentrant even if there is no explicit call to the initialization
function since the shared library mechanism automatically calls it.

Aug 27 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2265
by: Phil | last post by:
I realize this is the php group, but I have a question that recurses back to my php install. My objective is a pure 64 bit shared object installation of php 5.0 on UltraSparc Solaris 9 compiled with the Sun Compiler version 8. My problem is that EVERYTHING builds great EXCEPT that the 6b distribution of JPEG will NOT build a shared object, thus gd cannot include support for JPEG, thus php loses that functionality.
0
1112
by: Frieder Loercher | last post by:
Hello, I am developping a (lammpi) parallel Application where any of the processes uses the Python script language. It works fine on Compaq Alpha and SUN Solaris5.9 On AIX5.1, it doesn't work. In fact, there is a problem in using shared libraries on AIX in combination with the parallelisation (lammpi).
3
2601
by: Rickard Lind | last post by:
Is there any way to build the python executable statically and still be able to load modules built as shared libraries? I'm trying to run python scripts on a stripped down FreeBSD (4.9) machine which has no shared system libraries so I want to link it statically against libc et al, but it would be nice to still be able to load modules which were built as shared libraries. In particular I have a library for which I've generated a wrapper...
1
2784
by: rinku24 | last post by:
We have two C++ libraries (Unix Shared objects) with the same class name and no namespace. Is there any way to load both the libraries and selectivly create the instance of the class from different library? e.g. We have class Process in libABC.so and libXYZ.so. Can I instantiate object of class Process from libABC.so or libXYZ.so by specifying symbol name or some other way?? I know can do that for global function using dlsym...
5
475
by: David T. Ashley | last post by:
I've occasionally had trouble compiling and linking programs that use shared libraries. That never made a lot of sense to me, because I thought the operating system went hunting for the symbols and libraries at runtime (and not before). Questions: a)How do the development tools know that a given symbol (a function entry point, for example) is located in a shared library and won't be linked in statically?
2
1532
by: Tobias Bergmann | last post by:
Hi, I work on a big project that consists of many small linux C++ CGI binaries. This actually works fine but our problem is that we use many ..so libraries and we need to compile it separately for many different linux distributions and versions and even architectures. I actually want one compiled version that works everywhere. One idea is to store all used .so libraries of the compiling system in a seperate directory, install that...
3
3269
by: Bala | last post by:
Hello, I am trying to create a shared library on solaris. The inputs to this library is a source file and then 2 static libraries. I need to call code within the shared library in another application which in turn will use the static libraries for further processing. This is the command i am using to build the shared library
3
3219
by: S S | last post by:
Hi Are there some known issues using STL with shared library. Recently I got some crash for which the reason I dont see any, and searching on goolge shown some such issues with shared library. If somebody can help ? Thanks in advance. S
4
2338
by: stuntgoat | last post by:
Hi, I want to start using Python 2.6 and 3000. I have several questions. What, in your experiences, is a functionally elegant solution to installing 2.6 and 3 from source without breaking package dependencies on your favorite Linux/Unix flavor? Is compiling Python 2.6 and 3.0 on a *nix development machine and having it work seamlessly as simple as choosing a particular flavor or are there always going to be package...
0
8335
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8747
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8528
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8627
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7356
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6179
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2752
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1976
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.