1 .\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
3 .\" Redistribution and use in source and binary forms, with or without
4 .\" modification, are permitted provided that the following conditions
6 .\" 1. Redistributions of source code must retain the above copyright
7 .\" notice, this list of conditions and the following disclaimer.
8 .\" 2. Redistributions in binary form must reproduce the above copyright
9 .\" notice, this list of conditions and the following disclaimer in the
10 .\" documentation and/or other materials provided with the distribution.
12 .\" This software is provided by Joseph Koshy ``as is'' and
13 .\" any express or implied warranties, including, but not limited to, the
14 .\" implied warranties of merchantability and fitness for a particular purpose
15 .\" are disclaimed. in no event shall Joseph Koshy be liable
16 .\" for any direct, indirect, incidental, special, exemplary, or consequential
17 .\" damages (including, but not limited to, procurement of substitute goods
18 .\" or services; loss of use, data, or profits; or business interruption)
19 .\" however caused and on any theory of liability, whether in contract, strict
20 .\" liability, or tort (including negligence or otherwise) arising in any way
21 .\" out of the use of this software, even if advised of the possibility of
28 .Dt GELF_UPDATE_EHDR 3
30 .Nm gelf_update_ehdr ,
31 .Nm gelf_update_phdr ,
33 .Nd update underlying ELF data structures
39 .Fn gelf_update_ehdr "Elf *elf" "GElf_Ehdr *ehdr"
41 .Fn gelf_update_phdr "Elf *elf" "int ndx" "GElf_Phdr *phdr"
43 .Fn gelf_update_shdr "Elf_Scn *scn" "GElf_Shdr *shdr"
45 These functions are used to update ELF data structures on the underlying
47 Class-dependent data structures in the underlying ELF descriptor
48 are updated using the data in the class-independent GElf descriptors
49 and the underlying ELF data structures are marked
51 The conversion process signals an error if the values being copied
52 to the target ELF data structure would exceed representation
54 GElf descriptors are described in
59 updates the ELF Executable Header with the values in the
60 class-independent executable header
65 updates the ELF Program Header structure at index
67 with the values in the class-independent program header
72 updates the ELF Section Header structure associated with section
75 with the values in argument
78 These functions return a non-zero integer on success, or zero in case
81 These functions may fail with the following errors:
82 .Bl -tag -width "[ELF_E_RESOURCE]"
83 .It Bq Er ELF_E_ARGUMENT
92 .It Bq Er ELF_E_ARGUMENT
95 was not a descriptor for an ELF object.
96 .It Bq Er ELF_E_ARGUMENT
99 had an unsupported ELF class.
100 .It Bq Er ELF_E_ARGUMENT
103 exceeded the number of entries in the program header table.
104 .It Bq Er ELF_E_ARGUMENT
107 was not associated with an ELF descriptor.
111 was not opened for writing or updating.
112 .It Bq Er ELF_E_RESOURCE
113 An out of memory condition was detected.