Go to file
Alan Modra 086c8f406d PR25333, GAS is slow processing -fdebug-types-sections
gas needs to build lists of sections for each group.  This arranges to
build the lists earlier, so they can be used when looking for sections
that belong to a group.  Using the section hash table to find sections
by name, then by group isn't efficient when there are numerous groups
with the same section names.  Using a hash table to quickly find a
group, then searching by section name on a list for the group results
in a 100-fold speed improvement assembling the testcase in this PR.

To reduce the number of times we traverse the section list, the patch
also moves some processing done in elf_adjust_symtab for linked-to
section, to elf_frob_file.  This requires a testsuite change because
processing will stop before elf_frob_file if there is a parse error in
section21.s, ie. you'll only get the "junk at end of line" error, not
the "undefined linked-to symbol" errors.

	PR 25333
	* config/obj-elf.c (struct group_list, groups): Move earlier.
	(match_section): New function, extracted from..
	(get_section_by_match): ..here.
	(free_section_idx): Move earlier.
	(group_section_find, group_section_insert): New functions.
	(change_section): Use the above.
	(elf_set_group_name): New function.
	(obj_elf_attach_to_group): Use elf_set_group_name.
	(set_additional_section_info): Handle linked_to_symbol_name and
	stabs code, extracted from..
	(adjust_stab_sections): ..here,..
	(build_additional_section_info): ..and here.
	(elf_adjust_symtab): Don't call build_additional_section_info.
	(elf_frob_file): Adjust.
	* config/obj-elf.h (elf_set_group_name): Declare.
	* config/tc-xtensa.c (cache_literal_section): Use elf_set_group_name.
	(xtensa_make_property_section): Likewise.
	* testsuite/gas/elf/attach-1.d: Stricter group section matching,
	and changed group section ordering.
	* testsuite/gas/elf/attach-2.d: Stricter group section matching.
	* testsuite/gas/elf/attach-2.s: Provide section bar type.
	* testsuite/gas/elf/elf.exp: Run attach-2.
	* testsuite/gas/elf/section21.l: Update.
	* testsuite/gas/elf/section21.s: Don't check for a parse error.
2024-02-24 14:59:13 +10:30
bfd xtensa: move xtensa_make_property_section from bfd to gas 2024-02-24 14:58:55 +10:30
binutils x86: also permit YMM/ZMM use in CFI directives 2024-02-23 11:59:09 +01:00
config
contrib
cpu
elfcpp
etc
gas PR25333, GAS is slow processing -fdebug-types-sections 2024-02-24 14:59:13 +10:30
gdb gdb: disable formatting-related flake8 warnings 2024-02-23 16:57:09 -05:00
gdbserver gdb: remove some GCC version checks 2024-02-21 13:30:17 -05:00
gdbsupport Fix throw_winerror_with_name build error on x86-64 Cygwin 2024-02-23 17:24:17 +00:00
gnulib
gold
gprof
gprofng
include xtensa: move xtensa_make_property_section from bfd to gas 2024-02-24 14:58:55 +10:30
ld Make is_relocatable_executable only affect dynamic section syms 2024-02-24 11:53:03 +10:30
libbacktrace
libctf
libdecnumber
libiberty
libsframe
opcodes x86: also permit YMM/ZMM use in CFI directives 2024-02-23 11:59:09 +01:00
readline
sim sim: no rule to make sim/ppc/Makefile.in 2024-02-24 11:52:10 +10:30
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
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.