Go to file
Andrew Burgess f9ee45c3a9 bfd: make _bfd_section_size_insane part of the public API
If a BFD user is making use of a function like
bfd_get_section_contents to read a section into a pre-allocated
buffer, then that BFD user might also want to make use of
_bfd_section_size_insane prior to allocating the buffer they intend to
use in order to validate that the buffer size that plan to allocate is
sane.

This commit makes _bfd_section_size_insane public, by renaming it to
bfd_section_size_insane.

I've updated the existing uses within bfd/, I don't believe this
function is used outside of bfd/ currently.

One place that I plan to make use of this function is in
gdb/gdb_bfd.c, in the function gdb_bfd_get_full_section_contents.
This change isn't included in this commit, but will come later if/when
this has been merged into bfd.

There should be no change in behaviour after this commit.

bfd/

	* bfd-in2.h (bfd_section_size_insane): Add declaration.
	* compress.c (bfd_get_full_section_contents): Update for new name
	of _bfd_section_size_insane.
	(bfd_init_section_compress_status): Likewise.
	* dwarf2.c (read_section): Likewise.
	(_bfd_dwarf2_slurp_debug_info): Likewise.
	* libbfd.h (_bfd_section_size_insane): Remove declaration.
	* section.c (_bfd_section_size_insane): Rename to ...
	(bfd_section_size_insane): ... this.

binutils/

	* readelf.c (uncompress_section_contents): Update comment to
	account for new name of _bfd_section_size_insane.
2024-03-25 18:31:38 +00:00
bfd bfd: make _bfd_section_size_insane part of the public API 2024-03-25 18:31:38 +00:00
binutils bfd: make _bfd_section_size_insane part of the public API 2024-03-25 18:31:38 +00:00
config
contrib contrib: sync dg-extract-results.sh with GCC 2024-03-12 15:49:25 +00:00
cpu
elfcpp
etc
gas x86: fix Solaris testsuite failures 2024-03-22 09:08:51 +01:00
gdb gdb: move more completion setup into completer.c 2024-03-25 17:47:44 +00:00
gdbserver gdb/gdbserver: share x86/linux tdesc caching 2024-03-25 17:14:19 +00:00
gdbsupport Require trivial destructor in allocate_on_obstack 2024-03-21 12:21:24 -06:00
gnulib gnulib: re-generate build files 2024-03-11 22:42:56 -04:00
gold
gprof
gprofng
include gas, aarch64: Add faminmax extension 2024-03-19 15:41:41 +00:00
ld ld: Support LD_UNDER_TEST environment variable 2024-03-19 07:07:54 -07:00
libbacktrace
libctf
libdecnumber
libiberty
libsframe
opcodes gas, aarch64: Add faminmax extension 2024-03-19 15:41:41 +00:00
readline
sim sim/erc32: Rename EVENT_MAX -> MAX_EVENTS 2024-03-21 10:46:23 -06:00
texinfo
zlib
.cvsignore
.editorconfig
.gitattributes
.gitignore
.pre-commit-config.yaml .pre-commit-config.yaml: bump black hook to 24.3.0 2024-03-20 14:44:16 -04:00
ar-lib
ChangeLog .pre-commit-config.yaml: bump black hook to 24.3.0 2024-03-20 14:44:16 -04:00
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.LIBGLOSS
COPYING.NEWLIB
depcomp
djunpack.bat
install-sh
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS Fix compiling bfd/vms-lib.c for a 32-bit host. 2024-03-18 10:26:16 +00:00
Makefile.def Revert "Pass GUILE down to subdirectories" 2024-03-22 11:07:28 -06:00
Makefile.in Revert "Pass GUILE down to subdirectories" 2024-03-22 11:07:28 -06:00
Makefile.tpl Revert "Pass GUILE down to subdirectories" 2024-03-22 11:07:28 -06:00
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
README-maintainer-mode
SECURITY.txt
setup.com
src-release.sh
symlink-tree
test-driver
ylwrap

		   README for GNU development tools

This directory contains various GNU compilers, assemblers, linkers, 
debuggers, etc., plus their support routines, definitions, and documentation.

If you are receiving this as part of a GDB release, see the file gdb/README.
If with a binutils release, see binutils/README;  if with a libg++ release,
see libg++/README, etc.  That'll give you info about this
package -- supported targets, how to use it, how to report bugs, etc.

It is now possible to automatically configure and build a variety of
tools with one command.  To build all of the tools contained herein,
run the ``configure'' script here, e.g.:

	./configure 
	make

To install them (by default in /usr/local/bin, /usr/local/lib, etc),
then do:
	make install

(If the configure script can't determine your type of computer, give it
the name as an argument, for instance ``./configure sun4''.  You can
use the script ``config.sub'' to test whether a name is recognized; if
it is, config.sub translates it to a triplet specifying CPU, vendor,
and OS.)

If you have more than one compiler on your system, it is often best to
explicitly set CC in the environment before running configure, and to
also set CC when running make.  For example (assuming sh/bash/ksh):

	CC=gcc ./configure
	make

A similar example using csh:

	setenv CC gcc
	./configure
	make

Much of the code and documentation enclosed is copyright by
the Free Software Foundation, Inc.  See the file COPYING or
COPYING.LIB in the various directories, for a description of the
GNU General Public License terms under which you can copy the files.

REPORTING BUGS: Again, see gdb/README, binutils/README, etc., for info
on where and how to report problems.