On Sun, May 26, 2024 at 11:51 PM Max Filippov <jcmvb...@gmail.com> wrote: > > diff --git a/libbacktrace/internal.h b/libbacktrace/internal.h > index 4fa0af8cb6c9..456911166026 100644 > --- a/libbacktrace/internal.h > +++ b/libbacktrace/internal.h > @@ -323,10 +323,22 @@ struct dwarf_sections > > struct dwarf_data; > > +#if defined (HAVE_DL_ITERATE_PHDR) && defined (__FDPIC__) > +typedef struct elf32_fdpic_loadaddr base_address_type; > +#define __RELOC_UINTPTR(ptr, base) ((uintptr_t)__RELOC_POINTER (ptr, base)) > +#define no_base_address ((struct elf32_fdpic_loadaddr){0}) > +#else > +typedef uintptr_t base_address_type; > +#define __RELOC_POINTER(ptr, base) ((ptr) + (base)) > +#define __RELOC_UINTPTR(ptr, base) ((uintptr_t)__RELOC_POINTER (ptr, base)) > +#define no_base_address ((uintptr_t)0) > +#endif > + > +
When I look at the uClibc sources, I don't understand how this works. This sets no_base_address to have a zero map field. But __RELOC_POINTER will crash when given a zero map field. At least that is what it looks like in uClibc/libc/sysdeps/linux/bfin/bits/elf-fdpic.h. What target and what library are you using? Thanks. Ian