summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorjkoshy <jkoshy@FreeBSD.org>2007-10-21 05:15:07 +0000
committerjkoshy <jkoshy@FreeBSD.org>2007-10-21 05:15:07 +0000
commit3d86cf4179a6f161f318a9bdcff54fce085cd532 (patch)
tree0b736e9967e1642d88689ee0b2fb7ac113479f13 /lib
parent0141a749e70ef294c786121116414a34014e65b4 (diff)
downloadFreeBSD-src-3d86cf4179a6f161f318a9bdcff54fce085cd532.zip
FreeBSD-src-3d86cf4179a6f161f318a9bdcff54fce085cd532.tar.gz
Remove references to the 'e_phnum' field of the ELF header. Instead,
point the reader to the elf_getphnum() function. MFC after: 1 day
Diffstat (limited to 'lib')
-rw-r--r--lib/libelf/gelf_getphdr.312
-rw-r--r--lib/libelf/gelf_newphdr.311
2 files changed, 9 insertions, 14 deletions
diff --git a/lib/libelf/gelf_getphdr.3 b/lib/libelf/gelf_getphdr.3
index 51d20a0..d6ffb90 100644
--- a/lib/libelf/gelf_getphdr.3
+++ b/lib/libelf/gelf_getphdr.3
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2006 Joseph Koshy. All rights reserved.
+.\" Copyright (c) 2006,2007 Joseph Koshy. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@@ -23,7 +23,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd December 16, 2006
+.Dd October 21, 2007
.Os
.Dt GELF_GETPHDR 3
.Sh NAME
@@ -57,10 +57,9 @@ and
descriptors respectively.
These descriptors are described in
.Xr elf 5 .
-The number of entries in this array is specified by the
-.Va e_phnum
-field of the executable header for ELF descriptor
-.Ar elf .
+The number of entries in this array may be determined using the
+.Xr elf_getphnum 3
+function.
.Pp
Function
.Fn gelf_getphdr
@@ -134,6 +133,7 @@ was of an unsupported version.
.Xr elf64_getehdr 3 ,
.Xr elf64_newphdr 3 ,
.Xr elf_flagphdr 3 ,
+.Xr elf_getphnum 3 ,
.Xr gelf 3 ,
.Xr gelf_getehdr 3 ,
.Xr gelf_newphdr 3 ,
diff --git a/lib/libelf/gelf_newphdr.3 b/lib/libelf/gelf_newphdr.3
index c94b474..ba39f9d 100644
--- a/lib/libelf/gelf_newphdr.3
+++ b/lib/libelf/gelf_newphdr.3
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2006 Joseph Koshy. All rights reserved.
+.\" Copyright (c) 2006,2007 Joseph Koshy. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@@ -23,7 +23,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 25, 2006
+.Dd October 21, 2007
.Os
.Dt GELF_NEWPHDR 3
.Sh NAME
@@ -81,12 +81,6 @@ elements depending on the ELF class of ELF descriptor
.Ar elf .
.Pp
The functions set the
-.Va e_phnum
-field of the executable header for ELF descriptor
-.Ar elf
-to
-.Ar count ,
-and also set the
.Dv ELF_F_DIRTY
bit on the program header table.
All members of the returned array of Phdr structures
@@ -132,6 +126,7 @@ before using these APIs.
.Xr elf64_getphdr 3 ,
.Xr elf64_newehdr 3 ,
.Xr elf_flagphdr 3 ,
+.Xr elf_getphnum 3 ,
.Xr gelf 3 ,
.Xr gelf_getphdr 3 ,
.Xr gelf_newehdr 3 ,
OpenPOWER on IntegriCloud