]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
bfd/ELF: refine segment index in filepos assignment diag
authorJan Beulich <jbeulich@suse.com>
Fri, 27 Dec 2024 10:37:42 +0000 (11:37 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 27 Dec 2024 10:37:42 +0000 (11:37 +0100)
Reporting an internal loop index isn't helpful for the user to determine
which segment the problem is with. Report the PHDR index instead.

bfd/elf.c

index 9f5ac6384f3b921f368443c2344b7fbcb76a9c44..4b8efeb49ca0aaf8a285d96f0429c079584bfeb8 100644 (file)
--- 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);
                }
            }