03-01-2013
Well, libC.a is a static (compile-time) linkable object library to support system functions written in the matching compiler. It is actually an ar archive of many *.o files compiled from *.cpp, assuming capital C implies C++. Only the referenced code is copied out of the library into your executable, not necessarily the entire file. It can be reworked into a libC.so dynamic, shared object (run-time and read-only parts in shared RAM/VM pages paged direct from the .so, no swap used) library. But really, .o, and hence .a and .so, could come from any mix of compilers and languages, as long as everyone agrees on call stack atructure and such.
I assume this reference is to make sure it is linked into the kernel, which might have to run in a primitive mode that does not support dynamic, shared object library. UNIX systems primarily depend on libc.so, which supports the c language, and is usable in C++ using 'extern "C" {...}' declaration wrappers. The C++ variable names are mangled to code in a check for the type and if a call the argument number and each type. This tells C++ not to mangle c calls and variables. The reciprocal 'extern "C++"{...}' tells the C compiler to mangle to call C++ names.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello UNIX people. I was just cruising around my UFS and came across the directory /usr/lib/32. This directory continues up many directories (/usr/lib/32/32/32/32->). Each level of 32/ directory seems to be a copy of the previous one. I have been working with UNIX for a little while now, but I... (3 Replies)
Discussion started by: shaggy
3 Replies
2. Shell Programming and Scripting
Hey,
Im trying to create a script to create a dir-tree of pod converted to html. so far this is the script:
#!/bin/sh
cd /usr/lib/perl5
for d in ./* ; do
# is it a dir?
if ; then
# yes! get the basename
cd $d ; dir=`basename $d`
for f in ./* ; do
... (1 Reply)
Discussion started by: emcb
1 Replies
3. UNIX for Advanced & Expert Users
I want to move /usr/lib on a seperate partition.
( is is now all at / )
I know how to copy data and update fstab but...
At boot time, the mepis distro already needs stuff from /usr/lib but it is not mounted yet. So i get error before /usr/lib is mounted.
Does this mean you cannot move... (4 Replies)
Discussion started by: progressdll
4 Replies
4. AIX
Hi
I have compiled a binary on AIX 5.3.0.0
but when i run i get following error
Could not load program ACE_wrappers/bin/gperf:
Symbol resolution failed for ../../../lib/libc.a(posix_aio.o) because:
Symbol _posix_kaio_rdwr (number 2) is not exported from dependent
module... (0 Replies)
Discussion started by: khan_nayeem
0 Replies
5. HP-UX
Hi,
I am working on a core dump issue, where the dumps happens in OS library, /usr/lib/hpux32/libc.so.1 and version for my OS is as specified by uname -a is:
"HP-UX B.11.23 U ia64".
Below is the core dump file. Our program terminated with Signal 6.
... (0 Replies)
Discussion started by: vivek.gkp
0 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I have this folder on my one of the machine but not on other.
/usr/lib/nsr
can anyone tell me for what this folder is used ?
Thanks (2 Replies)
Discussion started by: yatrik007
2 Replies
7. Solaris
Hi,
i have a solaris 5.10 machine on which i am getting below error while
executing cat command
ld.so.1: cat: fatal: vhost.so: open failed: No such file or directory
Killed
it is related to file vhost.so missing
Also when i did ldd cat result is as below
libc.so.1... (1 Reply)
Discussion started by: Jcpratap
1 Replies
8. Red Hat
Hello,
I am trying to run a chess pairing program called Vega Chess on RHEL 6.5 Server
$ uname -a
Linux CDMA 2.6.32-431.el6.i686 #1 SMP Sun Nov 10 22:20:22 EST 2013 i686 i686 i386 GNU/Linux
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.5 (Santiago)This is the way I... (6 Replies)
Discussion started by: Ferocci
6 Replies
9. UNIX for Advanced & Expert Users
Hi,
I want to use the function "v12n_domain_uuid" on solaris box. The library "libv12n" is present in /usr/lib but i can't locate the header "libv12n.h" anywhere in the box.
How do i run the API "v12n_domain_uuid" (4 Replies)
Discussion started by: skyineyes
4 Replies
10. BSD
I'm not sure if this is the default behavior for the ld command, but it does not seem to be looking in /usr/local/lib for shared libraries.
I was trying to compile the latest version of Kanatest from svn. The autorgen.sh script seems to exit without too much trouble:
$ ./autogen.sh
checking... (2 Replies)
Discussion started by: AntumDeluge
2 Replies
LEARN ABOUT OSF1
installboot
installboot(1M) installboot(1M)
NAME
installboot - install bootblocks in a disk partition
SYNOPSIS
installboot bootblk raw-disk-device
The boot(1M) program, ufsboot, is loaded from disk by the bootblock program which resides in the boot area of a disk partition.
The ufs boot objects are platform-dependent, and reside in the /usr/platform/platform-name/lib/fs/ufs directory. The platform name can be
found using the -i option of uname(1).
The installboot utility is a SPARC only program. It is not supported on the architecture. users should use installgrub(1M) instead.
bootblk The name of the bootblock code.
raw-disk-device The name of the disk device onto which the bootblock code is to be installed; it must be a character device which is read-
able and writable. Naming conventions for a SCSI or IPI drive are c?t?d?s? and c?d?s? for an IDE drive.
Example 1: Installing UFS Boot Block
To install a ufs boot block on slice 0 of target 0 on controller 1 of the platform where the command is being run, use:
example# installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk
/dev/rdsk/c1t0d0s0
/usr/platform/platform-name/lib/fs/ufs
directory where ufs boot objects reside.
/platform/platform-name/ufsboot
second level program to boot from a disk or CD
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
od(1), uname(1), boot(1M), init(1M), kadb(1M), kernel(1M), monitor(1M), reboot(1M), rpc.bootparamd(1M), init.d(4), attributes(5)
WARNINGS
The installboot utility fails if the bootblk or openfirmware files do not exist or if the raw disk device is not a character device.
11 Apr 2005 installboot(1M)