aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2022-09-09 12:01:08 +0100
committerNick Clifton <nickc@redhat.com>2022-09-09 12:01:55 +0100
commitefc1521e40b67f2eac4f5f425731195d385fa127 (patch)
tree236c17a4bc11b46d06c38a82cfb1869e2354b423 /bfd/elf.c
parent1daabcc746e7d2f04ab190b49aec9abb020f29aa (diff)
downloadgdb-efc1521e40b67f2eac4f5f425731195d385fa127.zip
gdb-efc1521e40b67f2eac4f5f425731195d385fa127.tar.gz
gdb-efc1521e40b67f2eac4f5f425731195d385fa127.tar.bz2
Support debuginfo files with empty group sections.
PR 29532 bfd * elf.c (setup_group): Do not return false if there is no group information available. bionutils* objcopy.c (setup_section): Leave group sections intact when creating separate debuginfo files.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 1f427e4..2eb2a97 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -830,7 +830,11 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect)
/* xgettext:c-format */
_bfd_error_handler (_("%pB: no group info for section '%pA'"),
abfd, newsect);
- return false;
+ /* PR 29532: Return true here, even though the group info has not been
+ read. Separate debug info files can have empty group sections, but
+ we do not want this to prevent them from being loaded as otherwise
+ GDB will not be able to use them. */
+ return true;
}
return true;
}