aboutsummaryrefslogtreecommitdiff
path: root/bfd/Makefile.am
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-11-11 13:43:42 +1030
committerAlan Modra <amodra@gmail.com>2022-11-11 18:05:36 +1030
commitf7502dfe3f99d09fba2fc49f806ccc6b0a18c06d (patch)
tree2647f5d77d7515971d4ece107bafb5c4520920ac /bfd/Makefile.am
parentd0e5049d8fa8e1994a42bb0296f72cc981b8ce8c (diff)
downloadgdb-f7502dfe3f99d09fba2fc49f806ccc6b0a18c06d.zip
gdb-f7502dfe3f99d09fba2fc49f806ccc6b0a18c06d.tar.gz
gdb-f7502dfe3f99d09fba2fc49f806ccc6b0a18c06d.tar.bz2
PR28834, PR26946 sanity checking section size
This patch provides a new function to sanity check section sizes. It's mostly extracted from what we had in bfd_get_full_section_contents but also handles compressed debug sections. Improvements are: - section file offset is taken into account, - added checks that a compressed section can be read from file. The function is then used when handling multiple .debug_* sections that need to be read into a single buffer, to sanity check sizes before allocating the buffer. PR 26946, PR 28834 * Makefile.am (LIBBFD_H_FILES): Add section.c. * compress.c (bfd_get_full_section_contents): Move section size sanity checks.. * section.c (_bfd_section_size_insane): ..to here. New function. * dwarf2.c (read_section): Use _bfd_section_size_insane. (_bfd_dwarf2_slurp_debug_info): Likewise. * Makefile.in: Regenerate. * libbfd.h: Regenerate.
Diffstat (limited to 'bfd/Makefile.am')
-rw-r--r--bfd/Makefile.am2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index b70d8f3..9331377 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -929,7 +929,7 @@ BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c \
linker.c simple.c compress.c
BFD64_H_FILES = archive64.c
LIBBFD_H_FILES = libbfd-in.h libbfd.c bfdio.c bfdwin.c \
- cache.c reloc.c targets.c archures.c linker.c
+ cache.c reloc.c section.c targets.c archures.c linker.c
LIBCOFF_H_FILES = libcoff-in.h coffcode.h
headers: stmp-bin2-h stmp-lbfd-h stmp-lcoff-h