Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ldahread(3x) [ultrix man page]

ldahread(3x)															      ldahread(3x)

       ldahread - read the archive header of a member of an archive file

       #include <stdio.h>
       #include <ar.h>
       #include <filehdr.h>
       #include <syms.h>
       #include <ldfcn.h>

       int ldahread (ldptr, arhead)
       LDFILE *ldptr;
       ARCHDR *arhead;

       If  TYPE(ldptr) is the archive file magic number, the function reads the archive header of the common object file currently associated with
       ldptr into the area of memory beginning at arhead.

       The function returns success or failure.  If TYPE(ldptr) does not represent an archive file or if it cannot read the archive header, fails.

See Also
       intro(3x), ldclose(3x), ldopen(3x), ar(5), ldfcn(5)

								       RISC							      ldahread(3x)

Check Out this Related Man Page

ldopen(3x)																ldopen(3x)

       ldopen, ldaopen, ldreadst - open a common object file for reading

       #include <stdio.h>
       #include <filehdr.h>
       #include <syms.h>
       #include <ldfcn.h>

       LDFILE *ldopen (filename, ldptr)
       char *filename;
       LDFILE *ldptr;

       LDFILE *ldaopen (filename, oldptr)
       char *filename;
       LDFILE *oldptr;

       ldreadst (ldptr, flags)
       LDFILE *ldptr;

       The  and functions provide uniform access to simple object files and to object files that are members of archive files.	An archive of com-
       mon object files can be processed as if it is a series of simple common object files.

       If ldptr has the value null, opens filename, allocates and initializes the LDFILE structure, and returns a pointer to the structure to  the
       calling program.

       If ldptr is valid and TYPE(ldptr) is the archive magic number, reinitializes the LDFILE structure for the next archive member of filename.

       The  and  functions work in concert.  The function returns failure only when only when TYPE(ldptr) is the archive magic number and there is
       another file in the archive to be processed.  Only then should be called with the current value of ldptr.  In all other	cases,	but  espe-
       cially when a new filename is opened, should be called with a null ldptr argument.

       The following is a prototype for the use of and
       /* for each filename to be processed*/

       ldptr = NULL;
	    if ( (ldptr = ldopen(filename, ldptr)) != NULL )

		 /* check magic number */
		 /* process the file */
       } while (ldclose(ldptr) == FAILURE );

       If  the	value  of  oldptr  is  not NULL, opens filename anew and allocates and initializes a new LDFILE structure, copying the fields from
       oldptr.	The function returns a pointer to the new LDFILE structure.  This new pointer is independent of the old pointer, oldptr.  The  two
       pointers  can  be  used	concurrently to read separate parts of the object file.  For example, one pointer can be used to step sequentially
       through the relocation information while the other is used to read indexed symbol table entries.

       The and functions open filename for reading.  If filename cannot be opened or if memory for the LDFILE structure cannot be allocated,  both
       functions return NULL.  A successful open does not ensure that the given file is a common object file or an archived object file.

       The  function  causes  the symbol table header and file descriptor table to be read.  Further access, using ldptr, causes other appropriate
       sections of the symbol table to be read (for example, if you call the symbols or externals are read).  To force sections  for  each  symbol
       table in memory, call with ST_P* constants or'ed together from st_support.h.

See Also
       fopen(3s), ldclose(3x), ldfcn(5)

								       RISC								ldopen(3x)
Man Page

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

A short history of UNIX by

<h1>A short history of UNIX</h1> <p>In the late 1960's Ken Thompsom joined the computing-science research group at Bell Laboratories, which is the research arm of the giant American corporation ATT. He and many colleagues had been collaborating with MIT and GE on the development of an... (0 Replies)
Discussion started by: Neo
0 Replies

2. Answers to Frequently Asked Questions

Lost root password / Can't login as root

We have quite a few threads about this subject. I have collected some of them and arranged them by the OS which is primarily discussed in the thread. That is because the exact procedure depends on the OS involved. What's more, since you often need to interact with the boot process, the... (0 Replies)
Discussion started by: Perderabo
0 Replies

3. Programming

How do you detect keystrokes in canonical mode?

I'm writing a command shell, and I want to be able to detect when the user presses an arrow key (otherwise it just prints [[A, [[B, etc.). I know it's relatively easy (although somewhat more time-consuming) to detect keystrokes in noncanonical mode, but I've noticed that the bash shell detects... (4 Replies)
Discussion started by: Ultrix
4 Replies

4. UNIX for Dummies Questions & Answers

Linux (Ubuntu) = Unix (NOT IMPORTANT - NO RUSH)

I'm learning off Linux (Ubuntu) right now. I want to move up to Unix, but I don't want to rush like I did when it came to Windows --> to Linux. What is the best Unix OS that fits in pretty well with Ubuntu. In other words is there kind of an equal Linux with Unix? Also what do I need to... (10 Replies)
Discussion started by: Linux_Guy
10 Replies

5. IP Networking

Can I change my hostname without messing things up?

I noticed my hostname is <my-full-name>s-macbook.local. I'm not sure exactly what information leaves the local network, and whether the hostname is included, but if it is, this would mean people on the Internet can look at my hostname and see who I am. Before anyone says that's not possible,... (4 Replies)
Discussion started by: Ultrix
4 Replies