Sponsored Content
Operating Systems AIX LibC.a usage in /usr/lib/boot/chrp.disk.proto Post 302774309 by DGPickett on Friday 1st of March 2013 02:44:12 PM
Old 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

/usr/lib/32/32-> Question

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

sh script to traul through /usr/lib/perl5 ...

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

/usr/lib on a seperate partition

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

Getting Symbol resolution failed for ../../../lib/libc.a Error

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

Core Dump in /usr/lib/hpux32/libc.so.1

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

use of /usr/lib/nsr

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

/usr/lib/vhost.so missing Solaris 5.10

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

./Vega6: /lib/libc.so.6: version `GLIBC_2.15' not found (required by ./Vega6)

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

/usr/lib/libv12n.so

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

FreeBSD: /usr/bin/ld not looking in /usr/local/lib

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
end(3)							     Library Functions Manual							    end(3)

NAME
end, _end, _ebss, etext, _etext, edata, _edata, eprol, _ftext, _fdata, _fbss, _procedure_table, _procedure_table_size, _proce- dure_string_table, __istart, __fstart, _DYNAMIC, _DYNAMIC_LINK, _BASE_ADDRESS, _GOT_OFFSET, _cobol_main - locations in program and defini- tions in runtime procedure table SYNOPSIS
extern unsigned long end; extern unsigned long _end; extern unsigned long _ebss; /* First address above a program's */ /* uninitialized data region */ extern unsigned long etext; extern unsigned long _etext; /* First address above the text region */ extern unsigned long edata; extern unsigned long _edata; /* First address above the initialized */ /*data region */ extern unsigned long eprol; /* First instruction of the user's program */ /* that follows the runtime startup routine */ extern unsigned long _ftext; /* Start address of the text region */ extern unsigned long _fdata; /* First address of the initialized data */ /* region */ extern unsigned long _fbss; /* Start address of the uninitialized data */ /* region */ extern unsigned long _procedure_table; extern unsigned long _procedure_table_size; extern unsigned long _procedure_string_table; /* See under DESCRIPTION */ extern unsigned long __istart; /* Start address of the program's */ /* initialization function driver routine */ extern unsigned long __fstart; /* Start address of the program's */ /* termination function driver routine */ extern unsigned long _DYNAMIC; /* Address of a shared object's dynamic */ /* header table */ extern unsigned long _DYNAMIC_LINK; /* Identifies the link type of a program */ /* or shared library. 0 for non_shared, */ /* 1 for call_shared and 2 for shared */ extern unsigned long _BASE_ADDRESS; /* First mapped address of a program or */ /* shared library */ extern unsigned long _GOT_OFFSET; /* Address of the global offset table in */ /* a shared program or shared library */ extern unsigned long _cobol_main /* Address of the main routine in a cobol */ /* program */ DESCRIPTION
These names refer neither to routines nor to locations with interesting contents except for _procedure_table, _procedure_string_table, and, for Tru64 UNIX, __istart and __fstart. Except for eprol, these are all names of linker-defined symbols. Note that the end, etext, and edata symbols are not defined when you compile in ANSI mode. When execution begins, the program break coincides with _end, but it is reset by the routines brk(2), malloc(3), standard input/output, the profile (-p) option of cc(1), etc. The current value of the program break is reliably returned by "sbrk(0)"; (see brk(2)). The linker-defined symbols _procedure_table, _procedure_table_size, and _procedure_string_table refer to the data structures of the runtime procedure table. Because these are linker-defined symbols, the data structures are built by ld(1) only if they are referenced. See the include file sym.h for the definition of the runtime procedure table, and see the include file exception.h for its uses. These symbols are all absolute symbols; the value of each symbol is its address (for example, "&_procedure_table_size"). Any reference to the symbol itself will attempt to access the symbol's value as if it were a valid address and will most likely result in an access viola- tion. All of these symbols except for end, _end, eprol, __istart, and _cobol_main are defined as local symbols in an executable or shared library's dynamic symbol table. Consequently, an executable or shared library can only reference its own definitions of these local sym- bols. RELATED INFORMATION
brk(2), malloc(3). delim off end(3)
All times are GMT -4. The time now is 05:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy