aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Automatic date update in version.ingentoo/binutils-2.34-6gentoo/binutils-2.34GDB Administrator2020-07-311-1/+1
| | | | (cherry picked from commit 9ef2e8c09f1ac3ab5905e87c553e70fdf9be13f9)
* S/390: z13: Accept vector alignment hintsStefan Schulze Frielinghaus2020-07-315-20/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | Accept vector alignment hints on z13 although they are ignored there. The advantage is that any binary compiled for architecture level z13 may run on z14 or later and benefit from vector alignment hints. Backport from mainline. gas/ChangeLog: 2020-05-18 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> * testsuite/gas/s390/zarch-z13.d: Add regexp checks for vector load/store instruction variants with alignment hints. * testsuite/gas/s390/zarch-z13.s: Emit new vector load/store instruction variants with alignment hints. opcodes/ChangeLog: 2020-05-18 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> * s390-opc.txt: Relocate vector load/store instructions with additional alignment parameter and change architecture level constraint from z14 to z13. (cherry picked from commit 26b6ab7a0e4106597c3e4949bb17208bd863ce98)
* gas: Fix checking for backwards .org with negative offsetAlex Coplan2020-07-318-2/+29
| | | | | | | | | | | | | | | | | | This patch fixes internal errors in (at least) arm and aarch64 GAS when assembling code that attempts a negative .org. The bug appears to be a regression introduced in binutils-2.29 by commit 9875b36538d. * write.c (relax_segment): Fix handling of negative offset when relaxing an rs_org frag. * testsuite/gas/aarch64/org-neg.d: New test. * testsuite/gas/aarch64/org-neg.l: Error output for test. * testsuite/gas/aarch64/org-neg.s: Input for test. * testsuite/gas/arm/org-neg.d: New test. * testsuite/gas/arm/org-neg.l: Error output for test. * testsuite/gas/arm/org-neg.s: Input for test. (cherry picked from commit c39c821c1da3e8a64eff5984a39e104eb798e8b8) (cherry picked from commit 7324292cd94269c6542492beea9a11f11d0bd8b1)
* Prevent a potential use-after-fee memory corruption bug in the linker (for ↵Nick Clifton2020-07-313-12/+48
| | | | | | | | | | | PE format files). PR 25993 * emultempl/pe.em (_after_open): Check for duplicate filename pointers before renaming the dll. * emultempl/pep.em (_after_open): Likewise. (cherry picked from commit 463ec189fe9eca199edf87cda2c31efbe850390d)
* Fix the ARM assembler to generate a Realtime profile for armv8-r.Alexander Fedotov2020-07-318-14/+31
| | | | | | | | | | | PR 25992 gas * config/tc-arm.c : Add arm_ext_v8r feature. (it_fsm_post_encode): Check arm_ext_v8r feature. (get_aeabi_cpu_arch_from_fset): Check arm_ext_v8r feature. include * opcode/arm.h (ARM_EXT2_V8R): Define. Modified ARM_AEXT2_V8R. (cherry picked from commit ef2826c0fdbbd9016630f0738e3e2dd5eb14012a)
* Re: Fix tight loop on recursively-defined symbolsAlan Modra2020-07-312-0/+6
| | | | | | | | | | | sy_resolving ought to not be set for a struct local_symbol, but it is apparent from local_symbol_make that the field is not initialised. * symbols.c (resolve_symbol_value): Invoke LOCAL_SYMBOL_CHECK before looking at add_symbol->sy_flags.sy_resolving. (cherry picked from commit d402189f2faa0aaa9fb8ad4669fdf0059946cd8a) (cherry picked from commit 8524bb5bd28a9275ea38eaf3187badd13d15f5f2)
* Fix tight loop on recursively-defined symbolsAlan Modra2020-07-316-3/+48
| | | | | | | | | | | | | | | | | | | | | | This patch fixes a bug in GAS where the assembler enters a tight loop when attempting to resolve recursively-defined symbols, e.g. when trying to assemble "a=a". This is a regression introduced between binutils 2.32 and 2.33, by commit 1903f1385bff9 * symbols.c (struct local_symbol): Update comment. (resolve_symbol_value): For resolved symbols equated to other symbols, verify that the referenced symbol is not a local_symbol before accessing sy_value. Don't leave symbol loops during finalize_syms resolution. * testsuite/gas/all/assign-bad-recursive.d: New test. * testsuite/gas/all/assign-bad-recursive.l: Error output for test. * testsuite/gas/all/assign-bad-recursive.s: Assembly for test. * testsuite/gas/all/gas.exp: Run it. (cherry picked from commit 2a50b401465f74d7f3ee1654915b9070b4dc0fee) (cherry picked from commit 5768460022b2928f1a5bd6d14dcc6176319a1c01)
* [no patch] Remove Gentoo patchset files, now in separate repoAndreas K. Hüttel2020-07-254-173/+0
| | | | Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
* PR25900, RISC-V: null pointer dereferencegentoo/binutils-2.34-5Alan Modra2020-07-252-5/+13
| | | | | | | | | PR 25900 * elfnn-riscv.c (_bfd_riscv_relax_section): Check root.type before accessing root.u.def of symbols. Also check root.u.def.section is non-NULL. Reverse tests so as to make the logic positive. (cherry picked from commit a2714d6cca1f1c7695f8dc84b49a4a51d1db86c8)
* binutils: drop redundant 'program_name' definition (-fno-common)Sergei Trofimovich2020-07-254-6/+6
| | | | | | | | * coffdump.c (program_name): Drop redundant definition. * srconv.c (program_name): Likewise * sysdump.c (program_name): Likewise Signed-off-by: Sergei Trofimovich <siarheit@google.com>
* Gentoo: Fix regexp of hilarious ld detection heuristicgentoo/binutils-2.34-4Andreas K. Hüttel2020-05-101-2/+2
| | | | | The new linker used to be called as "ld/ld-new" but is now called as "./ld-new" Test for just "ld-new" and hope that the compiler binary never looks like this.
* Gentoo: Adapt generic test library to our linker settingsAndreas K. Hüttel2020-05-101-1/+1
|
* Gentoo: Remove block mistakenly duplicated in ↵Andreas K. Hüttel2020-05-101-753/+0
| | | | 1222895ec55f34a97fb2cbcd80d421e24308f618
* Automatic date update in version.ingentoo/binutils-2.34-3GDB Administrator2020-05-081-1/+1
| | | | (cherry picked from commit 3b87b29a68658d7b8a3c08e7398ee2093a462c48)
* gas: PR 25863: Fix scalar vmul inside it block when assembling for MVEAndre Simoes Dias Vieira2020-05-084-9/+29
| | | | | | | | | | | | | | | | | | This fixes PR 25863 by fixing the condition in the parsing of vmul in do_mve_vmull. It also simplifies the code in there fixing latent issues that would lead to NEON code being accepted when it shouldn't. 2020-05-07 Andre Vieira <andre.simoesdiasvieira@arm.com> Backport from mainline. 2020-05-04 Andre Vieira <andre.simoesdiasvieira@arm.com> PR gas/25863 * config/tc-arm.c (do_mve_vmull): Fix scalar and NEON parsing of vmul. * testsuite/gas/arm/mve-scalar-vmult-it.d: New test. * testsuite/gas/arm/mve-scalar-vmult-it.s: New test. (cherry picked from commit a72427b1ae01304da0b5170e1e53f68c6d46c1de)
* BFD: Exclude sections with no content from compress check.Tamar Christina2020-05-085-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | 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) (cherry picked from commit 9f57ab49b32bc14c0ff3834876a185af0a4c6e6b)
* Arm: Fix LSB of GOT for Thumb2 only PLT.Tamar Christina2020-05-085-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) (cherry picked from commit aaf3f0599a210699a76767c07a7d7f62d7633d71)
* Arm: Fix thumb2 PLT branch offsets.Tamar Christina2020-05-086-2/+74
| | | | | | | | | | | | | | | | | | | | | | | 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) (cherry picked from commit 97f92b3e90a41cad48a7ed3587e87989682ff9c8)
* include: Sync plugin-api.h with GCCMartin Liska2020-05-082-1/+7
| | | | | | | | | | Fix typo in a macro usage. PR lto/94249 * plugin-api.h: Fix a typo. (cherry picked from commit 40bd13ced9c03c74af9d55a98d6e06ddcf11429c) (cherry picked from commit 3053d7a163cef3a17c199026a2f1b97a24030a4f)
* PR25745, powerpc64-ld overflows string buffer in --stats modeAlan Modra2020-05-082-36/+46
| | | | | | | | | PR 25745 * elf64-ppc.c (ppc64_elf_build_stubs): Use asprintf to form statistics message. (cherry picked from commit 988b7300bc990abafd982bdcd217c58bc1e0679a) (cherry picked from commit f7aec2b8e09768f284085259e08bfc1f61a0ae27)
* include: Sync plugin-api.h with GCCMartin Liska2020-05-082-2/+68
| | | | | | | | | | Improve endianess detection. PR lto/94249 * plugin-api.h: Add more robust endianess detection. (cherry picked from commit dfb68cc35803369cbd163c2ebc07fb27e81d9950) (cherry picked from commit 1b2bf0f65c19e6e37b8811bc03fa6aeb89867b7b)
* include: Sync lto-symtab.h and plugin-api.h with GCCMartin Liska2020-05-083-2/+8
| | | | | | | | | | | 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) (cherry picked from commit 5e8619b959725c5789fbfdded2723af0c87a68af)
* plugin: Don't invoke LTO-wrapperH.J. Lu2020-05-0811-476/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) (cherry picked from commit 23820109ced73d231b69ea6fa9a85b743d7843c8)
* plugin: Use LDPT_ADD_SYMBOLS_V2 to get symbol typeH.J. Lu2020-05-082-14/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) (cherry picked from commit 64f5c0afcc4683f0003b60d6a5a299beb08f38de)
* Silence warnings due to plugin API changeAlan Modra2020-05-085-4/+24
| | | | | | | | | | | * 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) (cherry picked from commit aaa1e160040ce2d8f382f9327cc7aea078373f3d)
* Include: Sync lto-symtab.h and plugin-api.h with GCCMartin Liska2020-05-083-2/+56
| | | | | | | | | | | | | | | | | | 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) (cherry picked from commit e7c0ee5110c175cc8762a8d379bdf2e3405d45d3)
* Fix dwarf.c build with GCC 10Nick Clifton2020-05-082-0/+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) (cherry picked from commit b6520be37fd59993c5b6bed1fe2a185fb7a1f996)
* bfd: Change num_group to unsigned intH.J. Lu2020-05-082-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) (cherry picked from commit a560c29ca5a6eeb7f84452f781f838ab35fd844b)
* gas, arm: Fix bad backportAndre Vieira2020-05-081-1/+0
| | | | | | This patch fixes the backport for PR25660 as it contained bad context. (cherry picked from commit 3ca4cd1ebde8ba6ce124a4debb977b041dfb56ba)
* gas, arm: PR25660L Fix vadd/vsub with lt and le condition codes for MVEAndre Vieira2020-05-088-3/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (cherry picked from commit b3174859c4b609242effbff5901c01935003537a)
* powerpc64-ld infinite loopAlan Modra2020-05-082-1/+5
| | | | | | | | | | | | 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) (cherry picked from commit de9c1b7cfe6e57ea8b677dc2de06e83de50f47c2)
* Automatic date update in version.ingentoo/binutils-2.34-2GDB Administrator2020-02-291-1/+1
|
* Adjust PR25355 testcaseAlan Modra2020-02-292-2/+8
| | | | | | * testsuite/ld-plugin/pr25355.d: Allow alpha-linux nm result. (cherry picked from commit 2e3cd5d013cee36c5bc26c0468d471878300ed22)
* Re: PR24511, nm should not mark symbols in .init_array as "t"Alan Modra2020-02-292-2/+8
| | | | | | PR 24511 * syms.c (bfd_decode_symclass): Reverse order of coff_section_type and decode_section_type calls.
* Automatic date update in version.inGDB Administrator2020-02-291-1/+1
|
* Don't call lto-wrapper for ar and ranlibH.J. Lu2020-02-296-11/+33
| | | | | | | | | | | | | | | | | | | | | | | 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)
* Automatic date update in version.inGDB Administrator2020-02-291-1/+1
|
* PR25585, PHDR segment not covered by LOAD segmentAlan Modra2020-02-294-1/+23
| | | | | | | | | | | | | | | | | 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)
* Automatic date update in version.inGDB Administrator2020-02-291-1/+1
|
* plugin: Call dlclose before return in try_load_pluginH.J. Lu2020-02-292-21/+24
| | | | | | | | | | | 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)
* Automatic date update in version.inGDB Administrator2020-02-291-1/+1
|
* Import fixes for using the LTO plugin with nm.Nick Clifton2020-02-2911-73/+634
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Automatic date update in version.inGDB Administrator2020-02-291-1/+1
|
* Import a fix from the mainline sources that prevents a potential illegal ↵Nick Clifton2020-02-292-2/+13
| | | | | | | | | 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.
* Fix building elf43-msp430.c on a 32-bit host.Nick Clifton2020-02-292-20/+36
| | | | | | | | * 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.
* Automatic date update in version.inGDB Administrator2020-02-291-1/+1
|
* MSP430: Enable relaxation of jump instructions to hard-coded pcrel offsetsJozef Lawrynowicz2020-02-292-11/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* MSP430: Enable relaxation of relocs in JMP instructionsJozef Lawrynowicz2020-02-292-30/+74
| | | | | | | | | | | | | | | | | | 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)
* MSP430: Add printf statements to assist with debugging during relaxationJozef Lawrynowicz2020-02-292-5/+100
| | | | | | | | | | | | | | 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)
* x86: Accept Intel64 only instruction by defaultH.J. Lu2020-02-2910-3953/+4019
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)