2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2025-03-22 20:41:06 +08:00
H.J. Lu 694d4a6d0c Use the section flag 'o' for __patchable_function_entries
This commit in GNU binutils 2.35:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=b7d072167715829eed0622616f6ae0182900de3e

added the section flag 'o' to .section directive:

.section __patchable_function_entries,"awo",@progbits,foo

which specifies the symbol name which the section references.  Assembler
creates a unique __patchable_function_entries section with the section,
where foo is defined, as its linked-to section.  Linker keeps a section
if its linked-to section is kept during garbage collection.

This patch checks assembler support for the section flag 'o' and uses
it to implement __patchable_function_entries section.  Since Solaris may
use GNU assembler with Solairs ld.  Even if GNU assembler supports the
section flag 'o', it doesn't mean that Solairs ld supports it.  This
feature is disabled for Solairs targets.

gcc/

	PR middle-end/93195
	PR middle-end/93197
	* configure.ac (HAVE_GAS_SECTION_LINK_ORDER): New.  Define 1 if
	the assembler supports the section flag 'o' for specifying
	section with link-order.
	* output.h (SECTION_LINK_ORDER): New.  Defined to 0x8000000.
	(SECTION_MACH_DEP): Changed from 0x8000000 to 0x10000000.
	* targhooks.c (default_print_patchable_function_entry): Pass
	SECTION_LINK_ORDER to switch_to_section if the section flag 'o'
	works.  Pass current_function_decl to switch_to_section.
	* varasm.c (default_elf_asm_named_section): Use 'o' flag for
	SECTION_LINK_ORDER if assembler supports it.
	* config.in: Regenerated.
	* configure: Likewise.
	* doc/sourcebuild.texi: Document o_flag_in_section.

gcc/testsuite/

	PR middle-end/93195
	* g++.dg/pr93195a.C: New test.
	* g++.dg/pr93195b.C: Likewise.
	* lib/target-supports.exp
	(check_effective_target_o_flag_in_section): New proc.
2020-12-02 05:32:37 -08:00
2020-11-26 00:16:41 +00:00
2020-12-01 00:16:38 +00:00
2020-11-19 00:16:30 +00:00
2020-11-30 00:16:27 +00:00
2020-11-30 00:16:27 +00:00
2020-11-30 00:16:27 +00:00
2020-12-02 00:16:41 +00:00
2020-11-30 00:16:27 +00:00
2020-12-01 00:16:38 +00:00
2020-11-30 00:16:27 +00:00
2020-11-30 00:16:27 +00:00
2020-11-30 00:16:27 +00:00
2020-11-26 00:16:41 +00:00
2020-11-30 00:16:27 +00:00
2020-11-30 00:16:27 +00:00
2020-11-30 00:16:27 +00:00
2020-12-01 00:16:38 +00:00
2020-11-30 00:16:27 +00:00
2020-11-30 00:16:27 +00:00
2020-11-30 00:16:27 +00:00
2020-11-30 00:16:27 +00:00
2020-11-30 00:16:27 +00:00
2020-11-30 00:16:27 +00:00
2020-11-16 12:52:43 +01:00
2020-11-30 00:16:27 +00:00

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.
Description
No description provided
Readme 2.1 GiB
Languages
C++ 31.9%
C 31.3%
Ada 12%
D 6.5%
Go 6.4%
Other 11.5%