mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-31 01:45:52 +08:00
* objfiles.h (struct obj_section): Remove addr and endaddr fields.
(obj_section_offset, obj_section_addr, obj_section_endaddr): New macros. * objfiles.c (add_to_objfile_sections): Don't set addr, endaddr and offset. Use size_t instead of unsigned long. (build_objfile_section_table): Use size_t instead of unsigned long. (objfile_relocate): Don't relocate s->addr and s->endaddr, they're gone. (find_pc_sect_section): Use obj_section_addr and obj_section_endaddr. * symfile.c (symfile.c): Remove code that maps sections offsets in "addr" to the object's sections. * blockframe.c (find_pc_partial_function): Use obj_section_endaddr. * gcore.c (gcore_create_callback): Use obj_section_addr and obj_section_endaddr. * maint.c (print_objfile_section_info): Likewise. * printcmd.c (sym_info): Use obj_section_addr and obj_section_endaddr. * symtab.c (fixup_section): Likewise.
This commit is contained in:
@ -1081,7 +1081,8 @@ fixup_section (struct general_symbol_info *ginfo,
|
||||
int idx = s->the_bfd_section->index;
|
||||
CORE_ADDR offset = ANOFFSET (objfile->section_offsets, idx);
|
||||
|
||||
if (s->addr - offset <= addr && addr < s->endaddr - offset)
|
||||
if (obj_section_addr (s) - offset <= addr
|
||||
&& addr < obj_section_endaddr (s) - offset)
|
||||
{
|
||||
ginfo->bfd_section = s->the_bfd_section;
|
||||
ginfo->section = idx;
|
||||
|
Reference in New Issue
Block a user