10 More Discussions You Might Find Interesting
1. AIX
I'm trying to install libiconv to AIX 7.1 from an rpm off of the perzl site. The rpm appears to install but I get this error message.
add shr4.o shared members from /usr/lib/libiconv.a to /opt/freeware/lib/libiconv.a
add shr.o shared members from /usr/lib/libiconv.a to ... (5 Replies)
Discussion started by: kneemoe
5 Replies
2. Programming
Hello.
I am new to this forum and I would like to ask for advice about low level POSIX programming.
I have to implement a POSIX compliant C shared library.
A file will have some variables and the shared library will have some functions which need those variables.
There is one special... (5 Replies)
Discussion started by: iamjag
5 Replies
3. Programming
Hi,
I created two library libsum.so and libproduct.so. In the libproduct.so is defined function "product" that use function "sum" defined in libsum.so. So libproduct depends on libsum.
In main function I called product function by a dlopen request. Unfortunaly, when I execute program I have an... (5 Replies)
Discussion started by: shade82
5 Replies
4. UNIX for Dummies Questions & Answers
I am having a major problem. Most of the commands that i am running on my centos 5 system is giving the error of type:
<dynamic shared library file>:open failed: No such file or directory
For example:
libgcc_s.so.1: open failed: No such file or directory
How can i solve this? (6 Replies)
Discussion started by: proactiveaditya
6 Replies
5. UNIX for Dummies Questions & Answers
How can I simply obtain a list of the object files in a shared (dynamic) library.
I am looking for the equivalent of "ar -t <lib>" for archived (static) libraries.
Thanks in advance. :rolleyes:
---------- Post updated at 01:47 PM ---------- Previous update was at 12:16 PM ----------
The... (1 Reply)
Discussion started by: chatieremerrill
1 Replies
6. Shell Programming and Scripting
Hi:
I have a library that it only offers Makefile for building static library. It built libxxx.a file. How do I in any way build a shared library? (either changin the Makefile or direct script or command to build shared library)
Thanks. (1 Reply)
Discussion started by: cpthk
1 Replies
7. Programming
I am writing a shared library in Linux (but compatible with other UNIXes) and I want to allow multiple instances to share a piece of memory -- 1 byte is enough. What's the "best" way to do this? I want to optimize for speed and portability.
Obviously, I'll have to worry about mutual exclusion. (0 Replies)
Discussion started by: otheus
0 Replies
8. Programming
I need to create a shared library to access an in memory DB. The DB is not huge, but big enough to make it cumbersome to carry around in every single process using the shared library. Luckily, it is pretty static information, so I don't need to worry much about synchronizing the data between... (12 Replies)
Discussion started by: DreamWarrior
12 Replies
9. Linux
Hi,
I am trying to create shared library. When i run the script to build the library i get these errors
ld: warning: option -o appears more than once, first setting taken
ld: fatal: file libgc.so.0: open failed: No such file or directory
ld: fatal: File processing errors. No output written... (0 Replies)
Discussion started by: masg1
0 Replies
10. Programming
hi, every body. i have in trouble that how to load a dynamic library by hand.
for example, i know how to generate a dynamic library and how to link a dynamic library in makefile.
generate a dynamic library:
add -dy -G behind cc
link a dynamic library in makefile:
add -dy -Bdynamic behind cc... (0 Replies)
Discussion started by: subrain
0 Replies
dladdr(3C) dladdr(3C)
NAME
dladdr() - get the symbolic information for an address
SYNOPSIS
[flag]... cfile ... [library]...
Multithread Usage
This routine is thread-safe.
DESCRIPTION
is one of a family of routines that give the user direct access to the dynamic linking facilities (using the option on the compiler or com-
mand line). allows a process to obtain information about the symbol that most closely defines a given address. determines whether the
specified address is located within one of the load modules (executable or shared libraries) that make up the process' address space. An
address is deemed to fall within a load module when it is between the base address at which the load module was mapped and the highest vir-
tual address mapped for that load module, inclusive. If a load module fits this criteria, its dynamic symbol table is searched to locate
the nearest symbol to the specified address. The nearest symbol is the one whose value is equal to, or closest to but less than the speci-
fied address.
dlip is a pointer to a structure. The structure must be allocated by the user. The structure members are set by if the specified address
falls within one of the load modules. The structure contains the following members:
The fields of the structure contain the following:
dli_fname Pointer to the filename of the load module containing the address. The contents of this memory location can change
between calls to
dli_fbase Handle to the load module. This can be used as the first argument to
dli_sname Pointer to the name of the nearest symbol to the specified address. This symbol either has the same address, or is the
nearest symbol with a lower address. The contents of this memory location can change between calls to
dli_saddr Actual address of the nearest symbol. For code symbols, it contains the address of the OPD (Official Plabel Descrip-
tor) for the nearest code symbol.
dli_size (ELF process only) Size of the nearest symbol as defined in the dynamic symbol table.
dli_bind (ELF process only) Binding attribute of the nearest symbol as defined in the dynamic symbol table. The values for this
are those used for a symbol's binding in the ELF symbol table (see
dli_type Type of the nearest symbol. For ELF process, this is the same as the value for type in the dynamic symbol table. The
values for this are those used for a symbol's type in the ELF symbol table (see For SOM process, this can have the
value or as defined in
RETURN VALUE
If the specified address does not fall within one of the load modules, is returned; the contents of the structure are not modified. Other-
wise, a non-zero value is returned and the fields of the structure are set.
DIAGNOSTICS
If no symbol is found within the load module containing address whose value is less than or equal to address, the dli_sname, dli_saddr, and
dli_size fields are set to the dli_bind field is set to and the dli_type field is set to
For only a subset of externally visible symbols are typically exported: specifically those referenced by the load modules with which the is
linked. The exact set of exported symbols for any shared library or the can be controlled using the linker (see ld(1)).
ERRORS
If fails, a subsequent call to returns one of the following values:
Invalid symbol address in load module.
Cannot apply relocation in library.
Address not found in any load module.
Out of memory.
failed on entry to or exit from
failed on exit from
failed on entry to
SEE ALSO
cc(1), ld(1), sh(1), exec(2), dlclose(3C), dlerrno(3C), dlerror(3C), dlsym(3C).
Texts and Tutorials
(See the option)
(See manuals(5) for ordering information)
dladdr(3C)