Commit Graph

119557 Commits

Author SHA1 Message Date
GDB Administrator
b4e166e049 Automatic date update in version.in 2024-09-19 00:01:14 +00:00
H.J. Lu
f307db3d8b bfd: Pass true to ld_plugin_object_p
Since linker calls bfd_plugin_object_p, which calls ld_plugin_object_p,
only for command-line input objects, pass true to ld_plugin_object_p so
that the same input IR file won't be included twice if the new LTO hook,
LDPT_REGISTER_CLAIM_FILE_HOOK_V2 isn't used.

	PR ld/32153
	* plugin.c (bfd_plugin_object_p): Pass true to ld_plugin_object_p.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit c839a44c39)
2024-09-19 04:19:36 +08:00
GDB Administrator
679f197bc8 Automatic date update in version.in 2024-09-18 00:02:13 +00:00
GDB Administrator
3351ddd224 Automatic date update in version.in 2024-09-17 00:01:15 +00:00
GDB Administrator
07f4c03656 Automatic date update in version.in 2024-09-16 00:00:45 +00:00
GDB Administrator
54e48e5542 Automatic date update in version.in 2024-09-15 00:01:01 +00:00
GDB Administrator
ba90e0eff2 Automatic date update in version.in 2024-09-14 00:01:05 +00:00
GDB Administrator
76c931eb76 Automatic date update in version.in 2024-09-13 00:01:09 +00:00
GDB Administrator
a470646786 Automatic date update in version.in 2024-09-12 00:01:13 +00:00
GDB Administrator
226d23bf8c Automatic date update in version.in 2024-09-11 00:01:47 +00:00
GDB Administrator
6bb67f8722 Automatic date update in version.in 2024-09-10 00:00:54 +00:00
GDB Administrator
ea6b1f429f Automatic date update in version.in 2024-09-09 00:01:21 +00:00
GDB Administrator
bff7182994 Automatic date update in version.in 2024-09-08 00:01:06 +00:00
GDB Administrator
2d6d59d477 Automatic date update in version.in 2024-09-07 00:01:05 +00:00
GDB Administrator
04cb3ca037 Automatic date update in version.in 2024-09-06 00:01:41 +00:00
GDB Administrator
14dd83a776 Automatic date update in version.in 2024-09-05 00:01:36 +00:00
GDB Administrator
a79658f2ba Automatic date update in version.in 2024-09-04 00:00:48 +00:00
GDB Administrator
3fa4e50ff1 Automatic date update in version.in 2024-09-03 00:02:26 +00:00
GDB Administrator
2ef3a3c4d3 Automatic date update in version.in 2024-09-02 00:00:56 +00:00
GDB Administrator
9874b1fdbb Automatic date update in version.in 2024-09-01 00:00:45 +00:00
GDB Administrator
fe6fe3bddb Automatic date update in version.in 2024-08-31 00:00:49 +00:00
GDB Administrator
bed034f359 Automatic date update in version.in 2024-08-30 00:00:49 +00:00
GDB Administrator
bd7cd9f47d Automatic date update in version.in 2024-08-29 00:01:36 +00:00
GDB Administrator
3a73ed9ff7 Automatic date update in version.in 2024-08-28 00:00:43 +00:00
GDB Administrator
21f556d3a1 Automatic date update in version.in 2024-08-27 00:00:54 +00:00
Alan Modra
cd3e2b58f2 PR32109, aborting at bfd/bfd.c:1236 in int _bfd_doprnt
Since bfd_section for .strtab isn't set, print the section index
instead.  Also, don't return NULL on this error as that results in
multiple mmap/read of the string table.  (We could return NULL if we
arranged to set sh_size zero first, but just what we do with fuzzed
object files is of no concern, and terminating the table might make a
faulty object file usable.)

	PR 32109
	* elf.c (bfd_elf_get_str_section): Remove outdated comment, and
	tweak shstrtabsize test to suit.  Don't use string tab bfd_section
	in error message, use index instead.  Don't return NULL on
	unterminated string section, terminate it.
	(_bfd_elf_get_dynamic_symbols): Similarly terminate string table
	section.

(cherry picked from commit db856d4100)
2024-08-26 09:42:55 +09:30
GDB Administrator
4190bf37ab Automatic date update in version.in 2024-08-26 00:00:51 +00:00
GDB Administrator
daae4cd579 Automatic date update in version.in 2024-08-25 00:00:40 +00:00
GDB Administrator
27b72edbad Automatic date update in version.in 2024-08-24 00:00:32 +00:00
GDB Administrator
72d6677c81 Automatic date update in version.in 2024-08-23 00:01:01 +00:00
H.J. Lu
2d37b890e5 lto: Add a test for PR ld/32083
Add a test for PR ld/32083 and xfail the test for GCC without the fix:

commit a98dd536b1017c2b814a3465206c6c01b2890998
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Aug 21 07:25:25 2024 -0700

    Update LDPT_REGISTER_CLAIM_FILE_HOOK_V2 linker plugin hook

	PR ld/32083
	* testsuite/ld-plugin/common-2a.c: New file.
	* testsuite/ld-plugin/common-2b.c: Likewise.
	* testsuite/ld-plugin/lto.exp: Run PR ld/32083 test.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit eb53cbeca8)
2024-08-22 06:55:09 -07:00
H.J. Lu
d16a1893c4 ld: Add an LTO test for common symbol override
Linker checks if a symbol in an archive member is a real definition, not
common, before including the archive member in the link output so that
only a real definition in archive will override the common symbol in
object file.  Add an LTO test to verify that a real definition in archive
overrides the common symbol in object file.

	* testsuite/ld-plugin/common-1.c: New file.
	* testsuite/ld-plugin/definition-1.c: Likewise.
	* testsuite/ld-plugin/lto.exp: Run common tests.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit 8be33827cd)
2024-08-22 06:54:58 -07:00
GDB Administrator
5824c288c9 Automatic date update in version.in 2024-08-22 00:02:05 +00:00
GDB Administrator
63b8d59fd0 Automatic date update in version.in 2024-08-21 00:02:14 +00:00
GDB Administrator
101f0d30d6 Automatic date update in version.in 2024-08-20 00:00:56 +00:00
GDB Administrator
0a6365fa95 Automatic date update in version.in 2024-08-19 00:01:17 +00:00
GDB Administrator
1e0ae22b6d Automatic date update in version.in 2024-08-18 00:00:53 +00:00
Nick Clifton
e4cfe6dab3 Re-enable development changes on the 2_43 branch 2024-08-17 18:18:25 +01:00
Nick Clifton
beb2cdbcda This is the 2.43.1 release 2024-08-17 17:54:56 +01:00
GDB Administrator
ddf04874fa Automatic date update in version.in 2024-08-17 00:02:55 +00:00
Vladimir Mezentsev
20fc125374 gprofng: fix typo in src/collctrl.cc
gprofng/ChangeLog
2024-08-13  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	* src/collctrl.cc (read_cpuinfo): Fix typo.
2024-08-16 09:48:21 -07:00
GDB Administrator
17740eddaa Automatic date update in version.in 2024-08-16 00:01:37 +00:00
H.J. Lu
92b6ecd558 lto: Don't include unused LTO archive members in output
When plugin_object_p is called by elf_link_is_defined_archive_symbol to
check if a symbol in archive is a real definition, set archive member
plugin_format to bfd_plugin_yes_unused to avoid including the unused LTO
archive members in linker output.  When plugin_object_p is called as
known used, call plugin claim_file if plugin_format is bfd_plugin_unknown
or bfd_plugin_yes_unused.

To get the proper support for archives with LTO common symbols with GCC,
the GCC fix for

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116361

is needed.

bfd/

	PR ld/32083
	* archures.c (bfd_arch_get_compatible): Treat bfd_plugin_yes_unused
	the same as bfd_plugin_yes.
	* elflink.c (elf_link_is_defined_archive_symbol): Likewise.
	* bfd.c (bfd_plugin_format): Add bfd_plugin_yes_unused.
	* plugin.c (try_claim): Try claim_file_v2 first.
	* bfd-in2.h: Regenerated.

ld/

	PR ld/32083
	* plugin.c (plugin_call_claim_file): Add an argument to return
	if LDPT_REGISTER_CLAIM_FILE_HOOK_V2 is used.
	(plugin_object_p): When KNOWN_USED is false, we call plugin
	claim_file if plugin_format is bfd_plugin_unknown and set
	plugin_format to bfd_plugin_yes_unused on LTO object.  When
	KNOWN_USED is true, we call plugin claim_file if plugin_format
	is bfd_plugin_unknown or bfd_plugin_yes_unused.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit a6f8fe0a9e)
2024-08-15 16:24:02 -07:00
GDB Administrator
0831d9e199 Automatic date update in version.in 2024-08-15 00:02:39 +00:00
Jan Beulich
cb204acaff gas: correct .irpc handling with empty string
Following 69cab370cf ("gas: adjust handling of quotes for .irpc") the
closing quote was mistakenly treated as the first quoted character.
2024-08-14 11:28:19 +02:00
Jan Beulich
d13452d18a x86: correct .insn with opcode extension and VEX/XOP/EVEX encoding
When VexVVVV handling was re-worked, .insn broke: When an opcode
extension is in use, VexVVVV_DST needs using now, as ModR/M.reg is
already occupied, matching what c8866e3ec5 ("x86: Drop using
extension_opcode to encode vvvv register") did.

While adding (bad) POP2 forms, also slightly adjust existing ones:
No need to use XMM registers, and no need to specify %r8 when really
%rax is meant twice (EVEX.vvvv not really being the culprit there, or
else EVEX.V' would also have needed mentioning).
2024-08-14 11:28:18 +02:00
GDB Administrator
b3d03ac8e9 Automatic date update in version.in 2024-08-14 00:02:16 +00:00
H.J. Lu
2dc940272a ld: Add PR ld/32067 tests
Add PR ld/32067 tests with the compiler driver since the -plugin option
is needed to trigger this --oformat binary bug.

	PR ld/32067
	* testsuite/ld-i386/i386.exp: Run PR ld/32067 test.
	* testsuite/ld-x86-64/x86-64.exp: Likewise.
	* testsuite/ld-i386/start.s: Add .note.GNU-stack section.
	* testsuite/ld-x86-64/pr32067.s: New file.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit 602f5cf7e3)
2024-08-12 17:57:30 -07:00
GDB Administrator
7e64e40df7 Automatic date update in version.in 2024-08-13 00:02:17 +00:00
Alan Modra
28867943aa PR32067, ld -Wl,--oformat,binary crash in _bfd_elf_link_keep_memory
The direct fix for this segfault is to test for a non-NULL bed in
_bfd_elf_link_keep_memory, but also there isn't much point in running
code for LTO if the output is binary.

	PR 32067
	* elflink.c (_bfd_elf_link_keep_memory): Test for non-NULL bed.
	(elf_link_add_object_symbols): Don't run the loop setting
	non_ir_ref_regular if the output hash table is not ELF.

(cherry picked from commit ec8f5671b4)
2024-08-13 08:22:24 +09:30