From: Jan Beulich Date: Fri, 27 Dec 2024 10:37:42 +0000 (+0100) Subject: bfd/ELF: refine segment index in filepos assignment diag X-Git-Tag: gdb-16-branchpoint~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d5827a0e838caacb0337be95e6661fd8281e1968;p=thirdparty%2Fbinutils-gdb.git bfd/ELF: refine segment index in filepos assignment diag Reporting an internal loop index isn't helpful for the user to determine which segment the problem is with. Report the PHDR index instead. --- diff --git a/bfd/elf.c b/bfd/elf.c index 9f5ac6384f3..4b8efeb49ca 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -6398,8 +6398,8 @@ assign_file_positions_for_load_sections (bfd *abfd, { _bfd_error_handler /* xgettext:c-format */ - (_("%pB: section `%pA' can't be allocated in segment %d"), - abfd, sec, j); + (_("%pB: section `%pA' can't be allocated in segment %u"), + abfd, sec, m->idx); print_segment_map (m); } }