Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ././../../../../../../usr/man/man3elf/elf_compress.3elf
Real path: /usr/share/man/man3elf/elf_compress.3elf
Zurück
'\" te .\" Copyright (c) 2015, 2021, Oracle and/or its affiliates. .TH elf_compress 3ELF "11 May 2021" "Oracle Solaris 11.4" "ELF Library Functions" .SH NAME elf_compress, elf_compress_gnu \- compress/decompress section data .SH SYNOPSIS .LP .nf cc [ \fIflag\fR ... ] \fIfile\fR ... \fB-lelf\fR [ \fIlibrary\fR ... ] #include <libelf.h> \fBint\fR \fBelf_compress\fR(\fBElf_Scn *\fR\fIscn\fR, \fBuint_t\fR \fItype\fR, \fBuint_t\fR \fIflags\fR); .fi .LP .nf \fBint\fR \fBelf_compress_gnu\fR(\fBElf_Scn *\fR\fIscn\fR, \fBint\fR \fIinflate\fR, \fBuint_t\fR \fIflags\fR); .fi .SH DESCRIPTION .sp .LP \fBelf_compress()\fR is used to compress or decompress an \fBELF\fR section. The \fItype\fR argument specifies the desired compression type, and can be one of the following. .sp .ne 2 .mk .na \fB\fB0\fR\fR .ad .br .sp .6 .RS 4n Decompress any compressed content. .RE .sp .ne 2 .mk .na \fB\fBELF_COMPRESS_ZLIB\fR\fR .ad .br .sp .6 .RS 4n \fBZLIB\fR compression, \fBELF\fR \fBABI\fR format. .RE .sp .LP \fBelf_compress_gnu()\fR is used to compress or decompress an \fBELF\fR section using the original \fBGNU\fR compression format. \fIinflate\fR is set to 1 to decompress, and 0 to compress. .sp .LP The \fIflags\fR argument is used to specify compression options. The \fIflags\fR argument can be 0, or can be set to the following value. .sp .ne 2 .mk .na \fB\fBELF_CHF_FORCE\fR\fR .ad .br .sp .6 .RS 4n In rare cases, compression algorithms can produce data larger than the original uncompressed data. The default behavior of \fBelf_compress()\fR and \fBelf_compress_gnu()\fR are to compress a given section only if the resulting section is reduced in size. Set \fBELF_CHF_FORCE\fR to require that the section always be compressed. .RE .SH RETURN VALUES .sp .LP If an error occurs, \fBelf_compress()\fR and \fBelf_compress_gnu()\fR return -1 and set \fBelf_errno()\fR. .sp .LP If the section was not compressed because the resulting data would be larger than the original, 0 is returned and the section is unaltered. .sp .LP If the section is successfully compressed, \fBelf_compress()\fR and \fBelf_compress_gnu()\fR update the section header, and the original data associated with the section is replaced. Any information previously returned for the section by \fBelf32_getshdr()\fR, \fBelf64_shdr()\fR, or \fBelf_getdata()\fR, is invalidated, and should no longer be referenced by the caller. The caller should defer calling those functions until after calling \fBelf_compress()\fR or \fBelf_compress_gnu()\fR, or should call them again afterward in order to obtain the new information. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Interface Stability Committed _ MT-Level MT-Safe .TE .sp .SH SEE ALSO .sp .LP \fBelf\fR(3ELF), \fBelf32_getchdr\fR(3ELF), \fBelf32_getshdr\fR(3ELF), \fBelf32_xlatetof\fR(3ELF), \fBelf64_getchdr\fR(3ELF), \fBelf64_getshdr\fR(3ELF), \fBelf64_xlatetof\fR(3ELF), \fBelf_errno\fR(3ELF), \fBelf_flagshdr\fR(3ELF), \fBelf_getdata\fR(3ELF), \fBelf_getscn\fR(3ELF), \fBelf_update\fR(3ELF), \fBlibelf\fR(3LIB), \fBattributes\fR(7) .SH NOTES .sp .LP \fBelf_compress()\fR and \fBelf_compress_gnu()\fR do not set the \fBELF_F_DIRTY\fR flag for the section. The caller must explicitly call \fBelf_flagshdr()\fR in order to keep the changes when \fBelf_update()\fR is used. .sp .LP \fBelf_compress()\fR and \fBelf_compress_gnu()\fR will reject a compression attempt for a section that is already compressed. The caller must first decompress the section, and then compress it into the desired format. .sp .LP \fBelf_compress()\fR and \fBelf_compress_gnu()\fR will reject a decompression attempt for a section that is already uncompressed. .sp .LP The original \fBGNU\fR compression format is deprecated. \fBelf_compress_gnu()\fR is provided in order to support existing objects. The use of \fBelf_compress()\fR when creating new objects is recommended. The original \fBGNU\fR compression format can only be applied to sections with names that start with \fB.debug\fR. On compression, that type requires the name to be altered to start with \fB.zdebug\fR. \fBelf_compress_gnu()\fR does not provide the replacement name. The caller is responsible for providing the replacement name.