LEB128UNSIGNEDENCODE64(3E) LEB128UNSIGNEDENCODE64(3E) NAME leb128unsignedencode64: leb128signedencode64: leb128unsignedencode32: leb128signedencode32: - encode leb128 integers SYNOPSIS #include <cmplrs/leb128.h> int leb128unsignedencode64(uint64t number, char* buffer); int leb128signedencode64(int64t number, char* buffer); int leb128unsignedencode32(uint32t number, char* buffer); int leb128signedencode32(int32t number, char* buffer); DESCRIPTION These routines encode integers into the leb128 format. The leb128 format is a variable-length encoding extensively used in the DWARF debugging information format and is described in the DWARF documentation. The encoded number is placed into buffer and the number of bytes of buffer used to encode the number is returned. Link with the option -lelfutil to link in these routines. The arguments are as follows: number is the input number to be converted to leb128 format. buffer is a buffer provided by the caller. The pointed-at-buffer must be at least 5 bytes long for the 64-bit input integers and at least 10 bytes long for the 32 bit input integers. No buffer overrun checking is possible in these routines so the caller must provide the required buffer space. FILES /usr/include/cmplrs/leb128.h /usr/lib/libelfutil.a /usr/lib32/libelfutil.a /usr/lib64/libelfutil.a DIAGNOSTICS Returns the number of bytes used to encode the number. The returned value will be in the range 1 to 5 for the 32-bit number input versions. The returned value will be in the range 1 to 10 for the 64-bit number input versions. Page 1
LEB128UNSIGNEDENCODE64(3E) LEB128UNSIGNEDENCODE64(3E) SEE ALSO libelfutil(5), xlate(4), _leb128_unsigned_decode64, _leb128_unsigned_decode32, _leb128_signed_decode64, _leb128_signed_decode32, DWARF Debugging Information Format , A Consumer Library Interface to DWARF Page 2