ld/src/ld/debugline.c
/* Read a ULEB128 into a 64-bit word.  Return (uint64_t)-1 on overflow
   or error.  On overflow, skip past the rest of the uleb128.  */
Read a ULEB128 into a 64-bit word.  Return (uint64_t)-1 on overflow
or error.  On overflow, skip past the rest of the uleb128.
Read a ULEB128 into a 64 - bit word . Return ( uint64_t ) - 1 on overflow or error . On overflow skip past the rest of the uleb128 .
static uint64_t
read_uleb128 (struct line_reader_data * leb)
{
  uint64_t result = 0;
  int bit = 0;
  do  {
    uint64_t b;
    if (leb->cpos == leb->end)
      return (uint64_t) -1;
    b = *leb->cpos & 0x7f;
    if (bit >= 64 || b << bit >> bit != b)
      result = (uint64_t) -1;
    else {
      result |= b << bit;
      bit += 7;
    }
  } while (*leb->cpos++ >= 0x80);
  return result;
}
static uint64_t read_uleb128 ( struct line_reader_data * leb ) { uint64_t result = 0 ; int bit = 0 ; do { uint64_t b ; if ( leb -> cpos == leb -> end ) return ( uint64_t ) -1 ; b = * leb -> cpos & 0x7f ; if ( bit >= 64 || b << bit >> bit != b ) result = ( uint64_t ) -1 ; else { result |= b << bit ; bit += 7 ; } } while ( * leb -> cpos ++ >= 0x80 ) ; return result ; }
Read a ULEB128 into a 64-bit word.
Read a ULEB128 into a 64 - bit word .