[PATCH] dwarf: constify read_leb128()'s first parameter
Jan Beulich
jbeulich@suse.com
Mon Jan 19 11:54:48 GMT 2026
It's not clear why the 2nd one is, but the 1st one isn't.
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -278,7 +278,7 @@ null_name (const char *p)
No bytes will be read at address END or beyond. */
uint64_t
-read_leb128 (unsigned char *data,
+read_leb128 (const unsigned char *data,
const unsigned char *const end,
bool sign,
unsigned int *length_return,
--- a/binutils/dwarf.h
+++ b/binutils/dwarf.h
@@ -269,7 +269,7 @@ extern void * xcrealloc (void *, uint64_
offset. */
extern bool reloc_at (struct dwarf_section *, uint64_t);
-extern uint64_t read_leb128 (unsigned char *, const unsigned char *const,
+extern uint64_t read_leb128 (const unsigned char *, const unsigned char *const,
bool, unsigned int *, int *);
#if HAVE_LIBDEBUGINFOD
More information about the Binutils
mailing list