]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
2 years agoPR27755, powerpc-ld infinite loop binutils-2_35-branch
Alan Modra [Mon, 3 May 2021 04:07:00 +0000 (13:37 +0930)] 
PR27755, powerpc-ld infinite loop

PR 27755
* elf32-ppc.c (ppc_elf_inline_plt): Do increment rel in loop.

(cherry picked from commit 337d0bf887a3ed6b6b2123fecfec0736640edcaf)

3 years agoDWARF: Check version >= 3 for DW_FORM_ref_addr
H.J. Lu [Fri, 19 Mar 2021 01:34:38 +0000 (18:34 -0700)] 
DWARF: Check version >= 3 for DW_FORM_ref_addr

Check version >= 3, instead of version == 3 || version == 4, for
DW_FORM_ref_addr.

bfd/

PR ld/27587
* dwarf2.c (read_attribute_value): Check version >= 3 for
DW_FORM_ref_addr.

(cherry picked from commit 51f6e7a9f4210aed0f8156c1d2e348de6f96f37d)

3 years agoReset development to true
Nick Clifton [Sat, 30 Jan 2021 12:58:34 +0000 (12:58 +0000)] 
Reset development to true

3 years agoGNU Binutils 2.35.2 Release binutils-2_35_2
Nick Clifton [Sat, 30 Jan 2021 12:35:52 +0000 (12:35 +0000)] 
GNU Binutils 2.35.2 Release

3 years agoPR27259, SHF_LINK_ORDER self-link
Alan Modra [Thu, 28 Jan 2021 00:00:36 +0000 (10:30 +1030)] 
PR27259, SHF_LINK_ORDER self-link

This stops ld from endless looping on SHF_LINK_ORDER sh_link loops.

bfd/
PR 27259
* elflink.c (_bfd_elf_gc_mark_extra_sections): Use linker_mark to
prevent endless looping of linked-to sections.
ld/
PR 27259
* ldelf.c (ldelf_before_place_orphans): Use linker_mark to
prevent endless looping of linked-to sections.

(cherry picked from commit def97fb945a98544938087eff3111e16ce58da6d)

3 years agoDon't assert at ldwrite.c:212
Alan Modra [Wed, 29 Jul 2020 08:00:15 +0000 (17:30 +0930)] 
Don't assert at ldwrite.c:212

When excluding SHF_LINK_ORDER sections that happen to have SEC_KEEP
set, we need to set SEC_EXCLUDE here to avoid a problem later.

* ldelf.c (ldelf_before_place_orphans): Set SEC_EXCLUDE for
discarded sections.

(cherry picked from commit 5987401fcbc9933808fa0d84d1b01c93356c39a1)

3 years agogold: Skip address size and segment selector for DWARF5
H.J. Lu [Thu, 28 Jan 2021 12:21:15 +0000 (04:21 -0800)] 
gold: Skip address size and segment selector for DWARF5

The .debug_line secton in DWARF5 has a byte for address size and a byte
for segment selector after DWARF version.  Skip them for DWARF5.

PR gold/27246
* dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog):
Skip address size and segment selector for DWARF5.

(cherry picked from commit 0318cca4934fc5d85e83351842985ad2a3475146)

3 years agoPOWER10: Add Return-Oriented Programming instructions
Peter Bergner [Fri, 8 Jan 2021 22:07:12 +0000 (16:07 -0600)] 
POWER10: Add Return-Oriented Programming instructions

POWER10 adds some return-oriented programming (ROP) instructions and
this patch adds support for them.  You will notice that they are enabled
for POWER8 and later, not just POWER10 and later.  This is on purpose.
This allows the instructions to be added to POWER8 binaries that can be
run on POWER8, POWER9 and POWER10 cpus.  On POWER8 and POWER9, these
instructions just act as nop's.

opcodes/
* ppc-opc.c (insert_dw, (extract_dw): New functions.
(DW, (XRC_MASK): Define.
(powerpc_opcodes) <hashchk, hashchkp, hashst, haststp>: New mnemonics.
gas/
* testsuite/gas/ppc/rop-checks.d,
* testsuite/gas/ppc/rop-checks.l,
* testsuite/gas/ppc/rop-checks.s,
* testsuite/gas/ppc/rop.d,
* testsuite/gas/ppc/rop.s: New tests.
* testsuite/gas/ppc/ppc.exp: Run them.

(cherry picked from commit aae7fcb8d755a2eb3f32a3f945a4e8f30cf5c5e2)

3 years agoR_PPC64_GOT_LO_DS and R_PPC64_GOT_HA sanity check
Alan Modra [Thu, 15 Oct 2020 22:56:32 +0000 (09:26 +1030)] 
R_PPC64_GOT_LO_DS and R_PPC64_GOT_HA sanity check

The previous sanity check allowed a ld on the HA reloc and addis
on the LO_DS.

* elf64-ppc.c (ppc64_elf_relocate_section): Tighten sanity check
on R_PPC64_GOT_LO_DS and R_PPC64_GOT_HA instructions.

(cherry picked from commit fba8689ad3b72a3e895ebd41485d747dba5da811)

3 years agopower10 on ppc32
Alan Modra [Wed, 9 Sep 2020 12:40:47 +0000 (22:10 +0930)] 
power10 on ppc32

We don't support power10 on ppc32, mainly because some instructions
have 34-bit fields for which we don't have relocations on ppc32.
If you try to assemble typical code, you'll see errors saying
"reloc ... not supported by object file format".  Also, on 32-bit
hosts with binutils configured without a 64-bit bfd, you'll see errors
saying "bignum invalid" when using large offsets.  But let's not kill
output of prefix insns entirely on 32-bit hosts.

* config/tc-ppc.c (md_assemble): Emit prefix insn by parts when
valueT is smaller than 64 bits.

(cherry picked from commit 15a32af52fdc010801396cbcf62f33d88435ac1a)

3 years agoPR26489, ASAN: ppc64_elf_size_stubs elf64-ppc.c:13389
Alan Modra [Mon, 24 Aug 2020 16:25:38 +0000 (01:55 +0930)] 
PR26489, ASAN: ppc64_elf_size_stubs elf64-ppc.c:13389

Stub sections are inserted after sec_info is sized, so have higher ids.
Test flags that will exclude stub sections before looking at the
sec_info array.

PR 26489
* elf64-ppc.c (ppc64_elf_size_stubs): Test code_sec->has_toc_reloc
and code_sec->makes_toc_func_call before sec_info[code_sec->id].

(cherry picked from commit 918dc783deadc206691dcc20bf8aa6c807c10244)

3 years agoPR26492, ASAN: ppc64_elf_before_check_relocs elf64-ppc.c:4337
Alan Modra [Mon, 24 Aug 2020 16:21:39 +0000 (01:51 +0930)] 
PR26492, ASAN: ppc64_elf_before_check_relocs elf64-ppc.c:4337

PR 26492
* elf64-ppc.c (ppc_hash_table): Test is_elf_hash_table before
accessing elf_hash_table_id.

(cherry picked from commit 573eb292ee79dc78207cedadaa8acbb1922ab699)

3 years agoPR26483, ASAN: ppc_elf_link_params elf32-ppc.c:2314
Alan Modra [Mon, 24 Aug 2020 16:18:08 +0000 (01:48 +0930)] 
PR26483, ASAN: ppc_elf_link_params elf32-ppc.c:2314

PR 26483
* elf32-ppc.c (ppc_elf_hash_table): Test is_elf_hash_table before
accessing elf_hash_table_id.

(cherry picked from commit a8d549c006a2135b86186d14ab5d0d5fdb702b2f)

3 years agoSegmentation fault i386-gen
Alan Modra [Tue, 26 Jan 2021 01:50:23 +0000 (12:20 +1030)] 
Segmentation fault i386-gen

A case of inst->next being uninitialised.

* i386-gen.c (parse_template): Ensure entire template_instance
is initialised.

(cherry picked from commit c3ffb8f340f567949f24c3bab62259f0e593637f)

3 years agoFix thinko in objcopy's memory freeing code.
Frederic Cambus [Tue, 26 Jan 2021 09:55:34 +0000 (09:55 +0000)] 
Fix thinko in objcopy's memory freeing code.

* objcopy.c (copy_main): Fix a double free happening when both
--localize-symbols and --globalize-symbols options are invoked
together.

(cherry picked from commit e37709f0901fe6f2410094151002bab3d123df85)

3 years agoPR27218, memory access violation in dwarf2dbg.c
Alan Modra [Thu, 21 Jan 2021 06:16:20 +0000 (16:46 +1030)] 
PR27218, memory access violation in dwarf2dbg.c

PR 27218
* dwarf2dbg.c (dwarf2_gen_line_info): Correct setting of dwarf_level.
(dwarf2_directive_filename, dwarf2_directive_loc): Likewise, and
error for negative file numbers.

(cherry picked from commit 498ff0328fed7689f7a675d8c9f0f04bed1f1522)

3 years agoas: Automatically enable DWARF5 support
H.J. Lu [Mon, 18 Jan 2021 14:25:05 +0000 (06:25 -0800)] 
as: Automatically enable DWARF5 support

Currently

$ as -o x.o x.s

fails when x.s contains DWARF5 ".file 0" or ".loc 0" directives.  Update
assembler to automatically enable DWARF5 support so that

$ gcc -S -g -c x.c
$ gcc -c x.s

works.

PR gas/27195
* dwarf2dbg.c (dwarf2_gen_line_info): Set dwarf_level to 5 if
needed.
(dwarf2_directive_filename): Likewise.
(dwarf2_directive_loc): Likewise.
* testsuite/gas/elf/dwarf-5-file0.d: Pass --gdwarf-3.
* testsuite/gas/lns/lns-diag-1.l: Remove the
"Error: file number less than one" errors.

(cherry picked from commit 705989f19adf20dd70c50237ec61cd708f2b0939)

3 years agoDWARF-5: Ignore empty range in DWARF-5 line number tables
H.J. Lu [Sun, 24 Jan 2021 15:00:34 +0000 (07:00 -0800)] 
DWARF-5: Ignore empty range in DWARF-5 line number tables

The DWARF5 spec does indeed explicitly say: "A bounded range entry whose
beginning and ending address offsets are equal (including zero) indicates
an empty range and may be ignored."

Since arange_add already ignores empty ranges, remove the whole check
which is equivalent to the check plus explicit continue.

PR binutils/27231
* dwarf2.c (read_rnglists): Ignore empty range when parsing line
number tables.

(cherry picked from commit 940d0202fd472b09d370fb483bf5a8ae99c9c830)

3 years agoDWARF-5: Fix parsing DWARF-5 line number tables
H.J. Lu [Sun, 24 Jan 2021 02:17:37 +0000 (18:17 -0800)] 
DWARF-5: Fix parsing DWARF-5 line number tables

Advance rngs_ptr when parsing DW_RLE_offset_pair, which was missing in

commit c3757b583d2448a5996e83e374fb96ac7938da35
Author: Mark Wielaard <mark@klomp.org>
Date:   Tue Aug 25 15:33:00 2020 +0100

    Fix the linker's handling of DWARF-5 line number tables.

PR binutils/27231
* dwarf2.c (read_rnglists): Advance rngs_ptr after
_bfd_safe_read_leb128 when parsing DW_RLE_offset_pair.

(cherry picked from commit 18454c151f5824564130ba626bd90e9de30444ef)

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 10 Jan 2021 00:00:33 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 9 Jan 2021 00:00:31 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 8 Jan 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, 7 Jan 2021 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 6 Jan 2021 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 5 Jan 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, 4 Jan 2021 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoPR27140, ppc32 segmentation fault in make_stub
Alan Modra [Sat, 2 Jan 2021 11:15:02 +0000 (21:45 +1030)] 
PR27140, ppc32 segmentation fault in make_stub

This fixes a thinko in commit fa40fbe4849.  st_other global entry bits
are relevant only for 64-bit ELFv2.  PowerPC gold leaves local sym
vector of st_other bits as NULL for 32-bit, hence the segfault.

PR 27140
* powerpc.cc (Target_powerpc::Branch_info::make_stub): Only access
object->st_other() when 64-bit.
(Stub_table::add_long_branch_entry): Ignore "other" when 32-bit.

(cherry picked from commit e3b53295d59d2e78292eaae4500243dd9e007ae4)

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 3 Jan 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, 2 Jan 2021 00:00:30 +0000 (00:00 +0000)] 
Automatic date update in version.in

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

3 years agoPR27128, nm -P portable output format regression
Alan Modra [Wed, 30 Dec 2020 11:30:57 +0000 (22:00 +1030)] 
PR27128, nm -P portable output format regression

binutils/
PR 27128
* nm.c (print_symname): Append version string to symbol name
before printing the lot under control of "form".  Append version
to demangled names too.
ld/
PR 27128
* testsuite/ld-elf/pr27128.s: New file.
* testsuite/ld-elf/pr27128.t: Likewise.
* testsuite/ld-elf/pr27128a.d: Likewise.
* testsuite/ld-elf/pr27128b.d: Likewise.
* testsuite/ld-elf/pr27128c.d: Likewise.
* testsuite/ld-elf/pr27128d.d: Likewise.
* testsuite/ld-elf/pr27128e.d: Likewise.

(cherry picked from commit cab3f4da68672647cde72bc0c06ec08977819817)

3 years agosparc testsuite fallout
Alan Modra [Mon, 24 Aug 2020 08:00:30 +0000 (17:30 +0930)] 
sparc testsuite fallout

(cherry picked from commit f1a9fbd995b8997b7ed7e8e6a83129e923400a58)

3 years agoelf: Keep only one '@' for undefined versioned symbols
H.J. Lu [Sat, 22 Aug 2020 15:31:53 +0000 (08:31 -0700)] 
elf: Keep only one '@' for undefined versioned symbols

The symbol string table in the .symtab section is optional and cosmetic.
Keep only one '@' for undefined versioned symbols, which are defined in
shared objects, in the symbol string table.  Update "nm -D" to display
only one '@' for undefined versioned symbols.

bfd/

PR ld/26382
* elflink.c (elf_link_output_symstrtab): Keep only one '@' for
versioned symbols, which are defined in shared objects, in
symbol string table.

binutils/

PR ld/26382
* nm.c (print_symname): Display only one '@' for undefined
versioned symbols.
* doc/binutils.texi: Update nm version information.

ld/

PR ld/26382
* testsuite/ld-elf/pr26302.nd: Updated.
* testsuite/ld-elf/pr26302.rd: New file.
* testsuite/ld-elf/shared.exp: Add a test for readelf -sW.

(cherry picked from commit 3f2e9699234ca31d083bc93ea6e03903f10baeaf)

3 years agonm: Remove --with-symbol-versions
H.J. Lu [Mon, 10 Aug 2020 12:17:28 +0000 (05:17 -0700)] 
nm: Remove --with-symbol-versions

Since

commit 7e6e972f74aeac0ebdbd95a7f905d871cd2581de
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Mar 24 04:23:11 2020 -0700

    bfd: Display symbol version for nm -D

always displays symbol version for nm, remove --with-symbol-versions and
silently accept it for backward compatibility.

binutils/

PR binutils/26302
* nm.c (with_symbol_versions): Removed.
(long_option_values): Add OPTION_WITH_SYMBOL_VERSIONS.
(long_options): Update --with-symbol-versions entry.
(print_symbol): Remove the with_symbol_versions check.
(main): Add OPTION_WITH_SYMBOL_VERSIONS for backward
compatibility.
* doc/binutils.texi: Remove --with-symbol-versions.

ld/

PR binutils/26302
* testsuite/ld-elf/pr26302.nd: New file.
* testsuite/ld-elf/pr26302.ver: Likewise.
* testsuite/ld-elf/pr26302a.c: Likewise.
* testsuite/ld-elf/pr26302b.c: Likewise.
* testsuite/ld-elf/shared.exp: Run binutils/26302 tests.

(cherry picked from commit 9b0ac51b22d0cf900f39e17e615bb22e32720f6e)

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 31 Dec 2020 00:00:42 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 30 Dec 2020 00:00:33 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 29 Dec 2020 00:00:48 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 28 Dec 2020 00:00:39 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 27 Dec 2020 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 26 Dec 2020 00:00:27 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 25 Dec 2020 00:00:32 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 24 Dec 2020 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 23 Dec 2020 00:00:35 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 22 Dec 2020 00:00:46 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 21 Dec 2020 00:00:28 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 20 Dec 2020 00:00:29 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 19 Dec 2020 00:00:27 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 18 Dec 2020 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 17 Dec 2020 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 16 Dec 2020 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 15 Dec 2020 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 14 Dec 2020 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 13 Dec 2020 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 12 Dec 2020 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 11 Dec 2020 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 10 Dec 2020 00:00:46 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 9 Dec 2020 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 8 Dec 2020 00:01:05 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 7 Dec 2020 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 6 Dec 2020 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agox86-64: Convert load to mov only for GOTPCRELX relocations
H.J. Lu [Sat, 5 Dec 2020 02:54:47 +0000 (18:54 -0800)] 
x86-64: Convert load to mov only for GOTPCRELX relocations

Since converting load to mov needs to rewrite the REX byte and we don't
know if there is a REX byte with GOTPCREL relocation, do it only for
GOTPCRELX relocations.

bfd/

PR ld/27016
* elf64-x86-64.c (elf_x86_64_convert_load_reloc): Convert load
to mov only for GOTPCRELX relocations.

ld/

PR ld/27016
* testsuite/ld-x86-64/x86-64.exp: Run pr27016a and pr27016b.
* testsuite/ld-x86-64/pr27016a.d: New file.
* testsuite/ld-x86-64/pr27016a.s: Likewise.
* testsuite/ld-x86-64/pr27016b.d: Likewise.
* testsuite/ld-x86-64/pr27016b.s: Likewise.

(cherry picked from commit 7e45e7a9ab38ee904ca62ed9934e933fdb1d6e9c)

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 5 Dec 2020 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 4 Dec 2020 00:01:07 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 3 Dec 2020 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 2 Dec 2020 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 1 Dec 2020 00:01:05 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 30 Nov 2020 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 29 Nov 2020 00:00:57 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 28 Nov 2020 00:01:01 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 27 Nov 2020 00:01:15 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 26 Nov 2020 00:01:09 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 25 Nov 2020 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 24 Nov 2020 00:01:03 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 23 Nov 2020 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoasan: readelf: stack buffer overflow
Alan Modra [Sun, 5 Jul 2020 23:30:29 +0000 (09:00 +0930)] 
asan: readelf: stack buffer overflow

PR 26929
* readelf.c (print_dynamic_symbol): Don't sprintf to buffer to
find string length.

(cherry picked from commit ddb43bab174c50656331e5460b18bd8e8be5f522)

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 22 Nov 2020 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 21 Nov 2020 00:01:08 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Fri, 20 Nov 2020 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agogas, arm: PR26858 Fix availability of single precision vmul/vmla in arm mode
Andre Vieira [Fri, 13 Nov 2020 08:59:48 +0000 (08:59 +0000)] 
gas, arm: PR26858 Fix availability of single precision vmul/vmla in arm mode

This patch fixes a mistake when enabling MVE instructions that disabled support
for single precision vmla and vmul for arm mode.

gas/ChangeLog:
2020-11-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>

Backport from mainline.
2020-11-12  Andre Vieira  <andre.simoesdiasvieira@arm.com>

PR 26858
*  config/tc-arm.c (asm_opcode insns): Fix vmul and vmla's ARM_VARIANT.
* testsuite/gas/arm/pr26858.s: New test.
* testsuite/gas/arm/pr26858.d: New test.

3 years agoAutomatic date update in version.in
GDB Administrator [Thu, 19 Nov 2020 00:01:06 +0000 (00:01 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Wed, 18 Nov 2020 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years ago[GOLD] powerpc incremental-dump assertion failure
Alan Modra [Tue, 17 Nov 2020 04:43:37 +0000 (15:13 +1030)] 
[GOLD] powerpc incremental-dump assertion failure

incremental-dump wants to instantiate Target_powerpc without options
being set up.  This patch fixes
  internal error in options, at gold/parameters.h:92

* powerpc.cc (Target_powerpc::no_tprel_opt_): Rename from tprel_opt_.
Init to false.
(Target_powerpc::tprel_opt): Test parameters->options().tls_optimize().
(Target_powerpc::set_tprel_opt): Delete.
(Target_powerpc::set_no_tprel_opt): New function.  Update all uses
of set_tprel_opt.

(cherry picked from commit 4e0e019fa8eda9b7ffe0615133f55e9b0b882fa1)

3 years ago[GOLD] fix jump to long branch on powerpc
Michael Hudson-Doyle [Mon, 16 Nov 2020 01:20:23 +0000 (14:20 +1300)] 
[GOLD] fix jump to long branch on powerpc

PR 26902
* powerpc.cc (Relocate::relocate): Do not include local entry
offset of target function when computing the address of a stub.

(cherry picked from commit f1e05b19786669d29d59f48f26bc06ad67c221e2)

3 years agoAutomatic date update in version.in
GDB Administrator [Tue, 17 Nov 2020 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agodwarf: Also match abbrev base when searching abbrev list
H.J. Lu [Thu, 29 Oct 2020 16:19:25 +0000 (09:19 -0700)] 
dwarf: Also match abbrev base when searching abbrev list

A .debug_abbrev section can have multiple CUs.  When caching abbrev list,
we need to check abbrev base to support multiple CUs.

PR binutils/26808
* dwarf.c (abbrev_list): Add abbrev_base.
(new_abbrev_list): Add an abbrev_base argument and record it.
(find_abbrev_list_by_abbrev_offset): Add an abbrev_base argument
and match it.
(process_debug_info): Pass abbrev_base to new_abbrev_list and
find_abbrev_list_by_abbrev_offset.
(display_debug_abbrev): Pass 0 abbrev_base to new_abbrev_list
and find_abbrev_list_by_abbrev_offset.
* testsuite/binutils-all/x86-64/pr26808.dump: New file.
* testsuite/binutils-all/x86-64/pr26808.dwp.bz2: Likewise.
* testsuite/binutils-all/x86-64/x86-64.exp: Run PR binutils/26808
test.

(cherry picked from commit 76868f3606fb9de04f49c441c1e3cdd3e943a34d)

3 years agoRe: Sync libiberty and include with GCC for get_DW_UT_name
Alan Modra [Fri, 25 Sep 2020 00:30:01 +0000 (10:00 +0930)] 
Re: Sync libiberty and include with GCC for get_DW_UT_name

* dwarf.h (DW_FIRST_UT, DW_UT, DW_END_UT): Define.

(cherry picked from commit cc9ea2c21cd6e2c88995a7484d2c848c7d7ce71b)

3 years agoAccept the DW_FORM_ref8 type when parsing DWARF types.
Nick Clifton [Tue, 10 Nov 2020 11:55:18 +0000 (11:55 +0000)] 
Accept the DW_FORM_ref8 type when parsing DWARF types.

* dwarf.c (skip_attr_bytes): Correctly handle DW_FORM_ref8.
(get_type_abbrev_from_form): Accept DW_FORM_ref8.

(cherry picked from commit 1f57314183549008c065ad2240598d2b0f0ff56b
 and commit ed1afd86668781159a131dc9c9c4a54a3b0a1e3a)

3 years agoFix the decoding of DW_FORM_ref_addr DWARF attribute.
Nick Clifton [Tue, 27 Oct 2020 16:17:13 +0000 (16:17 +0000)] 
Fix the decoding of DW_FORM_ref_addr DWARF attribute.

* dwarf.c (struct abbrev_list): New structure.  Used to collect
lists of abbreviation sets.
(struct abbrev_map): New structure.  Used to map CU offsets to
abbreviation offsets.
(record_abbrev_list): New function.  A new entry to an
abbreviation list.
(free_all_abbrevs): Update to free abbreviation lists.
(new_abbrev_list): New function.  Start a new abbreviation
list.
(find_abbrev_list_by_abbrev_offset): New function.
(find_abbrev_map_by_offset): New function.
(add_abbrev): Add abbrev_list parameter.
(add_abbrev_attr): Likewise.
(process_abbrev_section): Rename to process_abbrev_set and add
list parameter.
(get_type_abbrev_from_form): New function.  Attempts to decode the
forms used by DW_AT_type attributes.
(get_type_signedness): Display type names if operating in wide
mode.  Use get_type_abbrev_from_form.
(read_and_display_attr_value): Use get_type_abbrev_from_form.
(process_debug_info): Pre-parse the CU headers to collate all the
abbrevs before starting the main scan.
(process_debug_abbrev): Do not free any loaded abbrevs.
(free_debug_memory): Free the abbrev maps.

(cherry picked from commit bcd213b2cfbca2df53fb7e5d187fd67ea8eb7185)

3 years agoWork around problem in DWARF decoding library which can result in attempts to read...
Nick Clifton [Wed, 21 Oct 2020 16:42:42 +0000 (17:42 +0100)] 
Work around problem in DWARF decoding library which can result in attempts to read arbitrary bytes as if they were an LEB128 encoded value.

* dwarf.c (skip_attr_bytes): Accept DWARF versions higher than 4
when processing the DW_FORM_ref_addr form.
Skip bytes in DW_FORM_block and DW_FORM_exprloc forms.
Handle DW_FORM_indirect.
(get_type_signedness): Allow a limited amount of recursion.
Do not attempt to decode types that use the DW_FORM_ref_addr form.
(read_and_display_attr_value):  Do not attempt to decode types
that use the DW_FORM_ref_addr form.

(cherry picked from commit 596245135106b2a965d809e272dc7c758afdc98f)

3 years agogas: Reuse the input file entry in the file table
H.J. Lu [Fri, 16 Oct 2020 11:03:20 +0000 (04:03 -0700)] 
gas: Reuse the input file entry in the file table

Some instructions can be emitted (dwarf2_emit_insn is called) before the
first .file <NUMBER> directive has been seen, which allocates the input
file as the first file entry.  Reuse the input file entry in the file
table.

PR gas/25878
PR gas/26740
* dwarf2dbg.c (file_entry): Remove auto_assigned.
(assign_file_to_slot): Remove the auto_assign argument.
(allocate_filenum): Updated.
(allocate_filename_to_slot): Reuse the input file entry in the
file table.
(dwarf2_where): Replace as_where with as_where_physical.
* testsuite/gas/i386/dwarf5-line-1.d: New file.
* testsuite/gas/i386/dwarf5-line-1.s: Likewise.
* testsuite/gas/i386/i386.exp: Run dwarf5-line-1.

(cherry picked from commit 6915020bb134ae29fd772295c66fd67b5944962d)

gas: Always use as_where for preprocessed assembly codes

Always clear the slot 1 if it was assigned to the input file before the
first .file <NUMBER> directive has been seen.  Always use as_where to
generate the correct debug infor for preprocessed assembly codes.

PR gas/25878
PR gas/26740
* dwarf2dbg.c (allocate_filename_to_slot): Don't reuse the slot 1
here.
(dwarf2_where): Restore as_where.
(dwarf2_directive_filename): Clear the slot 1 if it was assigned
to the input file.
* testsuite/gas/i386/dwarf5-line-2.d: New file.
* testsuite/gas/i386/dwarf5-line-2.s: Likewise.
* testsuite/gas/i386/dwarf5-line-3.d: Likewise.
* testsuite/gas/i386/dwarf5-line-3.s: Likewise.
* testsuite/gas/i386/i386.exp: Run dwarf5-line-2 and
dwarf5-line-3.

(cherry picked from commit bd0c565edbf4ba8121fded38e389530d7fa6f963)

gas: Clear all auto-assigned file slots

Since a file slot is auto-assigned for the #APP marker appeared before
the first .file <NUMBER> directive has been seen, clear all auto-assigned
file slots when seeing the first .file <NUMBER> directive.

PR gas/26778
* * dwarf2dbg.c (num_of_auto_assigned): New.
(allocate_filenum): Increment num_of_auto_assigned.
(dwarf2_directive_filename): Clear the slots auto-assigned
before the first .file <NUMBER> directive was seen.
* testsuite/gas/i386/dwarf4-line-1.d: New file.
* testsuite/gas/i386/dwarf4-line-1.s: Likewise.
* testsuite/gas/i386/i386.exp: Run dwarf4-line-1.

(cherry picked from commit ae9d2233e61a98ff8dba56be10219aa5306ffc9a)

3 years agoreadelf: Fix output of rnglists section
Bernd Edlinger [Wed, 11 Nov 2020 14:31:46 +0000 (14:31 +0000)] 
readelf: Fix output of rnglists section

* dwarf.c (display_debug_rnglists_list): Only bias the
DW_RLS_offset_pair with the base address.

(cherry picked from commit 4d93271533473d65165022ee9f82c368511ce82a)

3 years agobinutils: dwarf.c handle DWARF5 DW_LLE_start_end and DW_LLE_start_length.
Mark Wielaard [Mon, 28 Sep 2020 22:02:06 +0000 (00:02 +0200)] 
binutils: dwarf.c handle DWARF5 DW_LLE_start_end and DW_LLE_start_length.

display_loclists_list only handled DW_LLE_offset_pair as bounded
location description. Also handle DW_LLE_start_end and DW_LLE_start_lenght.
These don't use the base_address.

binutils/ChangeLog:

      * dwarf.c (display_loclists_list): Handle DW_LLE_start_end and
      DW_LLE_start_length. Only add base_address for DW_LLE_offset_pair.

(cherry picked from commit 1c9f770d16a715662564d810a1c1efefd7a66540)

3 years agoreadelf: Show Unit Type for DWARF5
Mark Wielaard [Wed, 23 Sep 2020 14:48:35 +0000 (16:48 +0200)] 
readelf: Show Unit Type for DWARF5

binutils/ChangeLog:

* dwarf.c (process_debug_info): Print Unit Type for DWARF5.
* testsuite/binutils-all/dw5.W: Adjust expected output.
* testsuite/binutils-all/dwarf-attributes.W: Likewise.

gas/ChangeLog:

* testsuite/gas/elf/dwarf-5-cu.d: Adjust expected output.

(cherry picked from commit debd1a62c4d250a6257e9018d9f9c7355edcdf8b)

3 years agoSync libiberty and include with GCC for get_DW_UT_name.
Mark Wielaard [Wed, 23 Sep 2020 14:41:06 +0000 (16:41 +0200)] 
Sync libiberty and include with GCC for get_DW_UT_name.

This adds a get_DW_UT_name function to dwarfnames using dwarf2.def
for use in binutils readelf to show the unit types in a DWARF5 header.

include/ChangeLog:

Sync with GCC
* dwarf2.def: Add DWARF5 Unit type header encoding macros
DW_UT_FIRST, DW_UT and DW_UT_END.
* dwarf2.h (enum dwarf_unit_type): Removed and define using
DW_UT_FIRST, DW_UT and DW_UT_END macros.
(get_DW_UT_name): New function declaration.

libiberty/ChangeLog:

Sync with GCC
* dwarfnames.c (get_DW_UT_name): Define using DW_UT_FIRST, DW_UT
and DW_UT_END.

(cherry picked from commit d7b477c541bd31045483f37345727bd8335a052a)

3 years agobinutils: Handle DWARF5 DW_FORM_ref_addr and DW_UT_partial.
Mark Wielaard [Wed, 23 Sep 2020 14:31:14 +0000 (16:31 +0200)] 
binutils: Handle DWARF5 DW_FORM_ref_addr and DW_UT_partial.

dwz in DWARF5 mode might produce DW_UT_partial unit types, which are
the same as DW_UT_compile unit types (but start with a DW_TAG_partial_unit)
and it might produce DW_FORM_ref_addr to create a reference between
units. Accept both constructs.

binutils/ChangeLog:

* dwarf.c (read_and_display_attr_value): Handle DW_FORM_ref_addr
for dwarf_version 5 just as version 3 and 4 (only 2 is different).
(process_debug_info): Allow DW_UT_partial.

(cherry picked from commit ec47b32a85294af959457ad19bd98dd13f6389fd)

3 years agoelf: Set rel_from_abs to 1 for __ehdr_start
H.J. Lu [Mon, 16 Nov 2020 14:37:53 +0000 (06:37 -0800)] 
elf: Set rel_from_abs to 1 for __ehdr_start

bfdlink.h has

  /* Symbol will be converted from absolute to section-relative.  Set for
     symbols defined by a script from "dot" (also SEGMENT_START or ORIGIN)
     outside of an output section statement.  */
  unsigned int rel_from_abs : 1;

linker.c has

.{* Return TRUE if the symbol described by a linker hash entry H
.   is going to be absolute.  Linker-script defined symbols can be
.   converted from absolute to section-relative ones late in the
.   link.  Use this macro to correctly determine whether the symbol
.   will actually end up absolute in output.  *}
.#define bfd_is_abs_symbol(H) \
.  (((H)->type == bfd_link_hash_defined \
.    || (H)->type == bfd_link_hash_defweak) \
.   && bfd_is_abs_section ((H)->u.def.section) \
.   && !(H)->rel_from_abs)
.

Set rel_from_abs to 1 for __ehdr_start which will be converted from
absolute to section-relative in assign_file_positions_for_load_sections.

PR ld/26869
* ldelf.c (ldelf_before_allocation): Set rel_from_abs to 1 for
__ehdr_start.
* testsuite/ld-i386/i386.exp: Run pr26869.
* testsuite/ld-i386/pr26869.d: New file.
* testsuite/ld-i386/pr26869.s: Likewise.

(cherry picked from commit cbd5b99cce073273f668b154d4514e8e7e7ccc51)

3 years agoAutomatic date update in version.in
GDB Administrator [Mon, 16 Nov 2020 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sun, 15 Nov 2020 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

3 years agoAutomatic date update in version.in
GDB Administrator [Sat, 14 Nov 2020 00:00:57 +0000 (00:00 +0000)] 
Automatic date update in version.in

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