Commit Graph

15417 Commits

Author SHA1 Message Date
Stafford Horne 09f7b0de53 or1k: Fix incorrect value in PLT GOT entries, causing infinite loop
The PLT GOT entry should point to the first PLT entry which contains the
runtime linker function.  It was pointing back to the symbol PLT entry
causing an infinite loop.

I found this when testing the OpenRISC glibc port which uses the runtime
dynamic linker.  It seems other libc's we use so far have not been
making use of the initial PLT GOT entries.

bfd/ChangeLog:

	* elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Use correct value for
	PLT GOT entries.
2019-08-23 22:25:55 +09:00
Nick Clifton a7ba389645 Stop the BFD library from failing when encountering a second set of relocs for the same section.
PR 24456
	* elf.c (bfd_section_from_shdr): Issue an informative warning
	message and continue processing other sections after encountering
	a reloc section for a section which already has other relocs
	associated with it.
2019-08-23 13:22:02 +01:00
Alan Modra 2600d80ccd PR24933, Memory leak in elf_x86_64_get_synthetic_symtab
PR 24933
	* elfxx-x86.c (_bfd_x86_elf_get_synthetic_symtab): Don't exit
	on error without freeing plts[] contents.
2019-08-23 19:29:51 +09:30
GDB Administrator 1aa7f807d2 Automatic date update in version.in 2019-08-23 00:00:29 +00:00
Dennis Zhang 0535e5d74d Arm: Add support for missing CPUs
This patch adds support for following CPUs:
Cortex-M35P, Cortex-A77, Cortex-A76AE.

Related specifications can be found at https://developer.arm.com/ip-products/processors.

gas/ChangeLog:

	* config/tc-arm.c: New entries for Cortex-M35P, Cortex-A77,
	and Cortex-A76AE.
	* doc/c-arm.texi: Document new processors.
	* testsuite/gas/arm/cpu-cortex-a76ae.d: New test.
	* testsuite/gas/arm/cpu-cortex-a77.d: New test.
	* testsuite/gas/arm/cpu-cortex-m35p.d: New test.

bfd/ChangeLog:

	* cpu-arm.c: New entries for Cortex-M35P, Cortex-A77, Cortex-A76AE.
2019-08-22 15:35:43 +01:00
Nick Clifton 03da31c676 Fix an illegal memory access when dumping corrupt x86_64 PE unwind data.
PR 24922
	* pei-x86_64.c (pex64_xdata_print_uwd_codes): Add checks before
	reading data from extra records.
2019-08-22 14:37:03 +01:00
Tamar Christina 652afeef24 AArch64: Fix LD crash on weak and undefined TLS symbols. (PR/24602).
This patch fixes a few linker crashes due to TLS code reaching an assert when it
shouldn't.

The first scenario is with weak TLS symbols that remain weak during linking.  In
this case the mid-end would not have seen a TLS symbol and so wouldn't have
allocated the TLS section.  We currently assert here and the linker crashes with
a not very useful message.

This patch changes this to return the value 0 for the TLS symbol in question
emulating what lld and gold and other BFD targets do.  However because weak TLS
is implementation defined and we don't define any behavior for it I also emit a
warning to the user to inform them of such.

Secondly when a strong TLS reference is undefined. The linker crashes even after
it correctly reported that there is an undefined reference.  This changes it so
that it gracefully exits and reports a useful error.

bfd/ChangeLog:

	PR ld/24601
	* elfnn-aarch64.c (aarch64_relocate): Handle weak TLS and undefined TLS.
	Also Pass input_bfd to _bfd_aarch64_elf_resolve_relocation.
	* elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Use it.
	* elfxx-aarch64.h (_bfd_aarch64_elf_resolve_relocation): Emit warning
	for weak TLS.

ld/ChangeLog:

	PR ld/24601
	* testsuite/ld-aarch64/aarch64-elf.exp (undef-tls, weak-tls): New.
	* testsuite/ld-aarch64/undef-tls.d: New test.
	* testsuite/ld-aarch64/undef-tls.s: New test.
	* testsuite/ld-aarch64/weak-tls.d: New test.
	* testsuite/ld-aarch64/weak-tls.s: New test.
2019-08-22 11:43:15 +01:00
Alan Modra baf46cd780 ARM CMSE symbols
This patch removes use of st_target_internal to cache the result of
comparing symbol names against CMSE_PREFIX.  The problem with setting
a bit in st_target_internal in swap_symbol_in is that calling
bfd_elf_sym_name from swap_symbol_in requires symtab_hdr, and you
don't know for sure whether swap_symbol_in is operating on dynsyms
(and thus elf_tdata (abfd)->dynsymtab_hdr should be used) or on the
normal symtab (thus elf_tdata (abfd)->symtab_hdr).  You can make an
educated guess based on abfd->flags & DYNAMIC but that relies on
knowing a lot about calls to bfd_elf_get_elf_syms, and is fragile in
the face of possible future changes.

include/
	* elf/arm.h (ARM_GET_SYM_CMSE_SPCL, ARM_SET_SYM_CMSE_SPCL): Delete.
bfd/
	* elf32-arm.c (cmse_scan): Don't use ARM_GET_SYM_CMSE_SPCL,
	instead recognize CMSE_PREFIX in symbol name.
	(elf32_arm_gc_mark_extra_sections): Likewise.
	(elf32_arm_filter_cmse_symbols): Don't test ARM_GET_SYM_CMSE_SPCL.
	(elf32_arm_swap_symbol_in): Don't invoke ARM_SET_SYM_CMSE_SPCL.
2019-08-22 14:14:23 +09:30
GDB Administrator 65d20a7403 Automatic date update in version.in 2019-08-22 00:00:24 +00:00
GDB Administrator b068c22c2a Automatic date update in version.in 2019-08-21 00:00:19 +00:00
Dennis Zhang 546053acfa Adds support for following CPUs to the ARM and Aarch64 assemblers: Cortex-A77, Cortex-A76AE, Cortex-A34, Cortex-A65, and Cortex-A65AE.
Related specifications can be found at
https://developer.arm.com/ip-products/processors.

gas	* NEWS: Mention the Arm and AArch64 new processors.
	* config/tc-aarch64.c: New entries for Cortex-A34, Cortex-A65,
	Cortex-A77, cortex-A65AE, and Cortex-A76AE.
	* doc/c-aarch64.texi: Document new CPUs.
	* testsuite/gas/aarch64/cpu-cortex-a34.d: New test.
	* testsuite/gas/aarch64/cpu-cortex-a65.d: New test.
	* testsuite/gas/aarch64/cpu-cortex-a65ae.d: New test.
	* testsuite/gas/aarch64/cpu-cortex-a76ae.d: New test.
	* testsuite/gas/aarch64/cpu-cortex-a77.d: New test.
	* testsuite/gas/aarch64/nop-asm.s: New test.

bfd	* cpu-aarch64.c: New entries for Cortex-A34, Cortex-A65,
	 Cortex-A77, cortex-A65AE, and Cortex-A76AE.
2019-08-20 17:13:29 +01:00
Tamar Christina b4e87f2c1e Arm: Fix performance issue with thumb-2 tailcalls
We currently use a padding NOP after a Thumb to Arm interworking veneer (BX pc).
The NOP is never executed but may result in a performance penalty on some cores.

For this reason this patch changes the NOPs after Thumb to Arm veneers into B .-2
and adds a note to this in the source code for future reference.

bfd/ChangeLog:

	* elf32-arm.c (elf32_thumb2_plt_entry, elf32_arm_plt_thumb_stub,
	elf32_arm_stub_long_branch_v4t_thumb_thumb,
	elf32_arm_stub_long_branch_v4t_thumb_arm,
	elf32_arm_stub_short_branch_v4t_thumb_arm,
	elf32_arm_stub_long_branch_v4t_thumb_arm_pic,
	elf32_arm_stub_long_branch_v4t_thumb_thumb_pic,
	elf32_arm_stub_long_branch_v4t_thumb_tls_pic): Change nop to branch to
	previous instruction.

ld/ChangeLog:

	* testsuite/ld-arm/cortex-a8-fix-b-plt.d: Update Testcase.
	* testsuite/ld-arm/cortex-a8-fix-b-rel-arm.d: Likewise.
	* testsuite/ld-arm/cortex-a8-fix-bcc-plt.d: Likewise.
	* testsuite/ld-arm/farcall-cond-thumb-arm.d: Likewise.
	* testsuite/ld-arm/farcall-mixed-app.d: Likewise.
	* testsuite/ld-arm/farcall-mixed-app2.d: Likewise.
	* testsuite/ld-arm/farcall-mixed-lib-v4t.d: Likewise.
	* testsuite/ld-arm/farcall-thumb-arm-pic-veneer.d: Likewise.
	* testsuite/ld-arm/farcall-thumb-arm-short.d: Likewise.
	* testsuite/ld-arm/farcall-thumb-arm.d: Likewise.
	* testsuite/ld-arm/farcall-thumb-thumb-pic-veneer.d: Likewise.
	* testsuite/ld-arm/farcall-thumb-thumb.d: Likewise.
	* testsuite/ld-arm/fix-arm1176-on.d: Likewise.
	* testsuite/ld-arm/ifunc-10.dd: Likewise.
	* testsuite/ld-arm/ifunc-2.dd: Likewise.
	* testsuite/ld-arm/ifunc-4.dd: Likewise.
	* testsuite/ld-arm/ifunc-6.dd: Likewise.
	* testsuite/ld-arm/ifunc-8.dd: Likewise.
	* testsuite/ld-arm/jump-reloc-veneers-long.d: Likewise.
	* testsuite/ld-arm/mixed-app.d: Likewise.
	* testsuite/ld-arm/thumb2-b-interwork.d: Likewise.
	* testsuite/ld-arm/tls-longplt.d: Likewise.
	* testsuite/ld-arm/tls-thumb1.d: Likewise.
2019-08-20 16:35:28 +01:00
GDB Administrator ac533243be Automatic date update in version.in 2019-08-20 00:00:27 +00:00
Tom Tromey 3eb185c97d Fix N^2 behavior in _bfd_dwarf2_find_symbol_bias
A customer reported a case where addr2line was very slow.  We tracked
this down to some N^2 behavior in _bfd_dwarf2_find_symbol_bias in the
unusual case where no function can be found.

This patch fixes the bug, and reduces the runtime for a particular
request from 127 seconds to 1 second.

bfd/ChangeLog
2019-08-19  Tom Tromey  <tromey@adacore.com>

	* dwarf2.c (_bfd_dwarf2_find_symbol_bias): Create hash table
	holding symbols.
2019-08-19 08:46:21 -06:00
Alan Modra 903b777dde PowerPC64 ha/lo insn checks
These are done in ppc64_elf_edit_toc, which now also garbage collects
unused GOT entries.  The checks for legitimate instructions weren't
being done for the GOT relocs, unless the file also happened to have a
toc section.

	* elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename has_gotrel
	to has_optrel.
	(struct _ppc64_elf_section_data): Likewise.
	(ppc64_elf_check_relocs): Set has_optrel for more relocs.
	(ppc64_elf_edit_toc): Do ha/lo insn checks in GOT loop rather
	than TOC loop.  Check PLT16 insns too.
2019-08-19 20:38:51 +09:30
GDB Administrator 2c115c4f3c Automatic date update in version.in 2019-08-19 00:00:34 +00:00
GDB Administrator b271c8567a Automatic date update in version.in 2019-08-18 00:01:39 +00:00
GDB Administrator 98ac8787e9 Automatic date update in version.in 2019-08-17 00:00:22 +00:00
H.J. Lu 81e8046dc0 x86-64: Move PIC check for PC-relative relocations back
commit 83924b3846
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Feb 5 18:45:23 2019 -0800

    x86-64: Restore PIC check for PCREL reloc against protected symbol

moved PIC check for PC-relative relocations to elf_x86_64_check_relocs.
Since linker defined symbols may not be processed at the time, we need
to move the check back to elf_x86_64_relocate_section.

bfd/

	PR ld/24905
	* elf64-x86-64.c (elf_x86_64_check_relocs): Move PIC check for
	PC-relative relocations back to ...
	(elf_x86_64_relocate_section): Here.

ld/

	PR ld/24905
	* testsuite/ld-x86-64/pr24905-x32.d: New file.
	* testsuite/ld-x86-64/pr24905.d: Likewise.
	* testsuite/ld-x86-64/pr24905.s: Likewise.
	* testsuite/ld-x86-64/pr24905.t: Likewise.
	* testsuite/ld-x86-64/x86-64.exp: Run pr24905 and pr24905-x32.
2019-08-16 14:25:58 -07:00
Martin Liska b4c555cfc4
Fix detection of missing plugin for LTO objects.
2019-08-16  Martin Liska  <mliska@suse.cz>

	PR ld/24912
	* elflink.c: Report error only for not relocatable.
	* linker.c (_bfd_generic_link_add_one_symbol): Do not handle
	here lto_slim_object as it's handled in caller.
2019-08-16  Martin Liska  <mliska@suse.cz>

	PR ld/24912
	* object.cc (big_endian>::do_layout): Do not report error,
	but only set a flag.
	(big_endian>::do_add_symbols): Report error only for when
	relocatable.
2019-08-16 13:14:36 +02:00
Alan Modra 63f6e94fb3 Aligned vs. unaligned ppc32 relocs
Given R_PPC_ADDR32 or R_PPC_UADDR32 relocs, this patch generates
R_PPC_ADDR32 or R_PPC_UADDR32 dynamic relocs from either type
depending on whether r_offset is 4-byte aligned, and similarly for
R_PPC_ADDR16/R_PPC_UADDR16.

	* elf32-ppc.c (ppc_elf_relocate_section): Optimize unaligned relocs.
2019-08-16 13:37:54 +09:30
GDB Administrator 3339426357 Automatic date update in version.in 2019-08-16 00:00:20 +00:00
Jim Wilson 080a488354 RISC-V: Fix lui relaxation issue with code at address 0.
This fixes a problem originally reported at
    https://github.com/riscv/riscv-binutils-gdb/issues/173

If you have code linked at address zero, you can have a lui instruction
loading a value 0x800 which gets relaxed to a c.lui which is valid (c.lui 0x1
followed by addi -0x800).  Relaxation can reduce the value below 0x800 at which
point the c.lui 0x0 is no longer valid.  We can fix this by converting the
c.lui to a c.li which can load 0.

	bfd/
	* elfnn-riscv.c (perform_relocation) <R_RISCV_RVC_LUI>: If
	RISCV_CONST_HIGH_PART (value) is zero, then convert c.lui instruction
	to c.li instruction, and use ENCODE_RVC_IMM to set value.

	ld/
	* testsuite/ld-riscv-elf/c-lui-2.d: New.
	* testsuite/ld-riscv-elf/c-lui-2.ld: New.
	* testsuite/ld-riscv-elf/c-lui-2.s: New.
	* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Run the c-lui-2 test.
2019-08-15 12:01:13 -07:00
Tom Tromey 05192282ca Fix CU overrun in scan_unit_for_symbols
A customer program had a DWARF CU that consisted of just a CU DIE,
without any children.  In this situation, scan_unit_for_symbols will
try to read past the end of the current CU, and will take use the
first bytes of the next CU as an abbrev, printing an error message.

This patch fixes the bug by changing scan_unit_for_symbols to stop at
the end of the CU rather than the end of the .debug_info section.

bfd/ChangeLog
2019-08-15  Tom Tromey  <tromey@adacore.com>

	* dwarf2.c (scan_unit_for_symbols): Check for end of CU, not end
	of section.
2019-08-15 07:37:31 -06:00
GDB Administrator fc9e754460 Automatic date update in version.in 2019-08-15 00:00:21 +00:00
Alan Modra dfc19da6a6 PR24623, DWARF errors
PR 24623
	* dwarf2.c (stash_comp_unit): New function, extracted from..
	(_bfd_dwarf2_find_nearest_line): ..here.
	(find_abstract_instance): Parse comp units and decode line info
	as needed.
2019-08-14 12:43:25 +09:30
Alan Modra c327a44f38 Use comp_unit_maybe_decode_line_info in more places
* dwarf2.c (comp_unit_maybe_decode_line_info): Declare.
	(comp_unit_find_nearest_line): Use it here..
	(_bfd_dwarf2_find_symbol_bias): ..and here.
2019-08-14 11:26:48 +09:30
Alan Modra 9defd221fe Remove _bfd_dwarf2_find_nearest_line addr_size parameter
This parameter might appear to be used to set up offset_size, but
since git commit 024b2372f5 offset_size is either set from the
debug_info data or is set to 4.

	* dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove addr_size parameter.
	* libbfd-in.h  (_bfd_dwarf2_find_nearest_line): Update prototype.
	* coffgen.c (coff_find_nearest_line_with_names): Adjust
	_bfd_dwarf2_find_nearest_line calls.
	* elf.c (_bfd_elf_find_nearest_line, _bfd_elf_find_line): Likewise.
	* elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
	* elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
	* elfnn-aarch64.c (elfNN_aarch64_find_nearest_line): Likewise.
	* elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
	* mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
	* libbfd.h: Regenerate.
2019-08-14 11:23:18 +09:30
GDB Administrator 414b840430 Automatic date update in version.in 2019-08-14 00:00:22 +00:00
GDB Administrator 5067f530c3 Automatic date update in version.in 2019-08-13 00:00:26 +00:00
GDB Administrator b32b0a69fd Automatic date update in version.in 2019-08-12 00:00:22 +00:00
GDB Administrator acdb5f3476 Automatic date update in version.in 2019-08-11 00:00:54 +00:00
GDB Administrator 8be90e9631 Automatic date update in version.in 2019-08-10 00:00:29 +00:00
Mihailo Stojanovic f16a9783c5 Add support for a MIPS specific .MIPS.xhash section.
This patch is a reimplementation of [1] which was submitted in 2015 by
Neil Schellenberger. Copyright issue was sorted out [2] last year.
It proposed a new section (.gnu.xhash) and related dynamic tag
(DT_GNU_XHASH). The new section would be virtually identical to the
existing .gnu.hash except for the translation table (xlat) which would
contain correct MIPS .dynsym indexes corresponding to the hashvals in
chains. This is because MIPS ABI imposes a different ordering on the
dynsyms than the one expected by the .gnu.hash section. Another addition
would be a leading word (ngnusyms) which would contain the number of
entries in the translation table.

  In this patch, the new section name and dynamic tag are changed to
reflect the fact that the section should be treated as MIPS-specific
(.MIPS.xhash and DT_MIPS_XHASH).

  This patch addresses the alignment issue as reported in [3], which is
caused by the leading word added to the .MIPS.xhash section. Leading word
is removed in this patch, and the number of entries in the translation
table is now calculated using DT_MIPS_SYMTABNO dynamic tag (this is
addressed by the corresponding glibc patch).

  Suggestions on coding style in [4] were taken into account. Existing
GNU hash testcase was covered, and another one was added in the MIPS
part of the testsuite.

  The other major change is reserving MIPS ABI version 5 for .MIPS.xhash,
marking the need of support for .MIPS.xhash in the dynamic linker (again,
addressed in the corresponding glibc patch). This is something which I
am not sure of, especially after reading [5]. I am confused on whether
this ABI version is reserved for IFUNC, or it can be used for this
purpose.

Already mentioned glibc patch is submitted at:
https://sourceware.org/ml/libc-alpha/2019-06/msg00456.html

[1] https://sourceware.org/ml/binutils/2015-10/msg00057.html
[2] https://sourceware.org/ml/binutils/2018-03/msg00025.html
[3] https://sourceware.org/ml/binutils/2016-01/msg00006.html
[4] https://sourceware.org/ml/binutils/2016-02/msg00097.html
[5] https://sourceware.org/ml/libc-alpha/2016-12/msg00853.html

ld      * emulparams/elf32bmip.sh: Add .MIPS.xhash section.
        * emulparams/elf32bmipn32-defs.sh: Add .MIPS.xhash section.
        * emulparams/elf64bmip-defs.sh: Add .MIPS.xhash section.
        * emultempl/mipself.em: Remove mips_after_parse function.
        * testsuite/ld-elf/hash.d: Update comment.
        * testsuite/ld-mips-elf/hash1.d: New test.
        * testsuite/ld-mips-elf/hash1.s: Ditto.
        * testsuite/ld-mips-elf/hash1a.d: Remove.
        * testsuite/ld-mips-elf/hash1b.d: Ditto.
        * testsuite/ld-mips-elf/hash1c.d: Ditto
        * testsuite/ld-mips-elf/hash2.d: New test.
        * testsuite/ld-mips-elf/mips-elf.exp: New tests.
        * testsuite/ld-mips-elf/start.s: New test.

bfd     * elf-bfd.h (struct elf_backend_data): New members.
        * elflink.c (_bfd_elf_link_create_dynamic_sections): Create
        .gnu.hash section if necessary.
        (struct collect_gnu_hash_codes): New member.
        (elf_gnu_hash_process_symidx): New function name.
        (elf_renumber_gnu_hash_syms): Ignore local and undefined
        symbols. Record xlat location for every symbol which should have
        a .MIPS.xhash entry.
        (bfd_elf_size_dynamic_sections): Add DT_GNU_HASH dynamic tag to
        dynamic section if necessary.
        (GNU_HASH_SECTION_NAME): New define.
        (bfd_elf_size_dynsym_hash_dynstr): Get .MIPS.xhash section.
        Update the section size info.
        * elfxx-mips.c (struct mips_elf_hash_sort_data): New members.
        (struct mips_elf_link_hash_entry): New member.
        (mips_elf_link_hash_newfunc): Initialize .MIPS.xhash translation
        table location.
        (mips_elf_sort_hash_table): Initialize the pointer to the
        .MIPS.xhash section.
        (mips_elf_sort_hash_table_f): Populate the .MIPS.xhash
        translation table entry with the symbol dynindx.
        (_bfd_mips_elf_section_from_shdr): Add SHT_MIPS_XHASH.
        (_bfd_mips_elf_fake_sections): Initialize .MIPS.xhash section
        info.
        (_bfd_mips_elf_create_dynamic_sections): Create .MIPS.xhash
        section.
        (_bfd_mips_elf_size_dynamic_sections): Add DT_MIPS_XHASH tag to
        dynamic section.
        (_bfd_mips_elf_finish_synamic_sections): Add DT_MIPS_XHASH.
        (_bfd_mips_elf_final_write_processing): Set .MIPS.xhash section
        sh_link info.
        (_bfd_mips_elf_get_target_dtag): Get DT_MIPS_XHASH tag.
        (MIPS_LIBC_ABI_XHASH): New ABI version enum value.
        (_bfd_mips_post_process_headers): Mark the ABI version as
        MIPS_LIBC_ABI_XHASH if there exists a .MIPS.xhash section,
        but not a .hash section.
        (_bfd_mips_elf_record_xhash_symbol): New function. Record a
        position in the translation table, associated with the hash
        entry.
        * elfxx-mips.h (literal_reloc_p): Define
        elf_backend_record_xhash_symbol backend hook.
        * elfxx-target.h: Initialize elf_backend_record_xhash_symbol
        backend hook.

include * elf/mips.h (SHT_GNU_XHASH): New define.
        (DT_GNU_XHASH): New define.

binutils * readelf.c (get_mips_dynamic_type): Return MIPS_XHASH dynamic type.
        (get_mips_section_type_name): Return MI{S_XHASH name string.
        (dynamic_section_mips_val): Initialize the .MIPS.xhash dynamic
        info.
        (process_symbol_table): Initialize the .MIPS.xhash section
        pointer. Adjust the readelf output to support the new section.
        (process_object): Set the .MIPS.xhash dynamic info to zero.
2019-08-09 11:06:37 +01:00
GDB Administrator 378646f7a4 Automatic date update in version.in 2019-08-09 00:00:09 +00:00
GDB Administrator b1791af06e Automatic date update in version.in 2019-08-08 00:00:22 +00:00
Jose E. Marchesi fc8de8e227 bfd: use the ELF linker to perform relocations in BPF targets
This patch changes the eBPF linker to provide a relocate_section
function instead of relying on using special functions in relocation
howtos.

Tested in x86_64 host.
No regressions.

bfd/ChangeLog:

2019-08-07  Jose E. Marchesi  <jose.marchesi@oracle.com>

	* elf64-bpf.c (bpf_elf_relocate_section): New function.
	(bpf_elf_insn_disp_reloc): Delete function.
	(elf_backend_relocate_section): Define.
2019-08-07 13:57:30 +02:00
Alan Modra 97b031c5d6 PR24644, OOM-Bug in _bfd_archive_64_bit_slurp_armap
PR 24644
	* archive64.c (_bfd_archive_64_bit_slurp_armap): Properly check
	for overflow in expressions involving nsymz.
2019-08-07 19:01:17 +09:30
GDB Administrator b3c6d7ff98 Automatic date update in version.in 2019-08-07 00:00:50 +00:00
GDB Administrator b39152b3e5 Automatic date update in version.in 2019-08-06 00:00:18 +00:00
GDB Administrator 188a63736c Automatic date update in version.in 2019-08-05 00:00:29 +00:00
GDB Administrator 0b3303472d Automatic date update in version.in 2019-08-04 00:01:03 +00:00
GDB Administrator 6d6231ed58 Automatic date update in version.in 2019-08-03 00:00:16 +00:00
GDB Administrator 371367a950 Automatic date update in version.in 2019-08-02 00:00:28 +00:00
Jim Wilson 0f52d45acd RISC-V: Fix lui relax failure with relro.
bfd/ChangeLog
	Ilia Diachkov  <ilia.diachkov@optimitech.com>
	* elfnn-riscv.c (_bfd_riscv_relax_lui): Set lui relax safety area to
	two pages in relro presence.
2019-08-01 16:40:15 -07:00
Max Filippov e0d0c518da xtensa: bfd: add special case to loop alignment check
check_loop_aligned is used during link time relaxation to only allow
transformations that don't violate loop body alignment requirements.
Assembler can relax loops that have too long body by adding instructions
between the loop instruction and the loop body. check_loop_aligned must
check alignment of the first instruction of the actual loop body.
Detect loop / rsr.lend / wsr.lbeg sequence used in assembly time
relaxation and adjust alignment check when it's detected.

bfd/
2019-08-01  Max Filippov  <jcmvbkbc@gmail.com>

	* elf32-xtensa.c (insn_num_slots, get_rsr_lend_opcode)
	(get_wsr_lbeg_opcode): New functions.
	(check_loop_aligned): Detect relaxed loops and adjust loop_len
	and insn_len for the first actual instruction of the loop.
2019-08-01 11:18:52 -07:00
GDB Administrator 52b5a0c663 Automatic date update in version.in 2019-08-01 00:00:29 +00:00
GDB Administrator 0630887d4e Automatic date update in version.in 2019-07-31 00:00:21 +00:00
Alan Modra 34d5c40a07 Re: Support .gnu.lto_.lto section in ELF files
PR 24768
	* bfd.c (struct bfd): Add lto_slim_object flag.
	* bfd-in2.h: Regenerate.
2019-07-30 13:17:16 +09:30
GDB Administrator e48de49be5 Automatic date update in version.in 2019-07-30 00:00:19 +00:00