GCC modified for the FreeChainXenon project
Find a file
Joseph Myers c49d51fa81 Implement LDPT_REGISTER_CLAIM_FILE_HOOK_V2 linker plugin hook [PR109128]
This is one part of the fix for PR109128, along with a corresponding
binutils's linker change.  Without this patch, what happens in the
linker, when an unused object in a .a file has offload data, is that
elf_link_is_defined_archive_symbol calls bfd_link_plugin_object_p,
which ends up calling the plugin's claim_file_handler, which then
records the object as one with offload data. That is, the linker never
decides to use the object in the first place, but use of this _p
interface (called as part of trying to decide whether to use the
object) results in the plugin deciding to use its offload data (and a
consequent mismatch in the offload data present at runtime).

The new hook allows the linker plugin to distinguish calls to
claim_file_handler that know the object is being used by the linker
(from ldmain.c:add_archive_element), from calls that don't know it's
being used by the linker (from elf_link_is_defined_archive_symbol); in
the latter case, the plugin should avoid recording the object as one
with offload data.

	PR middle-end/109128

	include/
	* plugin-api.h (ld_plugin_claim_file_handler_v2)
	(ld_plugin_register_claim_file_v2)
	(LDPT_REGISTER_CLAIM_FILE_HOOK_V2): New.
	(struct ld_plugin_tv): Add tv_register_claim_file_v2.

	lto-plugin/
	* lto-plugin.c (register_claim_file_v2): New.
	(claim_file_handler_v2): New.
	(claim_file_handler): Wrap claim_file_handler_v2.
	(onload): Handle LDPT_REGISTER_CLAIM_FILE_HOOK_V2.
2023-05-11 10:08:50 +02:00
c++tools Daily bump. 2023-04-01 00:17:38 +00:00
config
contrib Daily bump. 2023-04-29 00:16:48 +00:00
fixincludes Daily bump. 2023-03-29 00:17:01 +00:00
gcc Testsuite: Add 'torture-init-done', and use it to conditionalize implicit 'torture-init' 2023-05-11 10:03:58 +02:00
gnattools Daily bump. 2023-04-26 00:17:46 +00:00
gotools
include Implement LDPT_REGISTER_CLAIM_FILE_HOOK_V2 linker plugin hook [PR109128] 2023-05-11 10:08:50 +02:00
INSTALL
intl
libada
libatomic Daily bump. 2023-03-25 00:16:51 +00:00
libbacktrace Daily bump. 2023-03-29 00:17:01 +00:00
libcc1
libcody
libcpp Daily bump. 2023-05-10 00:17:49 +00:00
libdecnumber
libffi Daily bump. 2023-05-07 00:16:40 +00:00
libgcc Daily bump. 2023-05-03 00:17:11 +00:00
libgfortran Daily bump. 2023-05-09 00:16:43 +00:00
libgm2 Daily bump. 2023-05-09 00:16:43 +00:00
libgo mime: remove test ordering dependency 2023-04-07 14:07:10 -07:00
libgomp Daily bump. 2023-05-10 00:17:49 +00:00
libiberty Daily bump. 2023-04-03 00:16:43 +00:00
libitm
libobjc
libphobos Daily bump. 2023-03-18 00:16:40 +00:00
libquadmath Daily bump. 2023-03-03 00:16:38 +00:00
libsanitizer Daily bump. 2023-05-01 00:16:44 +00:00
libssp
libstdc++-v3 Daily bump. 2023-05-11 00:16:33 +00:00
libvtv
lto-plugin Implement LDPT_REGISTER_CLAIM_FILE_HOOK_V2 linker plugin hook [PR109128] 2023-05-11 10:08:50 +02:00
maintainer-scripts Daily bump. 2023-04-21 00:17:31 +00:00
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2023-05-11 00:16:33 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure configure: Only create serdep.tmp if needed 2023-04-21 13:16:08 -06:00
configure.ac configure: Only create serdep.tmp if needed 2023-04-21 13:16:08 -06:00
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
depcomp
install-sh
libtool-ldflags
libtool.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
MAINTAINERS MAINTAINERS: Add myself to write after approval 2023-05-11 08:58:03 +08:00
Makefile.def
Makefile.in Fix autoprofiledbootstrap build 2023-04-28 13:15:33 -07:00
Makefile.tpl Fix autoprofiledbootstrap build 2023-04-28 13:15:33 -07:00
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
ylwrap

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.