149d3bc91SRichard Lowe /* 249d3bc91SRichard Lowe 307dc1947SRichard Lowe Copyright (C) 2000,2004 Silicon Graphics, Inc. All Rights Reserved. 449d3bc91SRichard Lowe 549d3bc91SRichard Lowe This program is free software; you can redistribute it and/or modify it 6*4d9fdb46SRobert Mustacchi under the terms of version 2.1 of the GNU Lesser General Public License 749d3bc91SRichard Lowe as published by the Free Software Foundation. 849d3bc91SRichard Lowe 949d3bc91SRichard Lowe This program is distributed in the hope that it would be useful, but 1049d3bc91SRichard Lowe WITHOUT ANY WARRANTY; without even the implied warranty of 11*4d9fdb46SRobert Mustacchi MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 1249d3bc91SRichard Lowe 1349d3bc91SRichard Lowe Further, this software is distributed without any warranty that it is 14*4d9fdb46SRobert Mustacchi free of the rightful claim of any third person regarding infringement 15*4d9fdb46SRobert Mustacchi or the like. Any license provided herein, whether implied or 1649d3bc91SRichard Lowe otherwise, applies only to this software file. Patent licenses, if 17*4d9fdb46SRobert Mustacchi any, provided herein do not apply to combinations of this program with 18*4d9fdb46SRobert Mustacchi other software, or any other product whatsoever. 1949d3bc91SRichard Lowe 2007dc1947SRichard Lowe You should have received a copy of the GNU Lesser General Public 2107dc1947SRichard Lowe License along with this program; if not, write the Free Software 2207dc1947SRichard Lowe Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301, 2349d3bc91SRichard Lowe USA. 2449d3bc91SRichard Lowe 2549d3bc91SRichard Lowe */ 2649d3bc91SRichard Lowe 2749d3bc91SRichard Lowe 2849d3bc91SRichard Lowe 2949d3bc91SRichard Lowe /* Bytes needed to encode a number. 3049d3bc91SRichard Lowe Not a tight bound, just a reasonable bound. 3149d3bc91SRichard Lowe */ 3249d3bc91SRichard Lowe #define ENCODE_SPACE_NEEDED (2*sizeof(Dwarf_Unsigned)) 3349d3bc91SRichard Lowe 3449d3bc91SRichard Lowe 3549d3bc91SRichard Lowe int _dwarf_pro_encode_leb128_nm(Dwarf_Unsigned val, int *nbytes, 36*4d9fdb46SRobert Mustacchi char *space, int splen); 3749d3bc91SRichard Lowe 3849d3bc91SRichard Lowe int _dwarf_pro_encode_signed_leb128_nm(Dwarf_Signed value, int *nbytes, 39*4d9fdb46SRobert Mustacchi char *space, int splen); 40