10 More Discussions You Might Find Interesting
1. Programming
I would like to compile a binary that doesnot depend on LD_LIBRARY_PATH as this binary will be setuid to owner and used by other users and since setuid doesnot support LD_LIBRARY_PATH making it independent of LD_LIBRARY_PATH would be great.
But I am not able to specify the path of the shared... (1 Reply)
Discussion started by: waavman
1 Replies
2. Programming
hello
I apologize if my question bothers you
I work on a code developed in C + + which worked well on mac os, this code will help create libraries *.so from *.cc and *.h I used this as flags:CXXFLAGS = -g -O2 -fPIC -Wall -ldl -D_GNU_SOURCE ,CXX := g++ and $(CXX)-shared -o $(LIBNAME) $(CLIBLIB)... (0 Replies)
Discussion started by: pheapc
0 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
I am trying to simplify things for two people who will be taking over my role whilst i go on leave. In doing so, i wanted to find a way that upon login to unix, the crontab would be reloaddd and resaved.
I want to do this due to our IT dept taking the server down more often of late... (5 Replies)
Discussion started by: KlintJ
5 Replies
4. 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
5. 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
6. Programming
Hi,
I wonder how can we override the dynamic library loaded by ld on start up.(dynamic linked application). so that linker uses the new library to find symbols.
Is it possible to do.
Cheers. (4 Replies)
Discussion started by: Raom
4 Replies
7. UNIX for Dummies Questions & Answers
Trying to run an X11 executable under Darwin, I keep getting:
dyld: Library not loaded: /sw/lib/libglib-1.2.0.dylib
Referenced from: /usr/X11R6/bin/wav2rsomac
Reason: image not found
Trace/BPT trap
I can't figure out if this is an error in the way the program is running, or if the... (0 Replies)
Discussion started by: sansan
0 Replies
8. Programming
is there a way to load a dynamic library in linux? I know tht in AIX u can do it using the loadAndInit() function. Please guide me (2 Replies)
Discussion started by: jacques83
2 Replies
9. Linux
hi
how can i load dynamic or shared library in linux kernel modules .
mtaghiloo@yahoo.com (0 Replies)
Discussion started by: mtaghiloo
0 Replies
10. Programming
I need to load a dynamic library from a statically linked program. Is there a way without recompiling my program.
when i try to do that my program just crashes.
If not possible, how can I avoid crashing the program when i try to load the dynamic lib, again without recompiling.
If my... (1 Reply)
Discussion started by: disclaimer
1 Replies
DYLIBPROF(1) General Commands Manual DYLIBPROF(1)
NAME
dylibprof - control the shared pc sampling of a dynamic shared library
SYNOPSIS
dylibprof [-e | -d] | [-c | -r | -b | -h | -p [-o <file>] <dylib>]
DESCRIPTION
Dylibprof along with the server /usr/libexec/profileServer allows shared program counter sampling of a dynamic shared library across all
the programs that use the library.
To use dylibprof(1), /usr/libexec/profileServer must be running. So first start /usr/libexec/profileServer and leave it running in the
back ground:
% /usr/libexec/profileServer >& /dev/console &
/usr/libexec/profileServer starts up with shared pc sampling disabled. It should not be left running with shared pc sampling enabled if no
sampling is being done as every launch of a program that uses the dynamic linker is effected. This is true even to a small extent if there
no libraries being sampled.
If you need to profile from boot up for all processes then the following line can be added to /etc/bootstrap.conf:
server "/usr/libexec/profileServer" services NSProfileServer NSProfileControl;
Before any dynamic shared library can be sampled sampling must be enabled as
follows:
% dylibprof -e
It can then later be disabled when no more sampling is to be done with:
% dylibprof -d
EXAMPLE
To sample the dynamic shared library /System/Library/Frameworks/System.framework/Versions/B/System for example requires the following
steps. First create a sample buffer for the library:
% dylibprof -c /System/Library/Frameworks/System.framework/Versions/B/System
Then begin the sampling:
% dylibprof -b /System/Library/Frameworks/System.framework/Versions/B/System
After this programs launched using this library will be part of the shared pc sampling. Typically what would be done is to then use the
system normally for a number of hours.
Then to halt the sampling:
% dylibprof -h /System/Library/Frameworks/System.framework/Versions/B/System
The profiling output file (a gmon.out file) can be created with:
% dylibprof -p -o /tmp/gmon.out /System/Library/Frameworks/System.framework/Versions/B/System
Using the profiling output file and the library a profile listing and a time based order file (time.order) can be created with: gprof(1):
% gprof -S /System/Library/Frameworks/System.framework/Versions/B/System /tmp/gmon.out
When no more sampling for this library is to be done the sample buffer can be
removed with:
% dylibprof -r /System/Library/Frameworks/System.framework/Versions/B/System
The options are:
-e Enable shared program counter sampling for dynamic libraries.
-d Disable shared program counter sampling for dynamic libraries.
-c Create a pc sample buffer for the library.
-b Begin sampling for programs subsequently launched using the library.
-h Halt sampling for programs subsequently launched using the library.
-p Produce a profiling output file (a gmon.out file) for the library.
-r Remove the pc sample buffer for the library.
-o name
Use the file name instead of gmon.out when producing the profiling output file with the -p above.
FILES
gmon.out profile output file
/var/tmp/profile/profile.XXXXXX the sample buffer file
SEE ALSO
gprof(1)
Apple Computer, Inc. March 19, 2002 DYLIBPROF(1)