+2019-12-10 Alan Modra <amodra@gmail.com>
+
+ * objdump.c (struct objdump_disasm_info): Delete "sec".
+ (find_symbol_for_address): Use inf->section rather than aux->sec.
+ (objdump_print_addr, disassemble_bytes): Likewise.
+ (disassemble_section): Don't set aux->sec.
+
2019-12-08 Alan Modra <amodra@gmail.com>
* testsuite/lib/binutils-common.exp (regexp_diff): Support #?REGEXP.
struct objdump_disasm_info
{
bfd * abfd;
- asection * sec;
bfd_boolean require_sec;
arelent ** dynrelbuf;
long dynrelcount;
aux = (struct objdump_disasm_info *) inf->application_data;
abfd = aux->abfd;
- sec = aux->sec;
+ sec = inf->section;
opb = inf->octets_per_byte;
/* Perform a binary search looking for the closest symbol to the
if (display_file_offsets)
inf->fprintf_func (inf->stream, _(" (File Offset: 0x%lx)"),
- (long int)(aux->sec->filepos + (vma - aux->sec->vma)));
+ (long int) (inf->section->filepos
+ + (vma - inf->section->vma)));
return;
}
if (!skip_find)
sym = find_symbol_for_address (vma, inf, NULL);
- objdump_print_addr_with_sym (aux->abfd, aux->sec, sym, vma, inf,
+ objdump_print_addr_with_sym (aux->abfd, inf->section, sym, vma, inf,
skip_zeroes);
}
SFILE sfile;
aux = (struct objdump_disasm_info *) inf->application_data;
- section = aux->sec;
+ section = inf->section;
sfile.alloc = 120;
sfile.buffer = (char *) xmalloc (sfile.alloc);
return;
}
- paux->sec = section;
pinfo->buffer = data;
pinfo->buffer_vma = section->vma;
pinfo->buffer_length = datasize;