12de3b87aSKai Wang.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved. 22de3b87aSKai Wang.\" 32de3b87aSKai Wang.\" Redistribution and use in source and binary forms, with or without 42de3b87aSKai Wang.\" modification, are permitted provided that the following conditions 52de3b87aSKai Wang.\" are met: 62de3b87aSKai Wang.\" 1. Redistributions of source code must retain the above copyright 72de3b87aSKai Wang.\" notice, this list of conditions and the following disclaimer. 82de3b87aSKai Wang.\" 2. Redistributions in binary form must reproduce the above copyright 92de3b87aSKai Wang.\" notice, this list of conditions and the following disclaimer in the 102de3b87aSKai Wang.\" documentation and/or other materials provided with the distribution. 112de3b87aSKai Wang.\" 122de3b87aSKai Wang.\" This software is provided by Joseph Koshy ``as is'' and 132de3b87aSKai Wang.\" any express or implied warranties, including, but not limited to, the 142de3b87aSKai Wang.\" implied warranties of merchantability and fitness for a particular purpose 152de3b87aSKai Wang.\" are disclaimed. in no event shall Joseph Koshy be liable 162de3b87aSKai Wang.\" for any direct, indirect, incidental, special, exemplary, or consequential 172de3b87aSKai Wang.\" damages (including, but not limited to, procurement of substitute goods 182de3b87aSKai Wang.\" or services; loss of use, data, or profits; or business interruption) 192de3b87aSKai Wang.\" however caused and on any theory of liability, whether in contract, strict 202de3b87aSKai Wang.\" liability, or tort (including negligence or otherwise) arising in any way 212de3b87aSKai Wang.\" out of the use of this software, even if advised of the possibility of 222de3b87aSKai Wang.\" such damage. 232de3b87aSKai Wang.\" 24*ae500c1fSEd Maste.\" $Id: elf_getshstrndx.3 3643 2018-10-14 21:09:24Z jkoshy $ 252de3b87aSKai Wang.\" 26*ae500c1fSEd Maste.Dd July 25, 2018 272de3b87aSKai Wang.Dt ELF_GETSHSTRNDX 3 28*ae500c1fSEd Maste.Os 292de3b87aSKai Wang.Sh NAME 302de3b87aSKai Wang.Nm elf_getshstrndx , 312de3b87aSKai Wang.Nm elf_setshstrndx 322de3b87aSKai Wang.Nd retrieve/update the index of the section name string table 332de3b87aSKai Wang.Sh LIBRARY 342de3b87aSKai Wang.Lb libelf 352de3b87aSKai Wang.Sh SYNOPSIS 362de3b87aSKai Wang.In libelf.h 372de3b87aSKai Wang.Ft int 382de3b87aSKai Wang.Fn elf_getshstrndx "Elf *elf" "size_t *ndxptr" 392de3b87aSKai Wang.Ft int 402de3b87aSKai Wang.Fn elf_setshstrndx "Elf *elf" "size_t ndx" 412de3b87aSKai Wang.Sh DESCRIPTION 422de3b87aSKai WangFunction 432de3b87aSKai Wang.Fn elf_getshstrndx 44*ae500c1fSEd Masteis deprecated. 45*ae500c1fSEd MastePlease use 46*ae500c1fSEd Maste.Xr elf_getshdrstrndx 3 47*ae500c1fSEd Masteinstead. 48*ae500c1fSEd Maste.Pp 49*ae500c1fSEd MasteFunction 50*ae500c1fSEd Maste.Fn elf_getshstrndx 512de3b87aSKai Wangretrieves the section index of the string table containing section 522de3b87aSKai Wangnames from descriptor 532de3b87aSKai Wang.Ar elf 542de3b87aSKai Wangand stores it into the location pointed to by argument 552de3b87aSKai Wang.Ar ndxptr . 562de3b87aSKai Wang.Pp 572de3b87aSKai WangFunction 582de3b87aSKai Wang.Fn elf_setshstrndx 592de3b87aSKai Wangsets the index of the section name string table to argument 602de3b87aSKai Wang.Ar ndx . 612de3b87aSKai Wang.Pp 622de3b87aSKai WangThese routines allow applications to process both normal ELF 632de3b87aSKai Wangobjects and ELF objects that use extended section numbering uniformly. 642de3b87aSKai Wang.Sh RETURN VALUES 652de3b87aSKai WangThese functions return a non-zero value if successful, or zero in case 662de3b87aSKai Wangof an error. 672de3b87aSKai Wang.Sh ERRORS 682de3b87aSKai WangThese functions can fail with the following errors: 692de3b87aSKai Wang.Bl -tag -width "[ELF_E_RESOURCE]" 702de3b87aSKai Wang.It Bq Er ELF_E_ARGUMENT 712de3b87aSKai WangA NULL value was passed in for argument 722de3b87aSKai Wang.Ar elf . 732de3b87aSKai Wang.It Bq Er ELF_E_ARGUMENT 742de3b87aSKai WangArgument 752de3b87aSKai Wang.Ar elf 762de3b87aSKai Wangwas not for an ELF file. 772de3b87aSKai Wang.It Bq Er ELF_E_ARGUMENT 782de3b87aSKai WangArgument 792de3b87aSKai Wang.Ar elf 802de3b87aSKai Wanglacks an ELF Executable header. 812de3b87aSKai Wang.It Bq Er ELF_E_ARGUMENT 822de3b87aSKai WangArgument 832de3b87aSKai Wang.Ar ndx 842de3b87aSKai Wangcontained a value in the reserved range of section indices. 852de3b87aSKai Wang.El 862de3b87aSKai Wang.Sh SEE ALSO 872de3b87aSKai Wang.Xr elf 3 , 882de3b87aSKai Wang.Xr elf32_getehdr 3 , 892de3b87aSKai Wang.Xr elf64_getehdr 3 , 902de3b87aSKai Wang.Xr elf_getident 3 , 912de3b87aSKai Wang.Xr elf_getphdrnum 3 , 922de3b87aSKai Wang.Xr elf_getshdrnum 3 , 932de3b87aSKai Wang.Xr gelf 3 , 942de3b87aSKai Wang.Xr gelf_getehdr 3 95