4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
22 # Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
25 This directory contains sample programs that demonstrate how to use libelf.
26 Manual pages for libelf routines are located in section 3e: Library Functions.
28 Each of these sample programs displays, or manipulates information from a ELF
29 file. Each program uses libelf differently. To learn more about ELF files
30 and their format refer to the "Linker & Libraries Guide", which is part of the
31 "Software Developer Collection", and the "System V Application Binary
34 The following source files are provided:
36 pcom.c print comment: prints the .comment section of an ELF file.
37 Demonstrates how to examine a file opened with
40 acom.c append comment: appends to, or creates a .comment section
41 within an ELF file. Demonstrates the updating of a file with
44 dcom.c delete comment: deletes a .comment section from an ELF file.
45 Demonstrates the creation of a ELF file with
46 elf_begin(ELF_C_WRITE)
48 tpcom.c threaded print comment: a threaded version of pcom.c.
49 Demonstrates that libelf is MT-Safe and can be used by a
52 dispsyms.c print symbols: scans a ELF file for any symbol tables
53 (SHT_SYMTAB, SHT_DYNSYM, or SHT_SUNW_LDYNSYM) and
54 displays the symbol tables contents.
56 Makefile make file to build the above programs.
62 To build the programs: