[binutils-gdb] dwarf: constify read_leb128()'s first parameter
Jan Beulich
jbeulich@sourceware.org
Wed Jan 21 13:48:55 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d8a29310d29b7348e1515e042f95c27f54702166
commit d8a29310d29b7348e1515e042f95c27f54702166
Author: Jan Beulich <jbeulich@suse.com>
Date: Wed Jan 21 14:45:35 2026 +0100
dwarf: constify read_leb128()'s first parameter
It's not clear why the 2nd one is, but the 1st one isn't.
Diff:
---
binutils/dwarf.c | 2 +-
binutils/dwarf.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 772fffd4b38..b5e9917b5fc 100644
--- 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,
diff --git a/binutils/dwarf.h b/binutils/dwarf.h
index 7d5e2756faa..878089974e9 100644
--- a/binutils/dwarf.h
+++ b/binutils/dwarf.h
@@ -269,7 +269,7 @@ extern void * xcrealloc (void *, uint64_t, size_t);
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-cvs
mailing list