/
usr
/
include
/
/usr/include
mkdir
upload
Name
Size
Mode
Actions
arpa/
-
0755
rm
asm/
-
0755
rm
asm-generic/
-
0755
rm
bind9/
-
0755
rm
bits/
-
0755
rm
c++/
-
0755
rm
drm/
-
0755
rm
e2p/
-
0755
rm
et/
-
0755
rm
event2/
-
0755
rm
ext2fs/
-
0755
rm
finclude/
-
0755
rm
fontconfig/
-
0755
rm
freetype2/
-
0755
rm
fstrm/
-
0755
rm
gdbm/
-
0755
rm
GL/
-
0755
rm
gnu/
-
0755
rm
google/
-
0755
rm
gssapi/
-
0755
rm
gssrpc/
-
0755
rm
json-c/
-
0755
rm
kadm5/
-
0755
rm
krb5/
-
0755
rm
libexslt/
-
0755
rm
libltdl/
-
0755
rm
libpng16/
-
0755
rm
libxml2/
-
0755
rm
libxslt/
-
0755
rm
linux/
-
0755
rm
lzma/
-
0755
rm
misc/
-
0755
rm
mtd/
-
0755
rm
mysql/
-
0755
rm
ncurses/
-
0755
rm
ncursesw/
-
0755
rm
net/
-
0755
rm
netash/
-
0755
rm
netatalk/
-
0755
rm
netax25/
-
0755
rm
neteconet/
-
0755
rm
netinet/
-
0755
rm
netipx/
-
0755
rm
netiucv/
-
0755
rm
netpacket/
-
0755
rm
netrom/
-
0755
rm
netrose/
-
0755
rm
nfs/
-
0755
rm
openssl/
-
0755
rm
perf/
-
0755
rm
protobuf-c/
-
0755
rm
protocols/
-
0755
rm
python3.6m/
-
0755
rm
python3.12/
-
0755
rm
rdma/
-
0755
rm
rpc/
-
0755
rm
scsi/
-
0755
rm
security/
-
0755
rm
selinux/
-
0755
rm
sepol/
-
0755
rm
sound/
-
0755
rm
sys/
-
0755
rm
uuid/
-
0755
rm
video/
-
0755
rm
webp/
-
0755
rm
X11/
-
0755
rm
xcb/
-
0755
rm
xen/
-
0755
rm
a.out.h
4350
0644
edit
dl
rm
aio.h
7456
0644
edit
dl
rm
aliases.h
2031
0644
edit
dl
rm
alloca.h
1203
0644
edit
dl
rm
ar.h
1730
0644
edit
dl
rm
argp.h
25414
0644
edit
dl
rm
argz.h
6050
0644
edit
dl
rm
assert.h
4561
0644
edit
dl
rm
autosprintf.h
2383
0644
edit
dl
rm
byteswap.h
1404
0644
edit
dl
rm
bzlib.h
6245
0644
edit
dl
rm
complex.h
7163
0644
edit
dl
rm
com_err.h
2118
0644
edit
dl
rm
cpio.h
2267
0644
edit
dl
rm
cpuidle.h
844
0644
edit
dl
rm
crypt.h
9118
0644
edit
dl
rm
ctype.h
10963
0644
edit
dl
rm
curses.h
99625
0644
edit
dl
rm
cursesapp.h
6775
0644
edit
dl
rm
cursesf.h
27849
0644
edit
dl
rm
cursesm.h
19677
0644
edit
dl
rm
cursesp.h
8601
0644
edit
dl
rm
cursesw.h
49719
0644
edit
dl
rm
cursslk.h
7304
0644
edit
dl
rm
dbm.h
1414
0644
edit
dl
rm
dirent.h
12484
0644
edit
dl
rm
dlfcn.h
7238
0644
edit
dl
rm
elf.h
174828
0644
edit
dl
rm
endian.h
3189
0644
edit
dl
rm
entities.h
4930
0644
edit
dl
rm
envz.h
2866
0644
edit
dl
rm
err.h
2209
0644
edit
dl
rm
errno.h
1678
0644
edit
dl
rm
error.h
2039
0644
edit
dl
rm
eti.h
2891
0644
edit
dl
rm
etip.h
9702
0644
edit
dl
rm
evdns.h
2019
0644
edit
dl
rm
event.h
2744
0644
edit
dl
rm
evhttp.h
2035
0644
edit
dl
rm
evrpc.h
2015
0644
edit
dl
rm
evutil.h
1782
0644
edit
dl
rm
execinfo.h
1522
0644
edit
dl
rm
expat.h
44273
0644
edit
dl
rm
expat_config.h
3910
0644
edit
dl
rm
expat_external.h
6029
0644
edit
dl
rm
fcntl.h
10958
0644
edit
dl
rm
features.h
16062
0644
edit
dl
rm
fenv.h
5857
0644
edit
dl
rm
FlexLexer.h
6893
0644
edit
dl
rm
fmtmsg.h
3239
0644
edit
dl
rm
fnmatch.h
2295
0644
edit
dl
rm
form.h
18601
0644
edit
dl
rm
fpu_control.h
3583
0644
edit
dl
rm
fstab.h
3111
0644
edit
dl
rm
fstrm.h
13017
0644
edit
dl
rm
fts.h
8372
0644
edit
dl
rm
ftw.h
5251
0644
edit
dl
rm
gconv.h
4081
0644
edit
dl
rm
gcrypt.h
70361
0644
edit
dl
rm
gd.h
57777
0644
edit
dl
rm
gdbm.h
10345
0644
edit
dl
rm
gdcache.h
2898
0644
edit
dl
rm
gdfontg.h
553
0644
edit
dl
rm
gdfontl.h
551
0644
edit
dl
rm
gdfontmb.h
519
0644
edit
dl
rm
gdfonts.h
515
0644
edit
dl
rm
gdfontt.h
546
0644
edit
dl
rm
gdfx.h
497
0644
edit
dl
rm
gdpp.h
52162
0644
edit
dl
rm
gd_color_map.h
478
0644
edit
dl
rm
gd_errors.h
1503
0644
edit
dl
rm
gd_io.h
3125
0644
edit
dl
rm
gelf.h
11406
0644
edit
dl
rm
getopt.h
1468
0644
edit
dl
rm
gettext-po.h
15534
0644
edit
dl
rm
glob.h
6614
0644
edit
dl
rm
gnu-versions.h
2342
0644
edit
dl
rm
gnumake.h
2912
0644
edit
dl
rm
gpg-error.h
67879
0644
edit
dl
rm
gpgrt.h
67879
0644
edit
dl
rm
grp.h
6686
0644
edit
dl
rm
gshadow.h
4528
0644
edit
dl
rm
gssapi.h
181
0644
edit
dl
rm
iconv.h
1857
0644
edit
dl
rm
idn-free.h
2472
0644
edit
dl
rm
idn-int.h
20
0644
edit
dl
rm
idna.h
3564
0644
edit
dl
rm
ieee754.h
4910
0644
edit
dl
rm
ifaddrs.h
2840
0644
edit
dl
rm
inttypes.h
11892
0644
edit
dl
rm
jconfig-64.h
2225
0644
edit
dl
rm
jconfig.h
246
0644
edit
dl
rm
jerror.h
15088
0644
edit
dl
rm
jmorecfg.h
15049
0644
edit
dl
rm
jpegint.h
15586
0644
edit
dl
rm
jpeglib.h
49875
0644
edit
dl
rm
kdb.h
69285
0644
edit
dl
rm
keyutils.h
7698
0644
edit
dl
rm
krad.h
8933
0644
edit
dl
rm
krb5.h
402
0644
edit
dl
rm
langinfo.h
17848
0644
edit
dl
rm
lastlog.h
126
0644
edit
dl
rm
libaio.h
8937
0644
edit
dl
rm
libelf.h
20318
0644
edit
dl
rm
libgen.h
1385
0644
edit
dl
rm
libintl.h
4579
0644
edit
dl
rm
limits.h
5412
0644
edit
dl
rm
link.h
7218
0644
edit
dl
rm
locale.h
7674
0644
edit
dl
rm
ltdl.h
5709
0644
edit
dl
rm
lzma.h
9817
0644
edit
dl
rm
malloc.h
6102
0644
edit
dl
rm
math.h
53318
0644
edit
dl
rm
mcheck.h
2434
0644
edit
dl
rm
memory.h
955
0644
edit
dl
rm
menu.h
12197
0644
edit
dl
rm
mntent.h
3358
0644
edit
dl
rm
monetary.h
1803
0644
edit
dl
rm
mqueue.h
3759
0644
edit
dl
rm
ncurses.h
99625
0644
edit
dl
rm
ncurses_dll.h
4277
0644
edit
dl
rm
nc_tparm.h
4197
0644
edit
dl
rm
ndbm.h
2454
0644
edit
dl
rm
netdb.h
28099
0644
edit
dl
rm
nlist.h
1601
0644
edit
dl
rm
nl_types.h
1752
0644
edit
dl
rm
nss.h
1878
0644
edit
dl
rm
obstack.h
21306
0644
edit
dl
rm
panel.h
4123
0644
edit
dl
rm
paths.h
2977
0644
edit
dl
rm
pcre2.h
44802
0644
edit
dl
rm
pcre2posix.h
5804
0644
edit
dl
rm
png.h
144149
0644
edit
dl
rm
pngconf.h
22845
0644
edit
dl
rm
pnglibconf.h
7567
0644
edit
dl
rm
poll.h
22
0644
edit
dl
rm
pr29.h
2123
0644
edit
dl
rm
printf.h
6800
0644
edit
dl
rm
proc_service.h
3476
0644
edit
dl
rm
profile.h
12154
0644
edit
dl
rm
pthread.h
41269
0644
edit
dl
rm
pty.h
1569
0644
edit
dl
rm
punycode.h
9384
0644
edit
dl
rm
pwd.h
6158
0644
edit
dl
rm
regex.h
24715
0644
edit
dl
rm
regexp.h
1447
0644
edit
dl
rm
resolv.h
12153
0644
edit
dl
rm
re_comp.h
962
0644
edit
dl
rm
sched.h
4732
0644
edit
dl
rm
search.h
5223
0644
edit
dl
rm
semaphore.h
2399
0644
edit
dl
rm
setjmp.h
3669
0644
edit
dl
rm
sgtty.h
1343
0644
edit
dl
rm
shadow.h
5471
0644
edit
dl
rm
signal.h
12243
0644
edit
dl
rm
spawn.h
6690
0644
edit
dl
rm
stab.h
264
0644
edit
dl
rm
stdc-predef.h
2289
0644
edit
dl
rm
stdint.h
8469
0644
edit
dl
rm
stdio.h
30168
0644
edit
dl
rm
stdio_ext.h
2799
0644
edit
dl
rm
stdlib.h
35653
0644
edit
dl
rm
string.h
17587
0644
edit
dl
rm
stringprep.h
8227
0644
edit
dl
rm
strings.h
4752
0644
edit
dl
rm
syscall.h
25
0644
edit
dl
rm
sysexits.h
5232
0644
edit
dl
rm
syslog.h
24
0644
edit
dl
rm
tar.h
3785
0644
edit
dl
rm
term.h
41190
0644
edit
dl
rm
termcap.h
3473
0644
edit
dl
rm
termio.h
214
0644
edit
dl
rm
termios.h
3598
0644
edit
dl
rm
term_entry.h
8760
0644
edit
dl
rm
tgmath.h
31489
0644
edit
dl
rm
threads.h
6655
0644
edit
dl
rm
thread_db.h
16023
0644
edit
dl
rm
tic.h
13638
0644
edit
dl
rm
tiff.h
35983
0644
edit
dl
rm
tiffconf-64.h
3429
0644
edit
dl
rm
tiffconf.h
250
0644
edit
dl
rm
tiffio.h
23227
0644
edit
dl
rm
tiffio.hxx
1702
0644
edit
dl
rm
tiffvers.h
410
0644
edit
dl
rm
time.h
10360
0644
edit
dl
rm
tld.h
4650
0644
edit
dl
rm
ttyent.h
2494
0644
edit
dl
rm
uchar.h
2001
0644
edit
dl
rm
ucontext.h
2036
0644
edit
dl
rm
ulimit.h
1583
0644
edit
dl
rm
unctrl.h
3099
0644
edit
dl
rm
unistd.h
42738
0644
edit
dl
rm
utime.h
1501
0644
edit
dl
rm
utmp.h
3222
0644
edit
dl
rm
utmpx.h
4099
0644
edit
dl
rm
values.h
1955
0644
edit
dl
rm
verto-module.h
6640
0644
edit
dl
rm
verto.h
19437
0644
edit
dl
rm
wait.h
22
0644
edit
dl
rm
wchar.h
31111
0644
edit
dl
rm
wctype.h
5548
0644
edit
dl
rm
wordexp.h
2501
0644
edit
dl
rm
zbuff.h
11500
0644
edit
dl
rm
zconf.h
16262
0644
edit
dl
rm
zdict.h
17203
0644
edit
dl
rm
zlib.h
96261
0644
edit
dl
rm
zstd.h
119972
0644
edit
dl
rm
zstd_errors.h
3751
0644
edit
dl
rm
Edit:
/usr/include/libelf.h
(20318B)
/* Interface for libelf. Copyright (C) 1998-2010, 2015 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify it under the terms of either * the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version or * the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version or both in parallel, as here. elfutils is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received copies of the GNU General Public License and the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef _LIBELF_H #define _LIBELF_H 1 #include <stdint.h> #include <sys/types.h> /* Get the ELF types. */ #include <elf.h> #ifndef SHF_COMPRESSED /* Older glibc elf.h might not yet define the ELF compression types. */ #define SHF_COMPRESSED (1 << 11) /* Section with compressed data. */ /* Section compression header. Used when SHF_COMPRESSED is set. */ typedef struct { Elf32_Word ch_type; /* Compression format. */ Elf32_Word ch_size; /* Uncompressed data size. */ Elf32_Word ch_addralign; /* Uncompressed data alignment. */ } Elf32_Chdr; typedef struct { Elf64_Word ch_type; /* Compression format. */ Elf64_Word ch_reserved; Elf64_Xword ch_size; /* Uncompressed data size. */ Elf64_Xword ch_addralign; /* Uncompressed data alignment. */ } Elf64_Chdr; /* Legal values for ch_type (compression algorithm). */ #define ELFCOMPRESS_ZLIB 1 /* ZLIB/DEFLATE algorithm. */ #define ELFCOMPRESS_LOOS 0x60000000 /* Start of OS-specific. */ #define ELFCOMPRESS_HIOS 0x6fffffff /* End of OS-specific. */ #define ELFCOMPRESS_LOPROC 0x70000000 /* Start of processor-specific. */ #define ELFCOMPRESS_HIPROC 0x7fffffff /* End of processor-specific. */ #endif #ifndef ELFCOMPRESS_ZSTD /* So ZSTD compression can be used even with an old system elf.h. */ #define ELFCOMPRESS_ZSTD 2 /* Zstandard algorithm. */ #endif #ifndef SHT_RELR /* So RELR defines/typedefs can be used even with an old system elf.h. */ #define SHT_RELR 19 /* RELR relative relocations */ /* RELR relocation table entry */ typedef Elf32_Word Elf32_Relr; typedef Elf64_Xword Elf64_Relr; #define DT_RELRSZ 35 /* Total size of RELR relative relocations */ #define DT_RELR 36 /* Address of RELR relative relocations */ #define DT_RELRENT 37 /* Size of one RELR relative relocaction */ #endif #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) # define __nonnull_attribute__(...) __attribute__ ((__nonnull__ (__VA_ARGS__))) # define __deprecated_attribute__ __attribute__ ((__deprecated__)) # define __pure_attribute__ __attribute__ ((__pure__)) # define __const_attribute__ __attribute__ ((__const__)) #else # define __nonnull_attribute__(...) # define __deprecated_attribute__ # define __pure_attribute__ # define __const_attribute__ #endif #if __GNUC__ < 4 #define __noreturn_attribute__ #else #define __noreturn_attribute__ __attribute__ ((noreturn)) #endif #ifdef __GNUC_STDC_INLINE__ # define __libdw_extern_inline extern __inline __attribute__ ((__gnu_inline__)) #else # define __libdw_extern_inline extern __inline #endif /* Known translation types. */ typedef enum { ELF_T_BYTE, /* unsigned char */ ELF_T_ADDR, /* Elf32_Addr, Elf64_Addr, ... */ ELF_T_DYN, /* Dynamic section record. */ ELF_T_EHDR, /* ELF header. */ ELF_T_HALF, /* Elf32_Half, Elf64_Half, ... */ ELF_T_OFF, /* Elf32_Off, Elf64_Off, ... */ ELF_T_PHDR, /* Program header. */ ELF_T_RELA, /* Relocation entry with addend. */ ELF_T_REL, /* Relocation entry. */ ELF_T_SHDR, /* Section header. */ ELF_T_SWORD, /* Elf32_Sword, Elf64_Sword, ... */ ELF_T_SYM, /* Symbol record. */ ELF_T_WORD, /* Elf32_Word, Elf64_Word, ... */ ELF_T_XWORD, /* Elf32_Xword, Elf64_Xword, ... */ ELF_T_SXWORD, /* Elf32_Sxword, Elf64_Sxword, ... */ ELF_T_VDEF, /* Elf32_Verdef, Elf64_Verdef, ... */ ELF_T_VDAUX, /* Elf32_Verdaux, Elf64_Verdaux, ... */ ELF_T_VNEED, /* Elf32_Verneed, Elf64_Verneed, ... */ ELF_T_VNAUX, /* Elf32_Vernaux, Elf64_Vernaux, ... */ ELF_T_NHDR, /* Elf32_Nhdr, Elf64_Nhdr, ... */ ELF_T_SYMINFO, /* Elf32_Syminfo, Elf64_Syminfo, ... */ ELF_T_MOVE, /* Elf32_Move, Elf64_Move, ... */ ELF_T_LIB, /* Elf32_Lib, Elf64_Lib, ... */ ELF_T_GNUHASH, /* GNU-style hash section. */ ELF_T_AUXV, /* Elf32_auxv_t, Elf64_auxv_t, ... */ ELF_T_CHDR, /* Compressed, Elf32_Chdr, Elf64_Chdr, ... */ ELF_T_NHDR8, /* Special GNU Properties note. Same as Nhdr, except padding. */ ELF_T_RELR, /* Relative relocation entry. */ /* Keep this the last entry. */ ELF_T_NUM } Elf_Type; /* Descriptor for data to be converted to or from memory format. */ typedef struct { void *d_buf; /* Pointer to the actual data. */ Elf_Type d_type; /* Type of this piece of data. */ unsigned int d_version; /* ELF version. */ size_t d_size; /* Size in bytes. */ int64_t d_off; /* Offset into section. */ size_t d_align; /* Alignment in section. */ } Elf_Data; /* Commands for `...'. */ typedef enum { ELF_C_NULL, /* Nothing, terminate, or compute only. */ ELF_C_READ, /* Read .. */ ELF_C_RDWR, /* Read and write .. */ ELF_C_WRITE, /* Write .. */ ELF_C_CLR, /* Clear flag. */ ELF_C_SET, /* Set flag. */ ELF_C_FDDONE, /* Signal that file descriptor will not be used anymore. */ ELF_C_FDREAD, /* Read rest of data so that file descriptor is not used anymore. */ /* The following are extensions. */ ELF_C_READ_MMAP, /* Read, but mmap the file if possible. */ ELF_C_RDWR_MMAP, /* Read and write, with mmap. */ ELF_C_WRITE_MMAP, /* Write, with mmap. */ ELF_C_READ_MMAP_PRIVATE, /* Read, but memory is writable, results are not written to the file. */ ELF_C_EMPTY, /* Copy basic file data but not the content. */ /* Keep this the last entry. */ ELF_C_NUM } Elf_Cmd; /* Flags for the ELF structures. */ enum { ELF_F_DIRTY = 0x1, #define ELF_F_DIRTY ELF_F_DIRTY ELF_F_LAYOUT = 0x4, #define ELF_F_LAYOUT ELF_F_LAYOUT ELF_F_PERMISSIVE = 0x8 #define ELF_F_PERMISSIVE ELF_F_PERMISSIVE }; /* Flags for elf_compress[_gnu]. */ enum { ELF_CHF_FORCE = 0x1 #define ELF_CHF_FORCE ELF_CHF_FORCE }; /* Identification values for recognized object files. */ typedef enum { ELF_K_NONE, /* Unknown. */ ELF_K_AR, /* Archive. */ ELF_K_COFF, /* Stupid old COFF. */ ELF_K_ELF, /* ELF file. */ /* Keep this the last entry. */ ELF_K_NUM } Elf_Kind; /* Archive member header. */ typedef struct { char *ar_name; /* Name of archive member. */ time_t ar_date; /* File date. */ uid_t ar_uid; /* User ID. */ gid_t ar_gid; /* Group ID. */ mode_t ar_mode; /* File mode. */ int64_t ar_size; /* File size. */ char *ar_rawname; /* Original name of archive member. */ } Elf_Arhdr; /* Archive symbol table entry. */ typedef struct { char *as_name; /* Symbol name. */ size_t as_off; /* Offset for this file in the archive. */ unsigned long int as_hash; /* Hash value of the name. */ } Elf_Arsym; /* Descriptor for the ELF file. */ typedef struct Elf Elf; /* Descriptor for ELF file section. */ typedef struct Elf_Scn Elf_Scn; #ifdef __cplusplus extern "C" { #endif /* Return descriptor for ELF file to work according to CMD. */ extern Elf *elf_begin (int __fildes, Elf_Cmd __cmd, Elf *__ref); /* Create a clone of an existing ELF descriptor. */ extern Elf *elf_clone (Elf *__elf, Elf_Cmd __cmd); /* Create descriptor for memory region. */ extern Elf *elf_memory (char *__image, size_t __size); /* Advance archive descriptor to next element. */ extern Elf_Cmd elf_next (Elf *__elf); /* Free resources allocated for ELF. */ extern int elf_end (Elf *__elf); /* Update ELF descriptor and write file to disk. */ extern int64_t elf_update (Elf *__elf, Elf_Cmd __cmd); /* Determine what kind of file is associated with ELF. */ extern Elf_Kind elf_kind (Elf *__elf) __pure_attribute__; /* Get the base offset for an object file. */ extern int64_t elf_getbase (Elf *__elf); /* Retrieve file identification data. */ extern char *elf_getident (Elf *__elf, size_t *__nbytes); /* Retrieve class-dependent object file header. */ extern Elf32_Ehdr *elf32_getehdr (Elf *__elf); /* Similar but this time the binary calls is ELFCLASS64. */ extern Elf64_Ehdr *elf64_getehdr (Elf *__elf); /* Create ELF header if none exists. */ extern Elf32_Ehdr *elf32_newehdr (Elf *__elf); /* Similar but this time the binary calls is ELFCLASS64. */ extern Elf64_Ehdr *elf64_newehdr (Elf *__elf); /* Get the number of program headers in the ELF file. If the file uses more headers than can be represented in the e_phnum field of the ELF header the information from the sh_info field in the zeroth section header is used. */ extern int elf_getphdrnum (Elf *__elf, size_t *__dst); /* Retrieve class-dependent program header table. */ extern Elf32_Phdr *elf32_getphdr (Elf *__elf); /* Similar but this time the binary calls is ELFCLASS64. */ extern Elf64_Phdr *elf64_getphdr (Elf *__elf); /* Create ELF program header. */ extern Elf32_Phdr *elf32_newphdr (Elf *__elf, size_t __cnt); /* Similar but this time the binary calls is ELFCLASS64. */ extern Elf64_Phdr *elf64_newphdr (Elf *__elf, size_t __cnt); /* Get section at INDEX. */ extern Elf_Scn *elf_getscn (Elf *__elf, size_t __index); /* Get section at OFFSET. */ extern Elf_Scn *elf32_offscn (Elf *__elf, Elf32_Off __offset); /* Similar but this time the binary calls is ELFCLASS64. */ extern Elf_Scn *elf64_offscn (Elf *__elf, Elf64_Off __offset); /* Get index of section. */ extern size_t elf_ndxscn (Elf_Scn *__scn); /* Get section with next section index. */ extern Elf_Scn *elf_nextscn (Elf *__elf, Elf_Scn *__scn); /* Create a new section and append it at the end of the table. */ extern Elf_Scn *elf_newscn (Elf *__elf); /* Get the section index of the extended section index table for the given symbol table. */ extern int elf_scnshndx (Elf_Scn *__scn); /* Get the number of sections in the ELF file. If the file uses more sections than can be represented in the e_shnum field of the ELF header the information from the sh_size field in the zeroth section header is used. */ extern int elf_getshdrnum (Elf *__elf, size_t *__dst); /* Sun messed up the implementation of 'elf_getshnum' in their implementation. It was agreed to make the same functionality available under a different name and obsolete the old name. */ extern int elf_getshnum (Elf *__elf, size_t *__dst) __deprecated_attribute__; /* Get the section index of the section header string table in the ELF file. If the index cannot be represented in the e_shstrndx field of the ELF header the information from the sh_link field in the zeroth section header is used. */ extern int elf_getshdrstrndx (Elf *__elf, size_t *__dst); /* Sun messed up the implementation of 'elf_getshstrndx' in their implementation. It was agreed to make the same functionality available under a different name and obsolete the old name. */ extern int elf_getshstrndx (Elf *__elf, size_t *__dst) __deprecated_attribute__; /* Retrieve section header of ELFCLASS32 binary. */ extern Elf32_Shdr *elf32_getshdr (Elf_Scn *__scn); /* Similar for ELFCLASS64. */ extern Elf64_Shdr *elf64_getshdr (Elf_Scn *__scn); /* Returns compression header for a section if section data is compressed. Returns NULL and sets elf_errno if the section isn't compressed or an error occurred. */ extern Elf32_Chdr *elf32_getchdr (Elf_Scn *__scn); extern Elf64_Chdr *elf64_getchdr (Elf_Scn *__scn); /* Compress or decompress the data of a section and adjust the section header. elf_compress works by setting or clearing the SHF_COMPRESS flag from the section Shdr and will encode or decode a Elf32_Chdr or Elf64_Chdr at the start of the section data. elf_compress_gnu will encode or decode any section, but is traditionally only used for sections that have a name starting with ".debug" when uncompressed or ".zdebug" when compressed and stores just the uncompressed size. The GNU compression method is deprecated and should only be used for legacy support. elf_compress takes a compression type that should be either zero to decompress or an ELFCOMPRESS algorithm to use for compression. Currently ELFCOMPRESS_ZLIB and ELFCOMPRESS_ZSTD are supported. elf_compress_gnu will compress in the traditional GNU compression format when compress is one and decompress the section data when compress is zero. The FLAGS argument can be zero or ELF_CHF_FORCE. If FLAGS contains ELF_CHF_FORCE then it will always compress the section, even if that would not reduce the size of the data section (including the header). Otherwise elf_compress and elf_compress_gnu will compress the section only if the total data size is reduced. On successful compression or decompression the function returns one. If (not forced) compression is requested and the data section would not actually reduce in size, the section is not actually compressed and zero is returned. Otherwise -1 is returned and elf_errno is set. It is an error to request compression for a section that already has SHF_COMPRESSED set, or (for elf_compress) to request decompression for an section that doesn't have SHF_COMPRESSED set. If a section has SHF_COMPRESSED set then calling elf_compress_gnu will result in an error. The section has to be decompressed first using elf_compress. Calling elf_compress on a section compressed with elf_compress_gnu is fine, but probably useless. It is always an error to call these functions on SHT_NOBITS sections or if the section has the SHF_ALLOC flag set. elf_compress_gnu will not check whether the section name starts with ".debug" or .zdebug". It is the responsibility of the caller to make sure the deprecated GNU compression method is only called on correctly named sections (and to change the name of the section when using elf_compress_gnu). All previous returned Shdrs and Elf_Data buffers are invalidated by this call and should no longer be accessed. Note that although this changes the header and data returned it doesn't mark the section as dirty. To keep the changes when calling elf_update the section has to be flagged ELF_F_DIRTY. */ extern int elf_compress (Elf_Scn *scn, int type, unsigned int flags); extern int elf_compress_gnu (Elf_Scn *scn, int compress, unsigned int flags); /* Set or clear flags for ELF file. */ extern unsigned int elf_flagelf (Elf *__elf, Elf_Cmd __cmd, unsigned int __flags); /* Similarly for the ELF header. */ extern unsigned int elf_flagehdr (Elf *__elf, Elf_Cmd __cmd, unsigned int __flags); /* Similarly for the ELF program header. */ extern unsigned int elf_flagphdr (Elf *__elf, Elf_Cmd __cmd, unsigned int __flags); /* Similarly for the given ELF section. */ extern unsigned int elf_flagscn (Elf_Scn *__scn, Elf_Cmd __cmd, unsigned int __flags); /* Similarly for the given ELF data. */ extern unsigned int elf_flagdata (Elf_Data *__data, Elf_Cmd __cmd, unsigned int __flags); /* Similarly for the given ELF section header. */ extern unsigned int elf_flagshdr (Elf_Scn *__scn, Elf_Cmd __cmd, unsigned int __flags); /* Get data from section while translating from file representation to memory representation. The Elf_Data d_type is set based on the section type if known. Otherwise d_type is set to ELF_T_BYTE. If the section contains compressed data then d_type is always set to ELF_T_CHDR. */ extern Elf_Data *elf_getdata (Elf_Scn *__scn, Elf_Data *__data); /* Get uninterpreted section content. */ extern Elf_Data *elf_rawdata (Elf_Scn *__scn, Elf_Data *__data); /* Create new data descriptor for section SCN. */ extern Elf_Data *elf_newdata (Elf_Scn *__scn); /* Get data translated from a chunk of the file contents as section data would be for TYPE. The resulting Elf_Data pointer is valid until elf_end (ELF) is called. */ extern Elf_Data *elf_getdata_rawchunk (Elf *__elf, int64_t __offset, size_t __size, Elf_Type __type); /* Return pointer to string at OFFSET in section INDEX. */ extern char *elf_strptr (Elf *__elf, size_t __index, size_t __offset); /* Return header of archive. */ extern Elf_Arhdr *elf_getarhdr (Elf *__elf); /* Return offset in archive for current file ELF. */ extern int64_t elf_getaroff (Elf *__elf); /* Select archive element at OFFSET. */ extern size_t elf_rand (Elf *__elf, size_t __offset); /* Get symbol table of archive. */ extern Elf_Arsym *elf_getarsym (Elf *__elf, size_t *__narsyms); /* Control ELF descriptor. */ extern int elf_cntl (Elf *__elf, Elf_Cmd __cmd); /* Retrieve uninterpreted file contents. */ extern char *elf_rawfile (Elf *__elf, size_t *__nbytes); /* Return size of array of COUNT elements of the type denoted by TYPE in the external representation. The binary class is taken from ELF. The result is based on version VERSION of the ELF standard. */ extern size_t elf32_fsize (Elf_Type __type, size_t __count, unsigned int __version) __const_attribute__; /* Similar but this time the binary calls is ELFCLASS64. */ extern size_t elf64_fsize (Elf_Type __type, size_t __count, unsigned int __version) __const_attribute__; /* Convert data structure from the representation in the file represented by ELF to their memory representation. */ extern Elf_Data *elf32_xlatetom (Elf_Data *__dest, const Elf_Data *__src, unsigned int __encode); /* Same for 64 bit class. */ extern Elf_Data *elf64_xlatetom (Elf_Data *__dest, const Elf_Data *__src, unsigned int __encode); /* Convert data structure from to the representation in memory represented by ELF file representation. */ extern Elf_Data *elf32_xlatetof (Elf_Data *__dest, const Elf_Data *__src, unsigned int __encode); /* Same for 64 bit class. */ extern Elf_Data *elf64_xlatetof (Elf_Data *__dest, const Elf_Data *__src, unsigned int __encode); /* Return error code of last failing function call. This value is kept separately for each thread. */ extern int elf_errno (void); /* Return error string for ERROR. If ERROR is zero, return error string for most recent error or NULL is none occurred. If ERROR is -1 the behaviour is similar to the last case except that not NULL but a legal string is returned. */ extern const char *elf_errmsg (int __error); /* Coordinate ELF library and application versions. */ extern unsigned int elf_version (unsigned int __version); /* Set fill bytes used to fill holes in data structures. */ extern void elf_fill (int __fill); /* Compute hash value. */ extern unsigned long int elf_hash (const char *__string) __pure_attribute__; /* Compute hash value using the GNU-specific hash function. */ extern unsigned long int elf_gnu_hash (const char *__string) __pure_attribute__; /* Compute simple checksum from permanent parts of the ELF file. */ extern long int elf32_checksum (Elf *__elf); /* Similar but this time the binary calls is ELFCLASS64. */ extern long int elf64_checksum (Elf *__elf); #ifdef __cplusplus } #endif #endif /* libelf.h */
Save
cmd:
run