summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge with binutils-2_27-branch rev b5d3ac20users/linaro/binutils-2_27-branchAdhemerval Zanella2017-08-2154-390/+2014
|\ | | | | | | Change-Id: Iaa5f379bb904c3eb5b6e041c62c24076d2838063
| * Update -maltivec and -mvsx options to only enable their oldest instructions.binutils-2_27-branchPeter Bergner2017-03-094-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the -maltivec and -mvsx GAS options enable *all* of the altivec and vsx instructions respecitively that have ever been added. This is in constract to GCC's -maltivec and -mvsx options, which only enable the oldest (ie, first) set of altivec and vsx instructions. This patch changes GAS to mimic GCC's behaviour with respect to -maltivec and -mvsx and it solves a problem with trying to assemble the lxvx instruction which is different between POWER8 and POWER9. opcodes/ * ppc-dis.c (ppc_opts) <altivec>: Do not use PPC_OPCODE_ALTIVEC2; <vsx>: Do not use PPC_OPCODE_VSX3; gas/ * testsuite/gas/ppc/altivec2.d (as): Use the -mpower8 option. (objdump): Use the -Mpower8 option.
| * PowerPC .gnu.attributesAlan Modra2017-03-0928-171/+269
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch extends Tag_GNU_Power_ABI_FP to cover long double ABIs, makes the assembler warn about undefined tag values, and removes similar warnings from the linker. I think it is better to not warn in the linker about undefined tag values as future extensions to the tags then won't result in likely bogus warnings. This is consistent with the fact that an older linker won't warn on an entirely new tag. include/ * elf/ppc.h (Tag_GNU_Power_ABI_FP): Comment. bfd/ * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Declare. * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): New function. (ppc_elf_merge_obj_attributes): Use it. Don't copy first file attributes, merge them. Don't warn about undefined tag bits, or copy unknown values to output. * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Call _bfd_elf_ppc_merge_fp_attributes. binutils/ * readelf.c (display_power_gnu_attribute): Catch truncated section for all powerpc attributes. Display long double ABI. Don't capitalize words, except for names. Show known bits of tag values when some unknown bits are present. Whitespace fixes. gas/ * config/tc-ppc.c (ppc_elf_gnu_attribute): New function. (md_pseudo_table <ELF>): Handle "gnu_attribute". ld/ * testsuite/ld-powerpc/attr-gnu-4-4.s: Delete. * testsuite/ld-powerpc/attr-gnu-4-14.d: Delete. * testsuite/ld-powerpc/attr-gnu-4-24.d: Delete. * testsuite/ld-powerpc/attr-gnu-4-34.d: Delete. * testsuite/ld-powerpc/attr-gnu-4-41.d: Delete. * testsuite/ld-powerpc/attr-gnu-4-32.d: Adjust expected warning. * testsuite/ld-powerpc/attr-gnu-8-23.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-01.d: Adjust expected output. * testsuite/ld-powerpc/attr-gnu-4-02.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-03.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-10.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-11.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-20.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-22.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-33.d: Likewise. * testsuite/ld-powerpc/attr-gnu-8-11.d: Likewise. * testsuite/ld-powerpc/powerpc.exp: Don't run deleted tests.
| * Add support for the new 'lnia' extended mnemonic.Peter Bergner2017-03-085-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | opcodes/ Apply from master. 2017-03-08 Peter Bergner <bergner@vnet.ibm.com> * ppc-opc.c (powerpc_opcodes) <lnia>: New extended mnemonic. gas/ Apply from master. 2017-03-08 Peter Bergner <bergner@vnet.ibm.com> * testsuite/gas/ppc/power9.d <lnia> New test. * testsuite/gas/ppc/power9.s: Likewise.
| * Backport addition of scv and rfscv P9 instructions.Peter Bergner2017-02-285-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | opcodes/ Apply from master. 2017-02-10 Nicholas Piggin <npiggin@gmail.com> * ppc-opc.c (powerpc_opcodes) <scv, rfscv>: New mnemonics. gas/ Apply from master. 2017-02-10 Nicholas Piggin <npiggin@gmail.com> * testsuite/gas/ppc/power9.d <scv, rfscv>: New tests.
| * PowerPC ld segfault on script discarding dynamic sectionsAlan Modra2017-02-225-14/+32
| | | | | | | | | | | | | | | | | | | | | | | | bfd/ * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault on .got or .plt output section being discarded by script. * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move vxworks splt temp. gold/ * powerpc.cc (Target_powerpc::make_iplt_section): Check that output_section exists before attempting add_output_section_data. (Target_powerpc::make_brlt_section): Likewise.
| * [GOLD] PowerPC64 TOC indirect to TOC relative segfaultAlan Modra2017-02-222-0/+10
| | | | | | | | | | * powerpc.cc (Powerpc_relobj::make_toc_relative): Don't crash when no .toc section exists.
| * Gold: Fix build with GCC 4.2H.J. Lu2017-02-222-1/+6
| | | | | | | | | | | | PR gold/21040 * powerpc.cc (Powerpc_relobj<size, big_endian>::make_toc_relative): Cast 0x80008000 to uint64_t.
| * [GOLD] PowerPC64 TOC indirect to TOC relative code editingAlan Modra2017-02-222-44/+536
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doesn't yet trim off the unused TOC entries. * powerpc.cc (class Powerpc_copy_relocs): New. (Powerpc_copy_relocs::emit): New function. (Powerpc_relobj::relatoc_, toc_, no_toc_opt_): New variables. (Powerpc_relobj::toc_shndx, set_no_toc_opt, no_toc_opt): New inlines. (Powerpc_relobj::do_relocate_sections): New function. (Powerpc_relobj::make_toc_relative): Likewise. (Powerpc_relobj::do_find_special_sections): Stash away .rela.toc and .toc too. (ok_lo_toc_insn): Move earlier, and handle more insns. (Target_powerpc::Scan::local): If optimizing toc accesses, set no_toc_opt for entries we can't edit. Check insn validity. Emit "toc optimization is not supported" warning, downgraded from error. (Target_powerpc::Scan::global): Likewise. (Target_powerpc::Relocate::relocate): Edit TOC indirect code to TOC relative. Don't emit "toc optimization is not supported" error here.
| * Refactor Sized_relobj_file::do_relocate_sections.Cary Coutant2017-02-225-9/+92
| | | | | | | | | | | | | | | | | | | | | | gold/ * aarch64.cc (AArch64_relobj::do_relocate_sections): Call Sized_relobj_file::relocate_section_range(). * arm.cc (Arm_relobj::do_relocate_sections): Likewise. * object.h (Sized_relobj_file::relocate_section_range): New method. * reloc.cc (Sized_relobj_file::do_relocate_sections): Move implementation... (Sized_relobj_file::relocate_section_range): ...to new method.
| * [GOLD] Add --secure-plt option for ppc32Alan Modra2017-02-223-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added just to accept, and ignore. gcc since 2015-10-21, when configured with --enable-secureplt passes this option to the linker. As powerpc gold cannot link --bss-plt code successfully, gold needs to accept the option or the gcc specs file needs to be changed. The patch also make gold detect --bss-plt code and error out rather than producing a binary that crashes. * options.h: Add --secure-plt option. * powerpc.cc (Target_powerpc::Scan::local): Detect and error on -fPIC -mbss-plt code. (Target_powerpc::Scan::global): Likewise.
| * [GOLD] Set sh_info of .rela.plt for powerpcAlan Modra2017-02-222-0/+7
| | | | | | | | | | * powerpc.cc (Target_powerpc::make_plt_section): Point sh_info of ".rela.plt" at ".plt".
| * [GOLD] powerpc.cc tidiesAlan Modra2017-02-222-38/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | Plus some paranoia in symval_for_branch. We shouldn't get there with dynamic symbols, but if we ever did the static_cast to Powerpc_relobj would be wrong. * powerpc.cc: Use shorter equivalent elfcpp typedef for Reltype and reloc_size throughout. (Target_powerpc::symval_for_branch): Exclude dynamic symbols. (Target_powerpc::Scan::local): Use local var r_sym. (Target_powerpc::Scan::global: Likewise. (Target_powerpc::Relocate::relocate): Delete shadowing r_sym.
| * [GOLD] Don't assert in powerpc stub_tableAlan Modra2017-02-222-2/+6
| | | | | | | | | | | | | | | | A branch in a non-exec section that needs a stub can lead to this assertion. * powerpc.cc (Powerpc_relobj::stub_table): Return NULL rather then asserting.
| * [GOLD] fix typo in --stub-group-multi helpAlan Modra2017-02-222-1/+4
| | | | | | | | * options.h (--stub-group-multi): Fix typo.
| * [GOLD] PowerPC --stub-group-multiAlan Modra2017-02-223-19/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | Adds a new option, defaulting to off, that allows a group of stubs to serve multiple output sections. Prior to this patch powerpc gold allowed this unconditionally, which is a little unsafe with clever code that discards/reuses sections at runtime. * options.h (--stub-group-multi): New PowerPC option. * powerpc.cc (Stub_control): Add multi_os_ var and param to constructor. Sort start_ var later. Comment State. (Stub_control::can_add_to_stub_group): Heed multi_os_. (Target_powerpc::group_sections): Update.
| * [GOLD] powerpc64le-linux fails to link large Linux kernelAlan Modra2017-02-223-79/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gold attaches stubs to an existing section in contrast to ld.bfd which inserts a new section for stubs. If we want stubs before branches, then the stubs must be added to the previous section. Adding to the previous section is a disaster if there is a large gap between the previous section and the group. PR gold/20878 * powerpc.cc (Stub_control): Replace stubs_always_before_branch_ with stubs_always_after_branch_, group_end_addr_ with group_start_addr_. (Stub_control::can_add_to_stub_group): Rewrite to suit scanning sections by increasing address. (Target_powerpc::group_sections): Scan that way. Delete corner case. * options.h (--stub-group-size): Update help string.
| * [GOLD] PowerPC stub debugAlan Modra2017-02-222-11/+33
| | | | | | | | | | | | | | | | | | Some more debug output, and a little hardening. * powerpc.cc (Stub_table_owner): Provide constructor. (Powerpc_relobj::set_stub_table): Resize fill with -1. (Target_powerpc::Branch_info::make_stub): Provide target debug output on returning false.
| * Fix internal error when relaxing branches to STT_SECTION symbols.Cary Coutant2017-02-224-0/+13
| | | | | | | | | | | | | | | | | | gold/ PR gold/20807 * aarch64.cc (Target_aarch64::scan_reloc_section_for_stubs): Handle section symbols correctly. * arm.cc (Target_arm): Likewise. * powerpc.cc (Target_powerpc): Likewise.
| * [GOLD] Further tidy to powerpc can_add_to_stub_groupAlan Modra2017-02-222-19/+26
| | | | | | | | | | | | | | | | | | | | | | This patch adds a little more debug output, and replaces two variables with one, tracking current max group size by group_size_ rather than by has14_. * powerpc.cc (class Stub_control): Delete stub14_group_size_ and has14_. Add group_size_. (Stub_control::can_add_to_stub_group): Adjust to suit. Print debug info when switching to adding sections before stubs.
| * [GOLD] Add debug output for powerpc section groupingAlan Modra2017-02-223-3/+20
| | | | | | | | | | | | | | * debug.h (DEBUG_TARGET): New. (DEBUG_ALL): Add DEBUG_TARGET. (gold_debug): Delete FORMAT param. * powerpc.cc (Stub_control::can_add_to_stub_group): Print debug ourput.
| * [GOLD] correct grouping of stubsAlan Modra2017-02-222-33/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch rewrites the rather obscure can_add_to_stub_group, fixing a problem with the handling of sections containing conditional external branches. When a section group contains any such section, the group size needs to be limited to a much smaller size than groups with only non-conditional external branches. PR 20523 * powerpc.cc (class Stub_control): Add has14_. Comment owner_. (Stub_control::can_add_to_stub_group): Correct grouping of sections containing 14-bit external branches. When returning false, set state_ to reflect the fact that we have one section for the next group. Rewrite most of function for clarity. Add and expand comments. (Target_powerpc::do_relax): Print stub group size retry in hex.
| * PR gold/20529 - relaxing loop never ends.Han Shen2017-02-222-3/+36
| | | | | | | | | | | | | | | | | | * powerpc.cc (Stub_table::min_size_threshold_): New member to limit size. (Stub_table::set_min_size_threshold): New member function. (Stub_table::set_address_and_size): Add code to only allow size increase. (Target_powerpc::do_relax): Add code to record last size.
| * PowerPC64 toc optimisation for power9Alan Modra2017-02-219-9/+573
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recognize power9 and a few other insns from older machines. Fixes linker complaints like "toc optimization is not supported for 0xf4090002 instruction". 0xf4090002 is stxsd v0,0(r9) bfd/ * elf64-ppc.c (ok_lo_toc_insn): Add r_type param. Recognize lq,lfq,lxv,lxsd,lxssp,lfdp,stq,stfq,stxv,stxsd,stxssp,stfdp. Don't match lmd and stmd. ld/ * testsuite/ld-powerpc/tocopt7.s, * testsuite/ld-powerpc/tocopt7.out, * testsuite/ld-powerpc/tocopt7.d: New test. * testsuite/ld-powerpc/tocopt8.s, * testsuite/ld-powerpc/tocopt8.d: New test. * testsuite/ld-powerpc/powerpc.exp: Run them.
| * i386: Allow "lea foo@GOT, %reg" in PICH.J. Lu2017-02-156-4/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "lea foo@GOT, %reg" is OK in PIC since it only loads the GOT offset into register, which can be used later with a GOT base register to get the value in the GOT entry. (cherry picked from commit 2a5684011edabf5804abb9e11253a9747587b284) bfd/ PR ld/21168 * elf32-i386.c (elf_i386_relocate_section): Allow "lea foo@GOT, %reg" in PIC. ld/ PR ld/21168 * testsuite/ld-i386/i386.exp: Run pr21168. * testsuite/ld-i386/pr21168a.c: New file. * testsuite/ld-i386/pr21168b.S: Likewise.
| * Automatic date update in version.inGDB Administrator2016-12-291-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-281-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-271-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-261-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-251-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-241-1/+1
| |
| * MIPS/BFD: Remove EI_ABIVERSION 5 allocation for PT_GNU_STACK supportMaciej W. Rozycki2016-12-232-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Revert commit 17733f5be961 ("Increment the ABIVERSION to 5 for MIPS objects with non-executable stacks.") and remove EI_ABIVERSION 5 allocation for PT_GNU_STACK support, which has not made it to glibc and will be reassigned. bfd/ * bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Revert 2016-02-23 change and remove EI_ABIVERSION 5 support. (cherry picked from commit 4d4f40e041ce7c8c7c8e50f957e0440b64ab7e95)
| * Automatic date update in version.inGDB Administrator2016-12-231-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-221-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-211-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-201-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-191-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-181-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-171-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-161-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-151-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-141-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-131-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-121-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-111-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-101-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-091-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-081-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-071-1/+1
| |
| * Automatic date update in version.inGDB Administrator2016-12-061-1/+1
| |