Go to file
Alan Modra 93c6e8c3c1 PR30326, uninitialised value in objdump compare_relocs
This is a fuzzing PR, with a testcase involving a SHF_ALLOC and
SHF_COMPRESSED SHT_RELA section, ie. a compressed dynamic reloc
section.  BFD doesn't handle compressed relocation sections, with most
of the code reading relocs using sh_size (often no bfd section is
created) but in the case of SHF_ALLOC dynamic relocs we had some code
using the bfd section size.  This led to a mismatch, sh_size is
compressed, size is uncompressed, and from that some uninitialised
memory.  Consistently using sh_size is enough to fix this PR, but I've
also added tests to exclude SHF_COMPRESSED reloc sections from
consideration.

	PR 30362
	* elf.c (bfd_section_from_shdr): Exclude reloc sections with
	SHF_COMPRESSED flag from normal reloc processing.
	(_bfd_elf_get_dynamic_reloc_upper_bound): Similarly exclude
	SHF_COMPRESSED sections from consideration.  Use sh_size when
	sizing to match slurp_relocs.
	(_bfd_elf_canonicalize_dynamic_reloc): Likewise.
	(_bfd_elf_get_synthetic_symtab): Use NUM_SHDR_ENTRIES to size
	plt relocs.
	* elf32-arm.c (elf32_arm_get_synthetic_symtab): Likewise.
	* elf32-ppc.c (ppc_elf_get_synthetic_symtab): Likewise.
	* elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Likewise.
	* elfxx-mips.c (_bfd_mips_elf_get_synthetic_symtab): Likewise.
2023-04-12 14:13:46 +09:30
bfd PR30326, uninitialised value in objdump compare_relocs 2023-04-12 14:13:46 +09:30
binutils Replace an assertion in the dwarf code with a warning message. 2023-04-11 17:24:09 +01:00
config
contrib
cpu cpu/mem.opc whitespace tidy 2023-03-16 17:30:19 +10:30
elfcpp
etc
gas Fail of x86_64 AMX-COMPLEX insns (Intel disassembly) 2023-04-12 09:40:13 +09:30
gdb gdb, doc: correct argument description for info connections/inferiors 2023-04-11 18:45:35 +02:00
gdbserver gdbserver: allow agent expressions to fail with invalid memory access 2023-04-03 14:46:32 +01:00
gdbsupport gdb: move displaced_step_dump_bytes into gdbsupport (and rename) 2023-03-29 08:57:10 +01:00
gnulib
gold Add an option to the gold linker to put its version string into the .comment section. 2023-03-27 11:10:10 +01:00
gprof Fix an illegal memorty access when running gprof over corrupt data. 2023-04-11 16:22:28 +01:00
gprofng gprofng: Add version symbols to libgprofng.ver 2023-03-29 23:09:40 -07:00
include aarch64: Remove stray reglist variable 2023-03-30 17:01:30 +01:00
intl
ld bfd+ld: when / whether to generate .c files 2023-04-04 08:50:18 +02:00
libbacktrace
libctf libctf, link: fix CU-mapped links with CTF_LINK_EMPTY_CU_MAPPINGS 2023-04-08 16:07:17 +01:00
libdecnumber
libiberty
libsframe Remove unnecessary memsets in sframe-dump.c 2023-03-22 09:39:41 +10:30
opcodes Fix illegal memory access when disassembling corrupt NFP binaries. 2023-04-11 14:54:26 +01:00
readline
sim
texinfo
zlib
.cvsignore
.editorconfig
.gitattributes
.gitignore
ar-lib
ChangeLog
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
Makefile.def
Makefile.in
Makefile.tpl
makefile.vms
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
README-maintainer-mode
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.