summaryrefslogtreecommitdiffstats
path: root/lib/libelf/elf_getdata.3
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2013-02-19 03:23:13 +0000
committermarkj <markj@FreeBSD.org>2013-02-19 03:23:13 +0000
commit9d1eadb90cf4258c6fac103fcfba47da25f9713e (patch)
treed116d72888ac5080438f87a1b426c334be6426a9 /lib/libelf/elf_getdata.3
parent7c5c2ceb800933c363adda6c307b08b701bd3c54 (diff)
downloadFreeBSD-src-9d1eadb90cf4258c6fac103fcfba47da25f9713e.zip
FreeBSD-src-9d1eadb90cf4258c6fac103fcfba47da25f9713e.tar.gz
- Make sure to set an error code when trying to obtain a data descriptor for
a section of type SHT_NULL. - Update the man page to reflect the fact that elf_getdata() and elf_rawdata() may return with an error of ELF_E_SECTION. PR: bin/175491 Approved by: emaste (co-mentor) MFC after: 1 week
Diffstat (limited to 'lib/libelf/elf_getdata.3')
-rw-r--r--lib/libelf/elf_getdata.319
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/libelf/elf_getdata.3 b/lib/libelf/elf_getdata.3
index 97766d8..7961220 100644
--- a/lib/libelf/elf_getdata.3
+++ b/lib/libelf/elf_getdata.3
@@ -23,7 +23,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd January 26, 2011
+.Dd February 18, 2013
.Dt ELF_GETDATA 3
.Os
.Sh NAME
@@ -186,6 +186,23 @@ was not associated with section descriptor
.Ar scn .
.It Bq Er ELF_E_RESOURCE
An out of memory condition was detected.
+.It Bq Er ELF_E_SECTION
+Section
+.Ar scn
+had type
+.Dv SHT_NULL .
+.It Bq Er ELF_E_SECTION
+The type of the section
+.Ar scn
+was not recognized by the library.
+.It Bq Er ELF_E_SECTION
+The size of the section
+.Ar scn
+is not a multiple of the file size for its section type.
+.It Bq Er ELF_E_SECTION
+The file offset for section
+.Ar scn
+is incorrect.
.El
.Sh SEE ALSO
.Xr elf 3 ,
OpenPOWER on IntegriCloud