I am new to C programming, In my protofile we are adding libC.a entry.
I want to know about the usage of libC.a in ptotofile, we are doing this modification before taking bosboot image.
I tried to take a bosboot image without libC.a entry in protofile. I didn't observed any difference in both the cases.
Can someone should brief me the usage of libC.a in /usr/lib/boot/chrp.disk.proto.
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.
Location: on the road for work; home is private time
Posts: 456
Thanks Given: 10
Thanked 108 Times in 100 Posts
The answer to your question, more to the point, is that libC.a, or any other file, is not needed unless the file is needed for the system boot.
So, until you add something that is used during the boot phase (e.g., a new device driver) it will not make any difference - because this file system gets mounted over by the disk version of / (root) (phase 2 of AIX boot, aka varyonvg rootvg phase).
To know more about the file layout, and the meaning of the content entries - read the manpage proto
Thanks for your valuable suggestions. Now I got some clear picture about libC.a and protofile.
One small doubt, is it useful to add the libC.a in protofile?
What it will do during system boot up, I mean how can kernel interact with the libC.a during system boot up.
Thanks in advance.
---------- Post updated at 11:56 AM ---------- Previous update was at 11:45 AM ----------
Hi Michael and DG,
Actually I am facing the below error when I have libC.a entry in protofile.
dd: 0511-053 The write failed.
: There is a request to a device or address that does not exist.
67611+1 records in.
1056+1 records out.
Failed to take a bosboot image:
Without libC.a entry there is no problem with bosboot.
Well, we are talking about it being included in, by being statically linked to, the boot kernel, not the final, booted system. It is a static lib, so there is no need for the full file at boot time. Some apps are not symlink friendly.
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)
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)
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)
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)
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)
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)
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)
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)
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)