Sponsored Content
Full Discussion: unix libraries and patch
Top Forums UNIX for Dummies Questions & Answers unix libraries and patch Post 1755 by mib on Thursday 29th of March 2001 01:26:14 AM
Old 03-29-2001
A library is a file containing several object files, that can be used as a single entity in a linking phase of a program. Normally the library is indexed, so it is easy to find symbols (functions, variables and so on...) in them. For this reason, linking a program whose object files are ordered in libraries is faster than linking a program whose object files are separate on the disk. Also, when using a library, we have fewer files to look for and open, which even further speeds up linking.

Static libraries are just collections of object files that are linked into the program during the linking phase of compilation, and are not relevant during runtime.
Static libraries are commonly named libname.a. The .a suffix refers to <b>a</b>rchive

dynamic libraries (also called Shared libraries) are lbrararies in which modules can be bound into the executable program at runtime. when the program is started, a program in the system (called a dynamic loader) checks out which shared libraries were linked with the program, loads them to memory, and attaches them to the copy of the program in memory.
Dynamic libraries are commonly named libname.so. The .so suffix refers to <b>s</b>hared <b>o</b>bject.




 

9 More Discussions You Might Find Interesting

1. Programming

C Libraries??

I can not locate package sys/mkdev.h on HP-UX or Linux. Is it a special package or something? (9 Replies)
Discussion started by: laila63
9 Replies

2. IP Networking

Libraries

How is Libnet and libpcap are useful in sending a packet through DLL layer and sniff network layer? and how sinffers are used to track ip adresses provided Mac adresses? (1 Reply)
Discussion started by: netsavy
1 Replies

3. IP Networking

Patch-o-matic (patch for iptable) for linux2.4.08 & iptable1.2.7a

Hello friends I'm running Redhat 9.0 with linux kernel 2.4.20-8 & have iptables version 1.2.7a & encountering a problem that I narrate down. I need to apply patch to my iptable and netfilter for connection tracking and load balancing that are available in patch-o-matic distribution by netfilter.... (0 Replies)
Discussion started by: Rakesh Ranjan
0 Replies

4. UNIX for Dummies Questions & Answers

libraries

I am slowly ploughing my way through the list of links to on-line tutorials you provided to newbies. I for one am grateful for such a comprehensive list, so first of all thank you for that. What i cannot seem to find, is information on C++ libraries: The two links on libraries in your list... (0 Replies)
Discussion started by: pil888
0 Replies

5. UNIX for Advanced & Expert Users

Patch Management over mixed unix platforms

Does anyone know of any tools that manage the rollout of patches across multiple types of Unix platform ( eg Solaris, Aix etc ). I am looking for something that does a similiar job to SMS or WSUS in the Windows world (3 Replies)
Discussion started by: jimthompson
3 Replies

6. Shell Programming and Scripting

How to use two different libraries?

Hello, I need to use two different libraries like /usr/local/bin/expect and /usr/bin/ksh at the same script. Is it possible? (4 Replies)
Discussion started by: fozay
4 Replies

7. Programming

I want to know some c libraries

I'm a rookie to C and i'm looking for some libraries to learn,something likes the C++ STL or Boost ,does any1 can tell me some of them?Thanks a lot:) Eric (3 Replies)
Discussion started by: homeboy
3 Replies

8. UNIX for Dummies Questions & Answers

PATH for c libraries

Hello, I met a problem when running a java program. When I did the debugging: srna/ExeFiles/linux$ ldd patman linux-gate.so.1 => (0xf77b5000) libpopt.so.0 => not found libstdc++.so.6 => not found libm.so.6 => /lib32/libm.so.6 (0xf7778000) libgcc_s.so.1 => not found ... (5 Replies)
Discussion started by: yifangt
5 Replies

9. Shell Programming and Scripting

Check latest patch applied on UNIX server

hi all, i need to check the latest patch applied on my unix server. here is the server info: bash-3.2$ uname -a SunOS usa0300uz1226 5.10 Generic_148888-01 sun4u sparc SUNW,SPARC-Enterprise please tell which is the command for checking patch? (1 Reply)
Discussion started by: lovelysethii
1 Replies
JOCAMLOPT(1)						      General Commands Manual						      JOCAMLOPT(1)

NAME
jocamlopt - The JoCaml native-code compiler SYNOPSIS
jocamlopt [ -acivS ] [ -cclib libname ] [ -ccopt option ] [ -compact ] [ -unsafe ] [ -o exec-file ] [ -I lib-dir ] filename ... jocamlopt.opt (same options) DESCRIPTION
The JoCaml high-performance native-code compiler jocamlopt(1) compiles Caml source files to native code object files and link these object files to produce standalone executables. The jocamlopt(1) command has a command-line interface very close to that of jocamlc(1). It accepts the same types of arguments and pro- cesses them sequentially: Arguments ending in .mli are taken to be source files for compilation unit interfaces. Interfaces specify the names exported by compilation units: they declare value names with their types, define public data types, declare abstract data types, and so on. From the file x.mli, the jocamlopt(1) compiler produces a compiled interface in the file x.cmi. The interface produced is identical to that produced by the bytecode compiler jocamlc(1). Arguments ending in .ml are taken to be source files for compilation unit implementations. Implementations provide definitions for the names exported by the unit, and also contain expressions to be evaluated for their side-effects. From the file x.ml, the jocamlopt(1) com- piler produces two files: x.o, containing native object code, and x.cmx, containing extra information for linking and optimization of the clients of the unit. The compiled implementation should always be referred to under the name x.cmx (when given a .o file, jocamlopt(1) assumes that it contains code compiled from C, not from Caml). The implementation is checked against the interface file x.mli (if it exists) as described in the manual for jocamlc(1). Arguments ending in .cmx are taken to be compiled object code. These files are linked together, along with the object files obtained by compiling .ml arguments (if any), and the Caml Light standard library, to produce a native-code executable program. The order in which .cmx and .ml arguments are presented on the command line is relevant: compilation units are initialized in that order at run-time, and it is a link-time error to use a component of a unit before having initialized it. Hence, a given x.cmx file must come before all .cmx files that refer to the unit x. Arguments ending in .cmxa are taken to be libraries of object code. Such a library packs in two files lib.cmxa and lib.a a set of object files (.cmx/.o files). Libraries are build with jocamlopt -a (see the description of the -a option below). The object files contained in the library are linked as regular .cmx files (see above), in the order specified when the library was built. The only difference is that if an object file contained in a library is not referenced anywhere in the program, then it is not linked in. Arguments ending in .c are passed to the C compiler, which generates a .o object file. This object file is linked with the program. Arguments ending in .o or .a are assumed to be C object files and libraries. They are linked with the program. The output of the linking phase is a regular Unix executable file. It does not need jocamlrun(1) to run. jocamlopt.opt is the same compiler as jocamlopt, but compiled with itself instead of with the bytecode compiler jocamlc(1). Thus, it behaves exactly like jocamlopt, but compiles faster. jocamlopt.opt is not available in all installations of JoCaml. OPTIONS
The following command-line options are recognized by jocamlopt(1). -a Build a library (.cmxa/.a file) with the object files (.cmx/.o files) given on the command line, instead of linking them into an executable file. The name of the library can be set with the -o option. The default name is library.cmxa. -c Compile only. Suppress the linking phase of the compilation. Source code files are turned into compiled files, but no executable file is produced. This option is useful to compile modules separately. -cclib -llibname Pass the -llibname option to the linker. This causes the given C library to be linked with the program. -ccopt option Pass the given option to the C compiler and linker. For instance, -ccopt -L dir causes the C linker to search for C libraries in directory dir. -compact Optimize the produced code for space rather than for time. This results in smaller but slightly slower programs. The default is to optimize for speed. -i Cause the compiler to print all defined names (with their inferred types or their definitions) when compiling an implementation (.ml file). This can be useful to check the types inferred by the compiler. Also, since the output follows the syntax of interfaces, it can help in writing an explicit interface (.mli file) for a file: just redirect the standard output of the compiler to a .mli file, and edit that file to remove all declarations of unexported names. -I directory Add the given directory to the list of directories searched for compiled interface files (.cmi) and compiled object code files (.cmo). By default, the current directory is searched first, then the standard library directory. Directories added with -I are searched after the current directory, in the order in which they were given on the command line, but before the standard library directory. -o exec-file Specify the name of the output file produced by the linker. The default output name is a.out, in keeping with the Unix tradition. If the -a option is given, specify the name of the library produced. -S Keep the assembly code produced during the compilation. The assembly code for the source file x.ml is saved in the file x.s. -v Print the version number of the compiler. -unsafe Turn bound checking off on array and string accesses (the v.(i) and s.[i] constructs). Programs compiled with -unsafe are therefore faster, but unsafe: anything can happen if the program accesses an array or string outside of its bounds. SEE ALSO
jocamlc(1). The Objective Caml user's manual, chapter "Native-code compilation". JOCAMLOPT(1)
All times are GMT -4. The time now is 04:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy