]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 23 Apr 2020 00:00:26 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 22 Apr 2020 00:00:25 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoBFD: Exclude sections with no content from compress check.
Tamar Christina [Tue, 21 Apr 2020 14:16:21 +0000 (15:16 +0100)] 
BFD: Exclude sections with no content from compress check.

The check in bfd_get_full_section_contents is trying to check that we don't
allocate more space for a section than the size of the section is on disk.

Previously we excluded linker created sections since they didn't have a size on
disk.  However we also need to exclude sections with no content as well such as
the BSS section.  Space for these would not have been allocated by the assembler
and so the check would incorrectly fail.

bfd/ChangeLog:

PR binutils/24753
* compress.c (bfd_get_full_section_contents): Exclude sections with no
content.

gas/ChangeLog:

PR binutils/24753
* testsuite/gas/arm/pr24753.d: New test.
* testsuite/gas/arm/pr24753.s: New test.

(cherry picked from commit c36876fe5b5bac1c404ab2ca82bfbfb2ed9a2717)

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 21 Apr 2020 00:00:31 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 20 Apr 2020 00:00:23 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 19 Apr 2020 00:00:21 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 18 Apr 2020 00:00:23 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 17 Apr 2020 00:00:30 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 16 Apr 2020 00:00:25 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 15 Apr 2020 00:00:24 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 14 Apr 2020 00:00:26 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 13 Apr 2020 00:00:23 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 12 Apr 2020 00:00:24 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 11 Apr 2020 00:00:24 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 10 Apr 2020 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 9 Apr 2020 00:00:24 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoArm: Fix LSB of GOT for Thumb2 only PLT.
Tamar Christina [Wed, 1 Apr 2020 09:47:18 +0000 (10:47 +0100)] 
Arm: Fix LSB of GOT for Thumb2 only PLT.

When you have a Thumb only PLT then the address in the GOT for PLT0 needs to
have the Thumb bit set since the instruction used in PLTn to get there is
`ldr.w pc` which is an inter-working instruction:

the PLT sequence in question is

00000120 <foo@plt>:
 120: f240 0c98  movw ip, #152 ; 0x98
 124: f2c0 0c01  movt ip, #1
 128: 44fc       add ip, pc
 12a: f8dc f000  ldr.w pc, [ip]
 12e: e7fc       b.n 12a <foo@plt+0xa>

Disassembly of section .text:

00000130 <bar>:
 130: b580       push {r7, lr}
 132: af00       add r7, sp, #0
 134: f7ff fff4  bl 120 <foo@plt>

and previously the linker would generate

Hex dump of section '.got':
 ...
  0x000101b8 40010100 00000000 00000000 10010000 @...............

Which would make it jump and transition out of thumb mode and crash since you
only have thumb mode on such cores.

Now it correctly generates

Hex dump of section '.got':
 ...
  0x000101b8 40010100 00000000 00000000 11010000 @...............

Thanks to Amol for testing patch and to rgujju for reporting it.

bfd/ChangeLog:

PR ld/16017
* elf32-arm.c (elf32_arm_populate_plt_entry): Set LSB of the PLT0
address in the GOT if in thumb only mode.

ld/ChangeLog:

PR ld/16017
* testsuite/ld-arm/arm-elf.exp (thumb-plt-got): New.
* testsuite/ld-arm/thumb-plt-got.d: New test.

(cherry picked from commit a7618269b727da9cf56727c22cb538ff5f0e4d25)
(cherry picked from commit 3ce23ca1de4c769c4b7247f0724a10ef5fb24a11)

4 years agoArm: Fix thumb2 PLT branch offsets.
Tamar Christina [Wed, 1 Apr 2020 09:40:07 +0000 (10:40 +0100)] 
Arm: Fix thumb2 PLT branch offsets.

When I previously changed these offsets I had incorrectly used an offset of -2
for this Thumb2 PLT.  Unfortunately because we had no tests for this PLT I had
missed that the result was incorrect.

This patch fixes the offset to PC .-4 so that it correctly addresses the
previous instruction and adds a test for this PLT stub.

bfd/ChangeLog:

* elf32-arm.c (elf32_thumb2_plt_entry): Fix PC-rel offset.

ld/ChangeLog:

* testsuite/ld-arm/arm-elf.exp (thumb-plt): New.
* testsuite/ld-arm/thumb-plt.d: New test.
* testsuite/ld-arm/thumb-plt.s: New test.

(cherry picked from commit 15ccbdd717530f81f545a716f0df1de62aee1157)
(cherry picked from commit 3ce23ca1de4c769c4b7247f0724a10ef5fb24a11)

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 8 Apr 2020 00:00:24 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 7 Apr 2020 00:00:26 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 6 Apr 2020 00:00:18 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 5 Apr 2020 00:00:21 +0000 (00:00 +0000)] 
Automatic date update in version.in

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

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

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 2 Apr 2020 00:00:23 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoinclude: Sync plugin-api.h with GCC
Martin Liska [Wed, 1 Apr 2020 09:36:11 +0000 (02:36 -0700)] 
include: Sync plugin-api.h with GCC

Fix typo in a macro usage.

PR lto/94249
* plugin-api.h: Fix a typo.

(cherry picked from commit 40bd13ced9c03c74af9d55a98d6e06ddcf11429c)

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 1 Apr 2020 00:00:25 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 31 Mar 2020 00:00:21 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 30 Mar 2020 00:00:22 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoPR25745, powerpc64-ld overflows string buffer in --stats mode
Alan Modra [Sun, 29 Mar 2020 22:58:02 +0000 (09:28 +1030)] 
PR25745, powerpc64-ld overflows string buffer in --stats mode

PR 25745
* elf64-ppc.c (ppc64_elf_build_stubs): Use asprintf to form
statistics message.

(cherry picked from commit 988b7300bc990abafd982bdcd217c58bc1e0679a)

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 29 Mar 2020 00:00:19 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 28 Mar 2020 00:00:22 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 27 Mar 2020 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 26 Mar 2020 00:00:30 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoinclude: Sync plugin-api.h with GCC
Martin Liska [Wed, 25 Mar 2020 14:05:40 +0000 (07:05 -0700)] 
include: Sync plugin-api.h with GCC

Improve endianess detection.

PR lto/94249
* plugin-api.h: Add more robust endianess detection.

(cherry picked from commit dfb68cc35803369cbd163c2ebc07fb27e81d9950)

4 years agoinclude: Sync lto-symtab.h and plugin-api.h with GCC
Martin Liska [Wed, 25 Mar 2020 14:02:17 +0000 (07:02 -0700)] 
include: Sync lto-symtab.h and plugin-api.h with GCC

Fix comma at end of enumerator list seen with -std=c++98.

* plugin-api.h (enum ld_plugin_symbol_type): Remove
comma after last value of an enum.
* lto-symtab.h (enum gcc_plugin_symbol_type): Likewise.

(cherry picked from commit e3b1fa32c2814772e8c8c4d2788e1d342c7493d0)

4 years agoplugin: Don't invoke LTO-wrapper
H.J. Lu [Wed, 25 Mar 2020 13:58:19 +0000 (06:58 -0700)] 
plugin: Don't invoke LTO-wrapper

Don't invoke LTO-wrapper since the LTO wrapper approach is not only
slow but also unreliable.  For GCC 10 or newer, LDPT_ADD_SYMBOLS_V2
will be used.

bfd/

* configure.ac (HAVE_EXECUTABLE_SUFFIX): Removed.
(EXECUTABLE_SUFFIX): Likewise.
* config.in: Regenerated.
* configure: Likewise.
* plugin.c (bfd_plugin_close_and_cleanup): Defined as
_bfd_generic_close_and_cleanup.
(plugin_list_entry): Remove resolution_file, resolution_option,
real_bfd, real_nsyms, real_syms, lto_nsyms, lto_syms, gcc,
lto_wrapper, gcc_env and initialized,
(need_lto_wrapper_p): Removed.
(get_lto_wrapper): Likewise.
(setup_lto_wrapper_env): Likewise.
(register_all_symbols_read): Likewise.
(egister_cleanup): Likewise.
(get_symbols): Likewise.
(add_input_file): Likewise.
(bfd_plugin_set_program_name): Remove need_lto_wrapper.
(add_symbols): Updated.
(try_claim): Likewise.
(try_load_plugin): Likewise.
(bfd_plugin_canonicalize_symtab): Likewise.
* plugin.h (bfd_plugin_set_program_name): Remove int argument.
(plugin_data_struct): Remove real_bfd, real_nsyms and
real_syms.

binutils/

* ar.c (main): Update bfd_plugin_set_program_name call.
* nm.c (main): Likewise.

ld/

* testsuite/ld-plugin/lto.exp (lto_link_tests): Run PR ld/25355
test only for GCC 10 or newer.

(cherry picked from commit 3d98c46092341c1373d960d0a66ca502d5b7ee7f)

4 years agoplugin: Use LDPT_ADD_SYMBOLS_V2 to get symbol type
H.J. Lu [Wed, 25 Mar 2020 13:54:20 +0000 (06:54 -0700)] 
plugin: Use LDPT_ADD_SYMBOLS_V2 to get symbol type

Since LTO plugin may generate more than one ltrans.o file from one input
IR object as LTO wrapper ignores -flto-partition=none:

lto-wrapper.c:608:

   604          /* Drop arguments that we want to take from the link line.  */
   605          case OPT_flto_:
   606          case OPT_flto:
   607          case OPT_flto_partition_:
   608            continue;

the LTO wrapper approach is not only slow but also unreliable.  Since
the LTO plugin API has been extended to add LDPT_ADD_SYMBOLS_V2 with
symbol type and section kind, we can use LDPT_ADD_SYMBOLS_V2 to get
symbol type, instead of invoking the LTO wrapper.

PR binutils/25640
* plugin.c (plugin_list_entry): Add has_symbol_type.
(add_symbols_v2): New function.
(bfd_plugin_open_input): Don't invoke LTO wrapper if LTO plugin
provides symbol type.
(try_load_plugin): Add LDPT_ADD_SYMBOLS_V2.
(bfd_plugin_canonicalize_symtab): Use LTO plugin symbol type if
available.

(cherry picked from commit c3a1714ce7806002726a60c0db09371425fe3097)

4 years agoSilence warnings due to plugin API change
Alan Modra [Wed, 25 Mar 2020 13:52:33 +0000 (06:52 -0700)] 
Silence warnings due to plugin API change

* testplug.c (parse_symdefstr): Use %hhi to read sym->def, and
clear new fields.
* testplug2.c (parse_symdefstr): Likewise.
* testplug3.c (parse_symdefstr): Likewise.
* testplug4.c (parse_symdefstr): Likewise.

(cherry picked from commit c02d66610b3b79f6fb5052e8890969bc7185b7be)

4 years agoInclude: Sync lto-symtab.h and plugin-api.h with GCC
Martin Liska [Wed, 25 Mar 2020 13:47:35 +0000 (06:47 -0700)] 
Include: Sync lto-symtab.h and plugin-api.h with GCC

2020-03-19  Martin Liska  <mliska@suse.cz>

* lto-symtab.h (enum gcc_plugin_symbol_type): New.
(enum gcc_plugin_symbol_section_kind): Likewise.

2020-03-19  Martin Liska  <mliska@suse.cz>

* plugin-api.h (struct ld_plugin_symbol): Split
int def into 4 char fields.
(enum ld_plugin_symbol_type): New.
(enum ld_plugin_symbol_section_kind): New.
(enum ld_plugin_tag): Add LDPT_ADD_SYMBOLS_V2.

(cherry picked from commit 3734bec8336f6f33927ab99460cb681035c2ca4f)

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 25 Mar 2020 00:00:27 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoFix dwarf.c build with GCC 10
Nick Clifton [Fri, 7 Feb 2020 12:49:42 +0000 (12:49 +0000)] 
Fix dwarf.c build with GCC 10

Silcence a compile time warning message building the binutils with
gcc-10.

* dwarf.c (display_debug_lines_decoded): Force a NUL termination
of the truncated file name.

(cherry picked from commit e1104d08fe2fbfabcfa98aa00525211e47548bd8)

4 years agobfd: Change num_group to unsigned int
H.J. Lu [Tue, 24 Mar 2020 13:58:40 +0000 (06:58 -0700)] 
bfd: Change num_group to unsigned int

elf.c failed with to with GCC 10 as of

commit 906b3eb9df6c577d3f6e9c3ea5c9d7e4d1e90536
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Mar 24 11:40:10 2020 +0100

    Improve endianess detection.

            PR lto/94249
            * plugin-api.h: Add more robust endianess detection.

binutils-gdb/bfd/elf.c: In function â€˜setup_group’:
binutils-gdb/bfd/elf.c:740:35: error: overflow in conversion from â€˜unsigned int’ to â€˜int’ changes value from â€˜num_group = 4294967295’ to â€˜-1’ [-Werror=overflow]
  740 |     elf_tdata (abfd)->num_group = num_group = -1;
      |                                   ^~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:1608: elf.lo] Error 1

Change num_group in elf_obj_tdata to unsigned int to compile with GCC 10.

PR binutils/25717
* elf-bfd.h (elf_obj_tdata): Change num_group to unsigned int.

(cherry picked from commit cda7e5603f6efd7c3716e45cc6ea11b70dd8daae)

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 24 Mar 2020 00:00:29 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 23 Mar 2020 00:00:21 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 22 Mar 2020 00:00:30 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 21 Mar 2020 00:00:23 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 20 Mar 2020 00:00:33 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 19 Mar 2020 00:00:21 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 18 Mar 2020 00:00:20 +0000 (00:00 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 17 Mar 2020 13:46:59 +0000 (13:46 +0000)] 
Automatic date update in version.in

4 years agogas, arm: Fix bad backport
Andre Vieira [Mon, 16 Mar 2020 13:15:31 +0000 (13:15 +0000)] 
gas, arm: Fix bad backport

This patch fixes the backport for PR25660 as it contained bad context.

4 years agogas, arm: PR25660L Fix vadd/vsub with lt and le condition codes for MVE
Andre Vieira [Fri, 13 Mar 2020 13:31:56 +0000 (13:31 +0000)] 
gas, arm: PR25660L Fix vadd/vsub with lt and le condition codes for MVE

As explained in the PR, the addition of MVE makes the parser strip 't' and 'e'
as suffixes when MVE is enabled.  This leads to vadd and vsub in it blocks with
lt and le conditions to be initially parsed as vaddl and vsubl.  This means the
operand parsing for these must allow for the same operands as the scalar vadd
and vsub.  I had forgotten to do this and this patch remedies that oversight.

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

Backport from mainline.
2020-03-13  Andre Vieira  <andre.simoesdiasvieira@arm.com>

PR 25660
*  config/tc-arm.c (operand_parse_code): Add OP_RNSDMQR and OP_oRNSDMQ.
(parse_operands): Handle new operand codes.
(do_neon_dyadic_long): Make shape check accept the scalar variants.
(asm_opcode_insns): Fix operand codes for vaddl and vsubl.
* testsuite/gas/arm/mve-vaddsub-it.s: New test.
* testsuite/gas/arm/mve-vaddsub-it.d: New test.
* testsuite/gas/arm/mve-vaddsub-it-bad.s: New test.
* testsuite/gas/arm/mve-vaddsub-it-bad.l: New test.
* testsuite/gas/arm/mve-vaddsub-it-bad.d: New test.
* testsuite/gas/arm/nomve-vaddsub-it.d: New test.

4 years agopowerpc64-ld infinite loop
Alan Modra [Wed, 11 Mar 2020 04:13:16 +0000 (14:43 +1030)] 
powerpc64-ld infinite loop

If this code dealing with possible conversion of inline plt sequences
is ever executed, ld will hang.  A binary with such sequences and of
code size larger than approximately 90% the reach of an unconditional
branch is the trigger.  Oops.

* elf64-ppc.c (ppc64_elf_inline_plt): Do increment rel in for loop.

(cherry picked from commit 435edf0bf231240ccecb474b74ebb49dc8db2633)

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 7 Mar 2020 00:01:47 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 6 Mar 2020 00:02:14 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 5 Mar 2020 00:01:18 +0000 (00:01 +0000)] 
Automatic date update in version.in

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

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 3 Mar 2020 00:01:47 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 2 Mar 2020 00:01:18 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 1 Mar 2020 00:01:53 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 29 Feb 2020 00:01:15 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 28 Feb 2020 00:02:45 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAdjust PR25355 testcase
Alan Modra [Wed, 19 Feb 2020 02:40:47 +0000 (13:10 +1030)] 
Adjust PR25355 testcase

* testsuite/ld-plugin/pr25355.d: Allow alpha-linux nm result.

(cherry picked from commit 2e3cd5d013cee36c5bc26c0468d471878300ed22)

4 years agoRe: PR24511, nm should not mark symbols in .init_array as "t"
Alan Modra [Thu, 27 Feb 2020 06:58:47 +0000 (17:28 +1030)] 
Re: PR24511, nm should not mark symbols in .init_array as "t"

PR 24511
* syms.c (bfd_decode_symclass): Reverse order of coff_section_type
and decode_section_type calls.

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 27 Feb 2020 00:01:24 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 26 Feb 2020 00:01:17 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoDon't call lto-wrapper for ar and ranlib
H.J. Lu [Tue, 25 Feb 2020 11:30:33 +0000 (03:30 -0800)] 
Don't call lto-wrapper for ar and ranlib

Since ar and ranlib don't need to know symbol types to work properly,
we should avoid calling lto-wrapper for them to speed them up.

bfd/

PR binutils/25584
* plugin.c (need_lto_wrapper_p): New.
(bfd_plugin_set_program_name): Add an int argument to set
need_lto_wrapper_p.
(get_lto_wrapper): Return FALSE if need_lto_wrapper_p isn't
set.
* plugin.h (bfd_plugin_set_program_name): Add an int argument.

binutils/

PR binutils/25584
* ar.c (main): Pass 0 to bfd_plugin_set_program_name.
* nm.c (main): Pass 1 to bfd_plugin_set_program_name.

(cherry picked from commit ecda90163e2b0a6f0be96e3fc262c28820a27211)

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 25 Feb 2020 00:02:13 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 24 Feb 2020 00:01:50 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 23 Feb 2020 00:02:32 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoPR25585, PHDR segment not covered by LOAD segment
Alan Modra [Sat, 22 Feb 2020 02:16:33 +0000 (12:46 +1030)] 
PR25585, PHDR segment not covered by LOAD segment

I closed this bug as invalid, but I think it is worth mentioning in NEWS
that older linkers didn't check PT_PHDR very well.  The patch also allows
people to force an output file with --noinhibit-exec after the error.

bfd/
PR 25585
* elf.c (assign_file_positions_for_load_sections): Continue linking
on "PHDR segment not covered by LOAD segment" errors.
ld/
PR 25585
* NEWS: Mention better "PHDR segment not covered by LOAD segment"
checking.

(cherry picked from commit 7b3c27152b5695177a2cd5adc0d7b0255f99aca0)

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 22 Feb 2020 00:01:31 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 21 Feb 2020 00:02:59 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 20 Feb 2020 00:01:35 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoplugin: Call dlclose before return in try_load_plugin
H.J. Lu [Wed, 19 Feb 2020 11:29:51 +0000 (03:29 -0800)] 
plugin: Call dlclose before return in try_load_plugin

Since plugin can be used only once in try_load_plugin, call dlclose
before return.

PR binutils/25355
* plugin.c (plugin_list_entry): Remove handle.
(try_load_plugin): Call dlclose before return.

(cherry picked from commit dcf06b89b9129da6988878a77afdd02d3acc2e30)

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 19 Feb 2020 00:01:47 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 18 Feb 2020 00:01:47 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 17 Feb 2020 00:01:50 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoImport fixes for using the LTO plugin with nm.
Nick Clifton [Sun, 16 Feb 2020 11:33:15 +0000 (11:33 +0000)] 
Import fixes for using the LTO plugin with nm.

  PR 25355

bfd:
 2020-02-13  H.J. Lu  <hongjiu.lu@intel.com>

 * plugin.c (try_load_plugin): Make plugin_list_iter an argument
 and use it if it isn't NULL.  Remove has_plugin_p argument.  Add
 a build_list_p argument.  Don't search plugin_list.  Short circuit
 when building the plugin list.
 (has_plugin): Renamed to has_plugin_list.
 (bfd_plugin_set_plugin): Don't set has_plugin.
 (bfd_plugin_specified_p): Check plugin_list instead.
 (build_plugin_list): New function.
 (load_plugin): Call build_plugin_list and use plugin_list.

 2020-02-11  H.J. Lu  <hongjiu.lu@intel.com>

 PR binutils/25355
 * plugin.c (try_claim): Always clean up for LTO wrapper.
 (try_load_plugin): Treat each object as independent.  Create a
 copy for plugin name.

 2020-02-11  H.J. Lu  <hongjiu.lu@intel.com>

 * plugin.c (add_symbols): Clear plugin_data memory.

 2020-02-10  H.J. Lu  <hongjiu.lu@intel.com>

 PR binutils/25355
 * configure.ac (HAVE_EXECUTABLE_SUFFIX): New AC_DEFINE.
 (EXECUTABLE_SUFFIX): Likewise.
 * config.in: Regenerated.
 * configure: Likewise.
 * plugin.c (bfd_plugin_close_and_cleanup): Removed.
 (plugin_list_entry): Add all_symbols_read, cleanup_handler,
 gcc, lto_wrapper, resolution_file, resolution_option, gcc_env,
 real_bfd, real_nsyms, real_syms, lto_nsyms and lto_syms.
 (get_lto_wrapper): New.
 (setup_lto_wrapper_env): Likewise.
 (current_plugin): Likewise.
 (register_all_symbols_read): Likewise.
 (register_cleanup): Likewise.
 (get_symbols): Likewise.
 (add_input_file): Likewise.
 (bfd_plugin_close_and_cleanup): Likewise.
 (claim_file): Removed.
 (register_claim_file): Set current_plugin->claim_file.
 (add_symbols): Make a copy of LTO symbols.  Set lto_nsyms and
 lto_syms in current_plugin.
 (try_claim): Use current_plugin->claim_file.  Call LTO plugin
 all_symbols_read handler.  Copy real symbols to plugin_data.
 Call LTO plugin cleanup handler.  Clean up for LTO wrapper.
 (try_load_plugin): Don't reuse the previous plugin for LTO
 wrapper.  Set up GCC LTO wrapper if possible.  Don't set
 plugin_list_iter->claim_file.
 (bfd_plugin_canonicalize_symtab): Use real LTO symbols if
 possible.
 * plugin.h (plugin_data_struct): Add real_bfd, real_nsyms and
 real_syms.

ld:
 2020-02-10  H.J. Lu  <hongjiu.lu@intel.com>

 PR binutils/25355
 * testsuite/ld-plugin/lto.exp: Run PR binutils/25355 test.
 * testsuite/ld-plugin/pr25355.c: New file.
 * testsuite/ld-plugin/pr25355.d: Likewise.
 * testsuite/lib/ld-lib.exp (run_cc_link_tests): Support compile
 only dump.

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 16 Feb 2020 00:02:45 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 15 Feb 2020 00:01:39 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 14 Feb 2020 00:02:06 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 13 Feb 2020 00:01:45 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 12 Feb 2020 00:02:01 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoImport a fix from the mainline sources that prevents a potential illegal memory acces...
Nick Clifton [Tue, 11 Feb 2020 15:55:25 +0000 (15:55 +0000)] 
Import a fix from the mainline sources that prevents a potential illegal memory access when parsing PE binaries.

PR 25447
* coffgen.c (_bfd_coff_close_and_cleanup): Do not clear the keep
syms and keep strings flags as these may have been set in order to
prevent a bogus call to free.

4 years agoFix building elf43-msp430.c on a 32-bit host.
Nick Clifton [Tue, 11 Feb 2020 12:43:41 +0000 (12:43 +0000)] 
Fix building elf43-msp430.c on a 32-bit host.

* elf32-msp430.c (msp430_final_link_relocate): Always use longs
for addresses in print statements.
(msp430_elf_relax_delete_bytes): Likewise.
(msp430_elf_relax_add_words): Likewise.
(msp430_elf_relax_section): Likewise.

4 years agoAutomatic date update in version.in
GDB Administrator [Tue, 11 Feb 2020 00:01:58 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoMSP430: Enable relaxation of jump instructions to hard-coded pcrel offsets
Jozef Lawrynowicz [Mon, 10 Feb 2020 20:37:57 +0000 (20:37 +0000)] 
MSP430: Enable relaxation of jump instructions to hard-coded pcrel offsets

This patch fixes execution failures which occur when the BR in a
sequence such as:
  J<cond> 1f
  BR
  1:
is relaxed to a JMP, and the pc-relative offset for the destination of
the J<cond> instruction is hard-coded to be 2 words ahead of the
instruction.
The hard-coded offset will cause execution to jump 1 word ahead of where
it should actually go.

Instead we now detect the hard-coded offset is one we inserted earlier,
and invert the condition, allowing us to remove the BR entirely.

bfd/ChangeLog:

2020-02-10  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

* elf32-msp430.c (msp430_elf_relax_section): Before relaxing a branch,
check if previous instruction matches a conditional jump inserted
earlier. Invert conditional jump and delete branch in this case.

(cherry picked from commit ac4280dad035bb98fba999c174314435aefdf1a0)

4 years agoMSP430: Enable relaxation of relocs in JMP instructions
Jozef Lawrynowicz [Mon, 10 Feb 2020 20:33:21 +0000 (20:33 +0000)] 
MSP430: Enable relaxation of relocs in JMP instructions

This patch fixes relocation overflows caused by an inability to relax
unconditional JMP instructions to BR instructions.

bfd/ChangeLog:

2020-02-10  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

* elf32-msp430.c (msp430_elf_relax_add_two_words): Rename to
msp430_elf_relax_add_words. Support insertion of either one or two
words.
(msp430_elf_relax_section): Catch opcode of 0x3c00 when relocation
needs to be grown. Handle insertion of branch instruction to replace
jump.

(cherry picked from commit 8d6cb116f47b5edb2a7c2fa540fcb9dbcd3effc2)

4 years agoMSP430: Add printf statements to assist with debugging during relaxation
Jozef Lawrynowicz [Mon, 10 Feb 2020 20:27:36 +0000 (20:27 +0000)] 
MSP430: Add printf statements to assist with debugging during relaxation

bfd/ChangeLog:

2020-02-10  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

* elf32-msp430.c (msp430_final_link_relocate): Add printf statements for
debugging relocations.
(msp430_elf_relax_delete_bytes): Likewise.
(msp430_elf_relax_add_two_words): Likewise.
(msp430_elf_relax_section): Likewise.

(cherry picked from commit d60f54486a99e6b702cccdb16b3429f3524021fd)

4 years agox86: Accept Intel64 only instruction by default
H.J. Lu [Mon, 10 Feb 2020 16:37:22 +0000 (08:37 -0800)] 
x86: Accept Intel64 only instruction by default

Commit d835a58baae720 disabled sysenter/sysenter in 64-bit mode by
default.  By default, assembler should accept common, Intel64 only
and AMD64 ISAs since there are no conflicts.

gas/

PR gas/25516
* config/tc-i386.c (intel64): Renamed to ...
(isa64): This.
(match_template): Accept Intel64 only instruction by default.
(i386_displacement): Updated.
(md_parse_option): Updated.
* c-i386.texi: Update -mamd64/-mintel64 documentation.
* testsuite/gas/i386/i386.exp: Run x86-64-sysenter.  Pass
-mamd64 to x86-64-sysenter-amd.
* testsuite/gas/i386/x86-64-sysenter.d: New file.

opcodes/

PR gas/25516
* i386-gen.c (opcode_modifiers): Replace AMD64 and Intel64
with ISA64.
* i386-opc.h (AMD64): Removed.
(Intel64): Likewose.
(AMD64): New.
(INTEL64): Likewise.
(INTEL64ONLY): Likewise.
(i386_opcode_modifier): Replace amd64 and intel64 with isa64.
* i386-opc.tbl (Amd64): New.
(Intel64): Likewise.
(Intel64Only): Likewise.
Replace AMD64 with Amd64.  Update sysenter/sysenter with
Cpu64 and Intel64Only.  Remove AMD64 from sysenter/sysenter.
* i386-tbl.h: Regenerated.

(cherry picked from commit 4b5aaf5f6992319c2c72e080a1a55842640b8732)

4 years agoaarch64: Fix MOVPRFX markup for bf16 conversions
Richard Sandiford [Fri, 31 Jan 2020 08:03:56 +0000 (08:03 +0000)] 
aarch64: Fix MOVPRFX markup for bf16 conversions

bfcvt converts a .S input to a .H output, so any predicated movprfx
needs to operate on .S rather than .H.  In common with SVE2 narrowing
top operations, bfcvtnt doesn't accept movprfx.

2020-02-10  Richard Sandiford  <richard.sandiford@arm.com>

opcodes/
* aarch64-tbl.h (aarch64_opcode): Set C_MAX_ELEM for SVE bfcvt.
Remove C_SCAN_MOVPRFX for SVE bfcvtnt.

gas/
* testsuite/gas/aarch64/sve-bfloat-movprfx.s: Use .h rather than
.s for the movprfx.
* testsuite/gas/aarch64/sve-bfloat-movprfx.d: Update accordingly.
* testsuite/gas/aarch64/sve-movprfx_28.d,
* testsuite/gas/aarch64/sve-movprfx_28.l,
* testsuite/gas/aarch64/sve-movprfx_28.s: New test.

4 years agoAutomatic date update in version.in
GDB Administrator [Mon, 10 Feb 2020 00:02:02 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sun, 9 Feb 2020 00:02:37 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Sat, 8 Feb 2020 00:01:55 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Fri, 7 Feb 2020 00:02:24 +0000 (00:02 +0000)] 
Automatic date update in version.in

4 years ago[2.34] Mention x86 assembler options to align branches
H.J. Lu [Thu, 6 Feb 2020 15:50:16 +0000 (07:50 -0800)] 
[2.34] Mention x86 assembler options to align branches

* NEWS: Mention x86 assembler options to align branches for
binutils 2.34.

(cherry picked from commit 5eb617a71463fa6810cd14f57adfe7a1efc93a96)

4 years agoAutomatic date update in version.in
GDB Administrator [Thu, 6 Feb 2020 00:01:49 +0000 (00:01 +0000)] 
Automatic date update in version.in

4 years agoAutomatic date update in version.in
GDB Administrator [Wed, 5 Feb 2020 00:01:44 +0000 (00:01 +0000)] 
Automatic date update in version.in