]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 1 Oct 2021 00:00:37 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agold: pru: Fix resource_table output section alignment
Dimitar Dimitrov [Mon, 27 Sep 2021 19:43:24 +0000 (22:43 +0300)] 
ld: pru: Fix resource_table output section alignment

My commit 261980de18b added alignment for the resource table symbol.
But it is wrong.  The Linux remoteproc driver loads and interprets the
contents of the .resource_table ELF section, not of a table symbol.

Without this patch, if the linker happens to output padding for symbol
alignment, then the resource table contents as viewed by the kernel
loader would "shift" and look corrupted.

ld/ChangeLog:

* scripttempl/pru.sc  (.resource_table): Align the output
section, not the first symbol.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
(cherry picked from commit 5109a7bd9b87bdad530f2ebf97036e6087b4504d)

3 years ago[GOLD] PowerPC64 support for sym+addend GOT entries
Alan Modra [Thu, 26 Aug 2021 02:47:51 +0000 (12:17 +0930)] 
[GOLD] PowerPC64 support for sym+addend GOT entries

Pass addends to all the GOT handling functions, plus remove some
extraneous asserts.

PR 28192
* powerpc.cc (Output_data_got_powerpc): Add addend parameter to
all methods creating got entries.
(Target_powerpc::Scan::local): Pass reloc addend to got handling
functions, and when creating dynamic got relocations.
(Target_powerpc::Scan::global): Likewise.
(Target_powerpc::Relocate::relocate): Likewise.  Remove extraneous
assertions.

(cherry picked from commit 5cdb4f14426a99ec8fcba843fa503efdc55fa078)

3 years ago[GOLD] Got_entry::write addends
Alan Modra [Wed, 25 Aug 2021 12:28:51 +0000 (21:58 +0930)] 
[GOLD] Got_entry::write addends

This takes care of writing out GOT entries with addends.  The local
symbol case was already largely handled, except for passing the addend
to tls_offset_for_local which might need the addend in a
local_got_offset call.  That's needed also in tls_offset_for_global.

I'm assuming here that GOT entries for function symbols won't ever
have addends, and in particular that a GOT entry referencing PLT call
stub code won't want an offset into the code.

PR 28192
* output.cc (Output_data_got::Got_entry::write): Include addend
in global symbol value.  Pass addend to tls_offset_for_*.
* powerpc.cc (Target_powerpc::do_tls_offset_for_local): Handle addend.
(Target_powerpc::do_tls_offset_for_global): Likewise.
* s390.cc (Target_s390::do_tls_offset_for_local): Likewise.
(Target_s390::do_tls_offset_for_global): Likewise.
* target.h (Target::tls_offset_for_local): Add addend param.
(Target::tls_offset_for_global): Likewise.
(Target::do_tls_offset_for_local): Likewise.
(Target::do_tls_offset_for_global): Likewise.

(cherry picked from commit e4d49a0f908415edb7a7e718ef2008a96dd43f9b)

3 years ago[GOLD] Output_data_got create entry method addends
Alan Modra [Wed, 25 Aug 2021 10:54:18 +0000 (20:24 +0930)] 
[GOLD] Output_data_got create entry method addends

This patch makes all the Output_data_got methods that create new
entries accept an optional addend.

PR 28192
* output.h (Output_data_got::add_global): Add optional addend
parameter.  Update comment.  Delete overload without addend.
(Output_data_got::add_global_plt): Likewise.
(Output_data_got::add_global_tls): Likewise.
(Output_data_got::add_global_with_rel): Likewise.
(Output_data_got::add_global_pair_with_rel): Likewise.
(Output_data_got::add_local_plt): Likewise.
(Output_data_got::add_local_tls): Likewise.
(Output_data_got::add_local_tls_pair): Likewise.
(Output_data_got::reserve_local): Likewise.
(Output_data_got::reserve_global): Likewise.
(Output_data_got::Got_entry): Include addend in global sym
constructor.  Delete local sym constructor without addend.
* output.cc (Output_data_got::add_global): Add addend param,
pass to got handling methods.
(Output_data_got::add_global_plt): Likewise.
(Output_data_got::add_global_with_rel): Likewise.
(Output_data_got::add_global_pair_with_rel): Likewise.
(Output_data_got::add_local_plt): Likewise.
(Output_data_got::add_local_tls_pair): Likewise.
(Output_data_got::reserve_local): Likewise.
(Output_data_got::reserve_global): Likewise.

(cherry picked from commit 2cc9ed14fae1b288bbdbd9b102b2cbc9a29bf348)

3 years ago[GOLD] Output_data_got tidy
Alan Modra [Sat, 28 Aug 2021 05:15:53 +0000 (14:45 +0930)] 
[GOLD] Output_data_got tidy

Some Output_data_got methods already have support for addends, but
were implemented as separate methods.  This removes unnecessary code
duplication.

Relobj::local_has_got_offset and others there get a similar treatment.
Comments are removed since it should be obvious without a comment, and
the existing comments are not precisely what the code does.  For
example, a local_has_got_offset call without an addend does not return
whether the local symbol has *a* GOT offset of type GOT_TYPE, it
returns whether there is a GOT entry of type GOT_TYPE for the symbol
with addend of zero.

PR 28192
* output.h (Output_data_got::add_local): Make addend optional.
(Output_data_got::add_local_with_rel): Likewise.
(Output_data_got::add_local_pair_with_rel): Likewise.
* output.cc (Output_data_got::add_local): Delete overload
without addend.
(Output_data_got::add_local_with_rel): Likewise.
(Output_data_got::add_local_pair_with_rel): Likewise.
* object.h (Relobj::local_has_got_offset): Make addend optional.
Delete overload without addend later.  Update comment.
(Relobj::local_got_offset): Likewise.
(Relobj::set_local_got_offset): Likewise.

(cherry picked from commit 54721a930e80a635d3cb47c0ad3899ed9680bd78)

3 years ago[GOLD] Remove addend from Local_got_entry_key
Alan Modra [Sat, 28 Aug 2021 04:53:33 +0000 (14:23 +0930)] 
[GOLD] Remove addend from Local_got_entry_key

This patch removes the addend from Local_got_entry_key, which is
unnecessary now that Got_offset_list has an addend.  Note that it
might be advantageous to keep the addend in Local_got_entry_key when
linking objects containing a large number of section_sym+addend@got
relocations.  I opted to save some memory by removing the field but
left the class there in case we might need to restore {sym,addend}
lookup.  That's also why this change is split out from the
Got_offset_list change.

PR 28192
* object.h (Local_got_entry_key): Delete addend_ field.
Adjust constructor and methods to suit.
* object.cc (Sized_relobj::do_for_all_local_got_entries):
Update key.

(cherry picked from commit 973b2b402ebf660e2bbbac60e85469164d76ecfc)

3 years ago[GOLD] Got_offset_list: addend field
Alan Modra [Thu, 5 Aug 2021 05:02:56 +0000 (14:32 +0930)] 
[GOLD] Got_offset_list: addend field

This is the first in a series of patches aimed at supporting GOT
entries against symbol plus addend generally for PowerPC64 rather than
just section symbol plus addend as gold has currently.

This patch adds an addend field to Got_offset_list, so that both local
and global symbols can have GOT entries with addend.

PR 28192
* object.h (Got_offset_list): Add addend_ field, init in both
constructors.  Adjust all accessors to suit.
(Sized_relobj::do_local_has_got_offset): Adjust to suit.
(Sized_relobj::do_local_got_offset): Likewise.
(Sized_relobj::do_set_local_got_offset): Likewise.
* symtab.h (Symbol::has_got_offset): Add optional addend param.
(Symbol::got_offset, Symbol::set_got_offset): Likewise.
* incremental.cc (Local_got_offset_visitor::visit): Add unused
uint64_t parameter with FIXME.
(Global_got_offset_visitor::visit): Add unused uint64_t parameter.

(cherry picked from commit 912697efc15768894c13a9370a2fcaa950f24558)

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 30 Sep 2021 00:00:32 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 29 Sep 2021 00:00:39 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoPR28391, strip/objcopy --preserve-dates *.a: cannot set time
Gleb Fotengauer-Malinovskiy [Tue, 28 Sep 2021 10:41:26 +0000 (20:11 +0930)] 
PR28391, strip/objcopy --preserve-dates *.a: cannot set time

After commit 985e0264516 copy_archive function began to pass invalid
values to the utimensat(2) function when it tries to preserve
timestamps in ar archives.  This happens because the bfd_stat_arch_elt
implementation for ar archives fills only the st_mtim.tv_sec part of
the st_mtim timespec structure, but leaves the st_mtim.tv_nsec part
and the whole st_atim timespec untouched leaving them uninitialized

PR 28391
* ar.c (extract_file): Clear buf for preserve_dates.
* objcopy.c (copy_archive): Likewise.

(cherry picked from commit 0d62064867c74286360e821b75ef6799bedc4b34)

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 28 Sep 2021 00:00:30 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 27 Sep 2021 00:00:33 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 26 Sep 2021 00:00:29 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 25 Sep 2021 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 24 Sep 2021 00:00:40 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 23 Sep 2021 00:00:30 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 22 Sep 2021 00:00:31 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 21 Sep 2021 00:00:39 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 20 Sep 2021 00:00:39 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 19 Sep 2021 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 18 Sep 2021 00:00:29 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 17 Sep 2021 00:00:35 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 16 Sep 2021 00:00:48 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 15 Sep 2021 00:00:30 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 14 Sep 2021 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 13 Sep 2021 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 12 Sep 2021 00:00:27 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 11 Sep 2021 00:00:29 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 10 Sep 2021 00:00:32 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 9 Sep 2021 00:00:32 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 8 Sep 2021 00:00:37 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoRevert: [AArch64] MTE corefile support
Luis Machado [Tue, 7 Sep 2021 13:35:11 +0000 (10:35 -0300)] 
Revert: [AArch64] MTE corefile support

    bfd     * elf.c (elfcore_make_memtag_note_section): New function.
            (elfcore_grok_note): Handle NT_MEMTAG note types.

    binutils* readelf.c (get_note_type): Handle NT_MEMTAG note types.

    include * elf/common.h (NT_MEMTAG): New constant.
            (NT_MEMTAG_TYPE_AARCH_MTE): New constant.

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 7 Sep 2021 00:00:29 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 6 Sep 2021 00:00:37 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 5 Sep 2021 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 4 Sep 2021 00:00:34 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 3 Sep 2021 00:00:48 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 2 Sep 2021 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 1 Sep 2021 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 31 Aug 2021 00:00:33 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 30 Aug 2021 00:00:28 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 29 Aug 2021 00:00:31 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 28 Aug 2021 00:00:32 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 27 Aug 2021 00:00:34 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 26 Aug 2021 00:00:39 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 25 Aug 2021 00:00:33 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 24 Aug 2021 00:00:35 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 23 Aug 2021 00:00:29 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 22 Aug 2021 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 21 Aug 2021 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 20 Aug 2021 00:00:30 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years ago[GOLD] PowerPC64 relocation overflow for -Os register save/restore funcs
Alan Modra [Wed, 18 Aug 2021 03:13:46 +0000 (12:43 +0930)] 
[GOLD] PowerPC64 relocation overflow for -Os register save/restore funcs

Fixes a silly mistake in calculating the address of -Os out-of-line
register save/restore function copies.  Copies of these linker defined
functions are added to stub sections when the original (in
target->savres_section) can't be reached.

* powerpc.cc (Target_powerpc::Relocate::relocate): Correct address
calculation of out-of-line save/restore function copies.

(cherry picked from commit 89c905a342d2cb35ebc4d66ad7cdca581b5134c3)

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 19 Aug 2021 00:01:24 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 18 Aug 2021 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 17 Aug 2021 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 16 Aug 2021 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 15 Aug 2021 00:01:51 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 14 Aug 2021 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 13 Aug 2021 00:01:00 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 12 Aug 2021 00:01:28 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoRevert "ld script expression parsing"
Alan Modra [Wed, 11 Aug 2021 00:41:19 +0000 (10:11 +0930)] 
Revert "ld script expression parsing"

This reverts commit 40726f16a8d7105761e36398054860a923d4efc9.

3 years agoRevert "ld --defsym"
Alan Modra [Wed, 11 Aug 2021 00:43:27 +0000 (10:13 +0930)] 
Revert "ld --defsym"

This reverts commit fb6c220ebdae893d7d955827363010342fa1afa5.

3 years agoRevert "Re: ld script expression parsing"
Alan Modra [Wed, 11 Aug 2021 00:39:02 +0000 (10:09 +0930)] 
Revert "Re: ld script expression parsing"

This reverts commit 6afc66a7772e69ac3888b496e12d3c8f257c693c.

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 11 Aug 2021 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 10 Aug 2021 00:01:02 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 9 Aug 2021 00:01:04 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 8 Aug 2021 00:00:55 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoPR28186, SEGV elf.c:7991:30 in _bfd_elf_fixup_group_sections
Alan Modra [Sat, 7 Aug 2021 04:40:38 +0000 (14:10 +0930)] 
PR28186, SEGV elf.c:7991:30 in _bfd_elf_fixup_group_sections

PR 28186
* elf.c (_bfd_elf_fixup_group_sections): Don't segfault on
objcopy/strip with NULL output_section.

(cherry picked from commit 182ad37589e3931390d0c43f1d52a9a6e0062a61)

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 7 Aug 2021 00:00:55 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 6 Aug 2021 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 5 Aug 2021 00:01:14 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoIBM Z: Add another arch14 instruction
Andreas Krebbel [Wed, 7 Jul 2021 12:05:00 +0000 (14:05 +0200)] 
IBM Z: Add another arch14 instruction

opcodes/

* opcodes/s390-opc.txt: Add qpaci.

gas/

* testsuite/gas/s390/zarch-arch14.d: Add qpaci.
* testsuite/gas/s390/zarch-arch14.s: Add qpaci.

(cherry picked from commit e4cc3b47ec2c4bdb1892db7e9759f90576742f31)

3 years agoIBM Z: Remove lpswey parameter
Andreas Krebbel [Wed, 4 Aug 2021 14:51:36 +0000 (16:51 +0200)] 
IBM Z: Remove lpswey parameter

opcodes/
* s390-opc.c (INSTR_SIY_RD): New instruction format.
(MASK_SIY_RD): New instruction mask.
* s390-opc.txt: Change instruction format of lpswey to SIY_RD.

gas/
* testsuite/gas/s390/zarch-arch14.d: Remove last operand of
lpswey.
* testsuite/gas/s390/zarch-arch14.s: Likewise.

(cherry picked from commit a164bbda300d1da6f97bfa14ba7fa22475e61d17)

3 years agoPR28156, rename.c doesn't compile with MinGW
Alan Modra [Wed, 4 Aug 2021 05:14:08 +0000 (14:44 +0930)] 
PR28156, rename.c doesn't compile with MinGW

Guard against lack of struct timespec definition.

PR 28156
* rename.c (get_stat_atime, get_stat_mtime): Don't compile
unless HAVE_UTIMENSAT is defined.

(cherry picked from commit 47fcfcbadce36c7ccc00c69b4c80717a0d6b9288)

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 4 Aug 2021 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 3 Aug 2021 00:01:02 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 2 Aug 2021 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 1 Aug 2021 00:00:55 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 31 Jul 2021 00:01:06 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 30 Jul 2021 00:01:04 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agobfd: Close the file descriptor if there is no archive fd
H.J. Lu [Mon, 26 Jul 2021 12:59:55 +0000 (05:59 -0700)] 
bfd: Close the file descriptor if there is no archive fd

Close the file descriptor if there is no archive plugin file descriptor
to avoid running out of file descriptors on thin archives with many
archive members.

bfd/

PR ld/28138
* plugin.c (bfd_plugin_close_file_descriptor): Close the file
descriptor there is no archive plugin file descriptor.

ld/

PR ld/28138
* testsuite/ld-plugin/lto.exp: Run tmpdir/pr28138 only for
native build.

PR ld/28138
* testsuite/ld-plugin/lto.exp: Run ld/28138 tests.
* testsuite/ld-plugin/pr28138.c: New file.
* testsuite/ld-plugin/pr28138-1.c: Likewise.
* testsuite/ld-plugin/pr28138-2.c: Likewise.
* testsuite/ld-plugin/pr28138-3.c: Likewise.
* testsuite/ld-plugin/pr28138-4.c: Likewise.
* testsuite/ld-plugin/pr28138-5.c: Likewise.
* testsuite/ld-plugin/pr28138-6.c: Likewise.
* testsuite/ld-plugin/pr28138-7.c: Likewise.

(cherry picked from commit 5a98fb7513b559e20dfebdbaa2a471afda3b4742)
(cherry picked from commit 7dc37e1e1209c80e0bab784df6b6bac335e836f2)

4 years agoRe: opcodes: constify & local meps macros
Alan Modra [Sat, 3 Jul 2021 02:09:24 +0000 (11:39 +0930)] 
Re: opcodes: constify & local meps macros

Commit f375d32b35ce changed a generated file.  Edit the source instead.

* mep.opc (macros): Make static and const.
(lookup_macro): Return and use const pointer.
(expand_macro): Make mac param const.
(expand_string): Make pmacro const.

(cherry picked from commit 4dcdbbd1bc1d14f2caff3bb4f8fe1f0e5dabcb85)

4 years agotexi2pod.pl: add no-op --no-split option support [PR28144]
Sergei Trofimovich [Mon, 26 Jul 2021 21:51:18 +0000 (22:51 +0100)] 
texi2pod.pl: add no-op --no-split option support [PR28144]

Change 2faf902da ("generate single html manual page by default")
added use of --no-split option to makeinfo. binutils reuses
makeinfo options for texi2pod.pl wrapper. Unsupported option
led to silent manpage truncation.

The change adds no-op option support.

etc/
PR 28144
* texi2pod.pl: Handle no-op --no-split option.

(cherry picked from commit 96a7037cd8573cf065aa6b12baca68696f96d9ca)

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 29 Jul 2021 00:01:00 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 28 Jul 2021 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 27 Jul 2021 00:01:04 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 26 Jul 2021 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 25 Jul 2021 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoRevert: PowerPC: Don't generate unused section symbols
Alan Modra [Sat, 24 Jul 2021 06:04:55 +0000 (15:34 +0930)] 
Revert: PowerPC: Don't generate unused section symbols

Blindly following x86 broke linux kernel builds.

bfd/
* elf32-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Define as true.
* elf64-ppc.c (TARGET_KEEP_UNUSED_SECTION_SYMBOLS): Likewise.
gas/
* testsuite/gas/ppc/power4.d: Adjust for section sym change.
* testsuite/gas/ppc/test1elf32.d: Likewise.
* testsuite/gas/ppc/test1elf64.d: Likewise.
ld/
* testsuite/ld-powerpc/tlsexe.r: Adjust for section sym change.
* testsuite/ld-powerpc/tlsexe32.r: Likewise.
* testsuite/ld-powerpc/tlsexe32no.r: Likewise.
* testsuite/ld-powerpc/tlsexeno.r: Likewise.
* testsuite/ld-powerpc/tlsexenors.r: Likewise.
* testsuite/ld-powerpc/tlsexers.r: Likewise.
* testsuite/ld-powerpc/tlsexetoc.r: Likewise.
* testsuite/ld-powerpc/tlsexetocrs.r: Likewise.
* testsuite/ld-powerpc/tlsget.d: Likewise.
* testsuite/ld-powerpc/tlsget.wf: Likewise.
* testsuite/ld-powerpc/tlsget2.d: Likewise.
* testsuite/ld-powerpc/tlsget2.wf: Likewise.
* testsuite/ld-powerpc/tlsso.r: Likewise.
* testsuite/ld-powerpc/tlsso32.r: Likewise.
* testsuite/ld-powerpc/tlstocso.r: Likewise.

(cherry picked from commit c09c8b42021180eee9495bd50d8b35e683d3901b)

4 years agoRe: ld script expression parsing
Alan Modra [Thu, 22 Jul 2021 12:11:15 +0000 (21:41 +0930)] 
Re: ld script expression parsing

Commit 40726f16a8d7 broke references to sections within ADDR(), and
overlays with weird section names.

* ldgram.y (paren_script_name): New rule.
(exp): Use it for ALIGNOF, SIZEOF, ADDR, and LOADADDR.  Similarly
ensure script mode parsing for section name in SEGMENT_START.
(overlay_section): Delete unnecessary ldlex_script call.  Backup
on a lookahead NAME parsed in expression mode.
* testsuite/ld-elf/overlay.s: Add more sections.
* testsuite/ld-elf/overlay.t: Test '-' in section names.

(cherry picked from commit 553dd76c7e49e3e6afb528ff865589da8f6f3e1c)

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 24 Jul 2021 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 23 Jul 2021 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 22 Jul 2021 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoUpdated Russian translation for the bfd library
Nick Clifton [Wed, 21 Jul 2021 13:38:32 +0000 (14:38 +0100)] 
Updated Russian translation for the bfd library

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 21 Jul 2021 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoPR28106, build of 2.37 fails on FreeBSD and Clang
Alan Modra [Tue, 20 Jul 2021 09:16:57 +0000 (18:46 +0930)] 
PR28106, build of 2.37 fails on FreeBSD and Clang

https://en.cppreference.com/w/cpp/types/NULL says NULL might be
defined as nullptr.
https://en.cppreference.com/w/cpp/language/reinterpret_cast says
reinterpret_cast can't be used on nullptr.

PR gold/28106
PR gold/27815
* gc.h (gc_process_relocs): Use static_cast in Section_id constructor.

(cherry picked from commit b97bd976233ee4d43c2fe18f6356e62779cbe82d)

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 20 Jul 2021 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoChange "uint" to "unsigned"
Christopher Wellons [Sun, 18 Jul 2021 20:57:19 +0000 (16:57 -0400)] 
Change "uint" to "unsigned"

This fixes a defect introduced in 25162c795. The "uint" type has not
been explicitly defined here on mingw, causing compilation to fail.

On linux we have this in /usr/include/sys/types.h

/* Old compatibility names for C types.  */
typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;

So it's easy to see how such bugs can creep in.

* rust-demangle.c (struct rust_demangler): Change type of
"recursion" to unsigned.
(RUST_NO_RECURSION_LIMIT): Similarly in cast.

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 19 Jul 2021 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in