]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
9 years agoAutomatic date update in version.in
GDB Administrator [Wed, 30 Mar 2016 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoPE/COFF regression in base of code and data calculation
Toni Spets [Tue, 29 Mar 2016 03:55:23 +0000 (14:25 +1030)] 
PE/COFF regression in base of code and data calculation

PR 19878
* coffcode.h (coff_write_object_contents): Revert accidental
2014-11-10 change.

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 29 Mar 2016 00:01:01 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 28 Mar 2016 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 27 Mar 2016 00:01:00 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 26 Mar 2016 00:01:05 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 25 Mar 2016 00:01:02 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Thu, 24 Mar 2016 00:01:15 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Wed, 23 Mar 2016 00:01:01 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 22 Mar 2016 00:01:17 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 21 Mar 2016 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 20 Mar 2016 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 19 Mar 2016 00:00:52 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 18 Mar 2016 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoBind defined symbol locally in PIE
H.J. Lu [Thu, 17 Mar 2016 17:48:03 +0000 (10:48 -0700)] 
Bind defined symbol locally in PIE

Symbols defined in PIE should be bound locally, the same as -shared
-Bsymbolic.

Backport from master

bfd/

PR ld/19827
* elf32-i386.c (elf_i386_check_relocs): Bind defined symbol
locally in PIE.
(elf_i386_relocate_section): Likewise.
* elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
(elf_x86_64_relocate_section): Likewise.

ld/

PR ld/19827
* testsuite/ld-i386/i386.exp: Run PR ld/19827 tests.
* testsuite/ld-x86-64/x86-64.exp: Likewise.
* testsuite/ld-i386/pr19827.rd: New file.
* testsuite/ld-i386/pr19827a.S: Likewise.
* testsuite/ld-i386/pr19827b.S: Likewise.
* testsuite/ld-x86-64/pr19827.rd: Likewise.
* testsuite/ld-x86-64/pr19827a.S: Likewise.
* testsuite/ld-x86-64/pr19827b.S: Likewise.

9 years agoAutomatic date update in version.in
GDB Administrator [Thu, 17 Mar 2016 00:01:01 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Wed, 16 Mar 2016 00:01:05 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoCheck reloc against IFUNC symbol only with dynamic symbols
H.J. Lu [Sat, 30 Jan 2016 22:11:03 +0000 (14:11 -0800)] 
Check reloc against IFUNC symbol only with dynamic symbols

There is no need to check relocation IFUNC symbol if there are no
dynamic symbols.

Backport from master

bfd/

PR ld/19539
* elf32-i386.c (elf_i386_reloc_type_class): Check relocation
against STT_GNU_IFUNC symbol only with dynamic symbols.
* elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.

ld/

PR ld/19539
* testsuite/ld-elf/pr19539.d: Skip cris*-*-* targets.

* testsuite/ld-elf/pr19539.d: New file.
* testsuite/ld-elf/pr19539.s: Likewise.
* testsuite/ld-elf/pr19539.t: Likewise.

9 years agoFix erroneous relocations applied to absolute symbols in COFF format targets.
Leon Winter [Tue, 15 Mar 2016 10:53:20 +0000 (10:53 +0000)] 
Fix erroneous relocations applied to absolute symbols in COFF format targets.

PR ld/19623
* cofflink.c (_bfd_coff_generic_relocate_section): Do not apply
relocations against absolute symbols.

9 years agoSet BFD_DECOMPRESS to decompress debug sections
H.J. Lu [Thu, 28 Jan 2016 21:29:53 +0000 (13:29 -0800)] 
Set BFD_DECOMPRESS to decompress debug sections

We should set BFD_DECOMPRESS to decompress debug sections when reading in
DWARF debug sections.

Backport from master

bfd/

PR binutils/19523
* dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to
decompress debug sections.

binutils/

PR binutils/19523
* Makefile.am (check-DEJAGNU): Pass CC and CC_FOR_BUILD to
runtest.
* Makefile.in: Regenerated.
* testsuite/binutils-all/compress.exp (test_gnu_debuglink): New
proc.
Run test_gnu_debuglink for native ELF build.

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 15 Mar 2016 00:01:06 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agold: relax alignment requirements of compressed .debug_* section checks
Jan Beulich [Mon, 7 Dec 2015 16:52:25 +0000 (17:52 +0100)] 
ld: relax alignment requirements of compressed .debug_* section checks

This fixes a failure of the gabinormal linking test on some distros
(where e.g. crt1.o has a .debug_aranges section with larger alignment).

Backport from master

* ld-elf/gabiend.rt: Accept any alignment.
* ld-elf/gabinormal.rt: Likewise.

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 14 Mar 2016 00:00:57 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 13 Mar 2016 00:01:00 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 12 Mar 2016 00:00:57 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 11 Mar 2016 00:01:02 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Thu, 10 Mar 2016 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoTreat common symbol in executable as definition
H.J. Lu [Wed, 9 Mar 2016 13:59:20 +0000 (05:59 -0800)] 
Treat common symbol in executable as definition

Common symbol in executable is a definition, which overrides definition
from shared objects.  When linker sees a new definition from a shared
object, the new dynamic definition should be overridden by the previous
common symbol in executable.

Backport from master

bfd/

PR ld/19579
* elflink.c (_bfd_elf_merge_symbol): Group common symbol checking
together.

* elflink.c (_bfd_elf_merge_symbol): Treat common symbol in
executable as definition if the new definition comes from a
shared library.

ld/

PR ld/19579
* testsuite/ld-elf/pr19579a.c: New file.
* testsuite/ld-elf/pr19579b.c: Likewise.
* testsuite/ld-elf/shared.exp: Run PR ld/19579 test.

9 years agoAllow zero length archive elements
Alan Modra [Wed, 9 Mar 2016 06:31:54 +0000 (17:01 +1030)] 
Allow zero length archive elements

bfd/
PR binutils/19775
* archive.c (bfd_generic_openr_next_archived_file): Allow zero
length elements in the archive.
* coff-alpha.c (alpha_ecoff_openr_next_archived_file): Likewise.

binutils/
PR binutils/19775
* testsuite/binutils-all/ar.exp (proc empty_archive): New proc.
Run the new proc.
* testsuite/binutils-all/empty: New, empty, file.

9 years agoAutomatic date update in version.in
GDB Administrator [Wed, 9 Mar 2016 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 8 Mar 2016 00:01:07 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 7 Mar 2016 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 6 Mar 2016 00:00:55 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 5 Mar 2016 00:00:48 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoSpeedup orphan placement for relocatable link
H.J. Lu [Mon, 29 Feb 2016 19:04:22 +0000 (11:04 -0800)] 
Speedup orphan placement for relocatable link

Since there is no need to place output sections in specific order for
relocatable link, we can skip merging flags of other input sections.

Backport from master

PR ld/19739
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
merge flags of other input sections for relocatable link.
* emultempl/mmo.em (mmo_place_orphan): Likewise.
* emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
* emultempl/pep.em (gld_${EMULATION_NAME}_place_orphan): Likewise.

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 4 Mar 2016 00:00:48 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Thu, 3 Mar 2016 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Wed, 2 Mar 2016 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoUpdate PR ld/12365 test for GCC 6
H.J. Lu [Tue, 1 Mar 2016 20:39:49 +0000 (12:39 -0800)] 
Update PR ld/12365 test for GCC 6

PR ld/12365 test is to verify that linker catches the reference to
undefined symbol error caused by a GCC bug.  Since the GCC bug has
been fixed in GCC 6, update the test to verify that there is no
reference to undefined symbol in executable

Backport from master

* testsuite/ld-plugin/lto.exp: Update PR ld/12365 test for GCC 6.

9 years agoFix formatting of coff-i386.c and coff-x86_64.c
Nick Clifton [Fri, 18 Dec 2015 08:49:02 +0000 (08:49 +0000)] 
Fix formatting of coff-i386.c and coff-x86_64.c

Backport from master

PR ld/19752
* coff-i386.c (coff_i386_reloc): Fix formatting.
* coff-x86_64.c (coff_amd64_reloc): Likewise.

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 1 Mar 2016 00:01:34 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 29 Feb 2016 00:02:00 +0000 (00:02 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 28 Feb 2016 00:01:43 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 27 Feb 2016 00:01:42 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoUpdate symbol version for symbol from linker script
H.J. Lu [Wed, 24 Feb 2016 23:13:35 +0000 (15:13 -0800)] 
Update symbol version for symbol from linker script

We need to update symbol version for symbols from linker script.

Backport from master

bfd/

PR ld/19698
* elflink.c (bfd_elf_record_link_assignment): Set versioned if
symbol version is unknown.

ld/

PR ld/19698
* testsuite/ld-elf/pr19698.d: New file.
* testsuite/ld-elf/pr19698.s: Likewise.
* testsuite/ld-elf/pr19698.t: Likewise.

9 years agoDon't add DT_NEEDED for unmatched symbol
H.J. Lu [Mon, 1 Feb 2016 23:49:52 +0000 (15:49 -0800)] 
Don't add DT_NEEDED for unmatched symbol

Don't add DT_NEEDED if a symbol from a library loaded via DT_NEEDED
doesn't match the symbol referenced by regular object.

Backport from master

bfd/

PR ld/19553
* elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
if a symbol from a library loaded via DT_NEEDED doesn't match
the symbol referenced by regular object.

ld/testsuite/

PR ld/19553
* testsuite/ld-elf/indirect.exp: Run tests for PR ld/19553.
* testsuite/ld-elf/pr19553.map: New file.
* testsuite/ld-elf/pr19553.map: Likewise.
* testsuite/ld-elf/pr19553a.c: Likewise.
* testsuite/ld-elf/pr19553b.c: Likewise.
* testsuite/ld-elf/pr19553b.out: Likewise.
* testsuite/ld-elf/pr19553c.c: Likewise.
* testsuite/ld-elf/pr19553c.out: Likewise.
* testsuite/ld-elf/pr19553d.c: Likewise.
* testsuite/ld-elf/pr19553d.out: Likewise.

9 years agoSet plt_got.offset to (bfd_vma) -1
H.J. Lu [Wed, 24 Feb 2016 13:42:27 +0000 (05:42 -0800)] 
Set plt_got.offset to (bfd_vma) -1

Since plt_got.offset may be updated in x86 allocate_dynrelocs, set
plt_got.offset to (bfd_vma) -1 when setting needs_plt to 0.

Backport from master

* elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset
to (bfd_vma) -1 when setting needs_plt to 0.
* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.

9 years agoFix powerpc64 -r --save-restore-funcs
Alan Modra [Fri, 26 Feb 2016 12:30:33 +0000 (23:00 +1030)] 
Fix powerpc64 -r --save-restore-funcs

* elf64-ppc.c (create_linkage_sections): Create sfpr when
save_restore_funcs, rest of sections when not relocatable.
(ppc64_elf_init_stub_bfd): Always call create_linkage_sections.
(sfpr_define): Define all symbols on emitted code.
(ppc64_elf_func_desc_adjust): Adjust for sfpr now being created
when relocatable.  Move sfpr_define loop earlier.

9 years agoEnable 2 operand form of powerpc mfcr with -many
Alan Modra [Fri, 26 Feb 2016 13:05:13 +0000 (23:35 +1030)] 
Enable 2 operand form of powerpc mfcr with -many

This is a workaround for a gcc bug.

PR 19359
* ppc-opc.c (insert_fxm): Remove "ignored" from error message.
(powerpc_opcodes): Remove single-operand mfcr.

9 years agoFix assorted ChangeLog errors
Alan Modra [Wed, 30 Dec 2015 04:37:49 +0000 (15:07 +1030)] 
Fix assorted ChangeLog errors

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 26 Feb 2016 00:01:49 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years ago[Backport][AArch64] Relax long branch veneer insertion for non STT_FUNC symbol
Jiong Wang [Thu, 25 Feb 2016 10:26:34 +0000 (10:26 +0000)] 
[Backport][AArch64] Relax long branch veneer insertion for non STT_FUNC symbol

2016-02-25  Jiong Wang  <jiong.wang@arm.com>

Backport from master
  bfd/
2016-01-21  Jiong Wang  <jiong.wang@arm.com>

* elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch
veneer for sym_sec != input_sec.
(elfNN_aarch64_size_stub): Support STT_SECTION symbol.
(elfNN_aarch64_final_link_relocate): Take rela addend into account when
calculation destination.
  ld/
* testsuite/ld-aarch64/farcall-section.d: Delete.
* testsuite/ld-aarch64/farcall-section.s: Delete.
* testsuite/ld-aarch64/farcall-b-section.d: New expectation file.
* testsuite/ld-aarch64/farcall-bl-section.d: Likewise.
* testsuite/ld-aarch64/farcall-b-section.s: New testcase.
* testsuite/ld-aarch64/farcall-bl-section.s: Likewise.
* testsuite/ld-aarch64/aarch64-elf.exp: Likewise.

9 years agoAutomatic date update in version.in
GDB Administrator [Thu, 25 Feb 2016 00:01:42 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Wed, 24 Feb 2016 00:01:42 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 23 Feb 2016 00:01:46 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 22 Feb 2016 00:00:55 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 21 Feb 2016 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years ago[i386] Check RegVRex in register_number
H.J. Lu [Sat, 20 Feb 2016 17:23:20 +0000 (09:23 -0800)] 
[i386] Check RegVRex in register_number

Increment register number by 16 if RegVRex is set.

Backport from master

* config/tc-i386.c (register_number): Check RegVRex.
* testsuite/gas/i386/x86-64-avx512f.s: Add a test for vgatherqpd
with %zmm19 and %zmm3.
* testsuite/gas/i386/x86-64-avx512f-intel.d: Updated.
* testsuite/gas/i386/x86-64-avx512f.d: Likewise.

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 20 Feb 2016 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 19 Feb 2016 00:01:00 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Thu, 18 Feb 2016 00:01:00 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Wed, 17 Feb 2016 00:00:57 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAdd parentheses to prevent truncated addresses
H.J. Lu [Mon, 15 Feb 2016 23:58:42 +0000 (15:58 -0800)] 
Add parentheses to prevent truncated addresses

Backport from master

* i386-dis.c (print_insn): Parenthesize expression to prevent
truncated addresses.
(OP_J): Likewise.

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 16 Feb 2016 00:00:57 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 15 Feb 2016 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 14 Feb 2016 00:01:06 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 13 Feb 2016 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoFix a typo in objcopy manual
H.J. Lu [Fri, 12 Feb 2016 21:38:57 +0000 (13:38 -0800)] 
Fix a typo in objcopy manual

For objcopy, --compress-debug-sections=none is the same as
--decompress-debug-sections, not --nocompress-debug-sections.

Backport from master

* doc/binutils.texi: Fix a typo.

9 years agoEnable -Bsymbolic and -Bsymbolic-functions to PIE
H.J. Lu [Thu, 11 Feb 2016 23:31:15 +0000 (15:31 -0800)] 
Enable -Bsymbolic and -Bsymbolic-functions to PIE

Before binutils 2.26, -Bsymbolic and -Bsymbolic-functions were also
applied to PIE so that "ld -pie -Bsymbolic -E" can be used to export
symbols in PIE with local binding.  This patch re-enables -Bsymbolic
and -Bsymbolic-functions for PIE.

Backport from master

PR ld/19615
* ld.texinfo: Document -Bsymbolic and -Bsymbolic-functions for
PIE.
* lexsup.c (parse_args): Enable -Bsymbolic and
-Bsymbolic-functions for PIE.
* testsuite/ld-i386/i386.exp: Run pr19615.
* testsuite/ld-i386/pr19615.d: New file.
* testsuite/ld-i386/pr19615.s: Likewise.
* testsuite/ld-x86-64/pr19615.d: Likewise.
* testsuite/ld-x86-64/pr19615.s: Likewise.

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 12 Feb 2016 00:00:55 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoMask off the least significant bit in GOT offset
H.J. Lu [Thu, 11 Feb 2016 03:33:52 +0000 (19:33 -0800)] 
Mask off the least significant bit in GOT offset

The least significant bit in GOT offset is to record whether we have
initialized the GOT entry in R_386_GOT32 processing.  We need to mask
it off for R_386_GOT32X.

Backport from master

PR ld/19601
* elf32-i386.c (elf_i386_relocate_section): Mask off the least
significant bit in GOT offset for R_386_GOT32X.

9 years agoAutomatic date update in version.in
GDB Administrator [Thu, 11 Feb 2016 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Wed, 10 Feb 2016 00:01:05 +0000 (00:01 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 9 Feb 2016 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 8 Feb 2016 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 7 Feb 2016 00:00:55 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 6 Feb 2016 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 5 Feb 2016 00:00:55 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Thu, 4 Feb 2016 00:00:55 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAdd -mrelax-relocations= to x86 assembler
H.J. Lu [Wed, 3 Feb 2016 16:25:15 +0000 (08:25 -0800)] 
Add -mrelax-relocations= to x86 assembler

The x86 relax relocations introduced in binutils 2.26 aren't supported
by linker on Solaris older than Solaris 12.  To use x86 assembler with
older Solaris linker, this patch adds

1. A command line option -mrelax-relocations= to x86 assembler to
control whether to generate relax relocations.
2. A configure option --enable-x86-relax-relocations to decide whether
x86 assembler should generate relax relocations by default.  It is
defaulted to yes, except for x86 Solaris targets older than Solaris 12.

Backport from master

gas/

PR gas/19520
* NEWS: Mention new command line option -mrelax-relocations and
new configure option --enable-x86-relax-relocations for x86
target.
* config.in: Regenerated.
* configure.ac: Add --enable-x86-relax-relocations.
(ac_default_x86_relax_relocations): New.  Default to 1 except
for x86 Solaris targets older than Solaris 12.
(DEFAULT_GENERATE_X86_RELAX_RELOCATIONS): Define.
* configure: Likewise.
* config/tc-i386.c (generate_relax_relocations): New.
(OPTION_MRELAX_RELOCATIONS): Likewise.
(output_disp): Don't generate relax relocations if
generate_relax_relocations is 0.
(md_longopts): Add -mrelax-relocations.
(md_show_usage): Likewise.
(md_parse_option): Handle OPTION_MRELAX_RELOCATIONS.
* doc/c-i386.texi: Document -mrelax-relocations=.
* testsuite/gas/i386/got-no-relax.d: New file.
* testsuite/gas/i386/x86-64-gotpcrel-no-relax.d: Likewise.
* testsuite/gas/i386/got.d: Pass -mrelax-relocations=yes to as.
* testsuite/gas/i386/localpic.d: Likewise.
* testsuite/gas/i386/mixed-mode-reloc32.d: Likewise.
* testsuite/gas/i386/reloc32.d: Likewise.
* testsuite/gas/i386/x86-64-gotpcrel.d: Likewise.
* testsuite/gas/i386/x86-64-localpic.d: Likewise.
* testsuite/gas/i386/ilp32/x86-64-gotpcrel.d: Likewise.
* testsuite/gas/i386/ilp32/x86-64-localpic.d: Likewise.
* testsuite/gas/i386/i386.exp: Run got-no-relax and
x86-64-gotpcrel-no-relax.

ld/

PR gas/19520
* testsuite/ld-i386/branch1.d: Pass -mrelax-relocations=yes to as.
* testsuite/ld-i386/call1.d: Likewise.
* testsuite/ld-i386/call2.d: Likewise.
* testsuite/ld-i386/call3a.d: Likewise.
* testsuite/ld-i386/call3b.d: Likewise.
* testsuite/ld-i386/call3c.d: Likewise.
* testsuite/ld-i386/call3d.d: Likewise.
* testsuite/ld-i386/call3e.d: Likewise.
* testsuite/ld-i386/call3f.d: Likewise.
* testsuite/ld-i386/call3g.d: Likewise.
* testsuite/ld-i386/call3h.d: Likewise.
* testsuite/ld-i386/jmp1.d: Likewise.
* testsuite/ld-i386/jmp2.d: Likewise.
* testsuite/ld-i386/lea1c.d: Likewise.
* testsuite/ld-i386/load1.d: Likewise.
* testsuite/ld-i386/load2.d: Likewise.
* testsuite/ld-i386/load3.d: Likewise.
* testsuite/ld-i386/load4a.d: Likewise.
* testsuite/ld-i386/load5a.d: Likewise.
* testsuite/ld-i386/mov2b.d: Likewise.
* testsuite/ld-i386/mov3.d: Likewise.
* testsuite/ld-ifunc/ifunc-21-x86-64.d: Likewise.
* testsuite/ld-ifunc/ifunc-22-x86-64.d: Likewise.
* testsuite/ld-ifunc/ifunc-5r-local-x86-64.d: Likewise.
* testsuite/ld-x86-64/call1a.d: Likewise.
* testsuite/ld-x86-64/call1b.d: Likewise.
* testsuite/ld-x86-64/call1c.d: Likewise.
* testsuite/ld-x86-64/call1d.d: Likewise.
* testsuite/ld-x86-64/call1e.d: Likewise.
* testsuite/ld-x86-64/call1f.d: Likewise.
* testsuite/ld-x86-64/call1h.d: Likewise.
* testsuite/ld-x86-64/call1i.d: Likewise.
* testsuite/ld-x86-64/load1a.d: Likewise.
* testsuite/ld-x86-64/load1b.d: Likewise.
* testsuite/ld-i386/got1a.S: Load GOT into %ecx and use it.
* testsuite/ld-i386/got1.dd: Updated.
* testsuite/ld-i386/got1d.S (1): Removed.
* testsuite/ld-i386/i386.exp: Add -Wa,-mrelax-relocations=yes.
* testsuite/ld-x86-64/x86-64.exp: Likewise.

9 years agoRemove duplicated marker for 2.26 in gas/NEWS
H.J. Lu [Wed, 3 Feb 2016 14:37:21 +0000 (06:37 -0800)] 
Remove duplicated marker for 2.26 in gas/NEWS

Backport from master

* NEWS: Remove duplicated marker for 2.26.

9 years agoAutomatic date update in version.in
GDB Administrator [Wed, 3 Feb 2016 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoStore estimated distances in compressed_size
H.J. Lu [Tue, 2 Feb 2016 16:14:43 +0000 (08:14 -0800)] 
Store estimated distances in compressed_size

elf_x86_64_convert_load is very time consuming since it is called on
each input section and has a loop over input text sections to estimate
the branch distrance.  We can store the estimated distances in the
compressed_size field of the output section, which is only used to
decompress the compressed input section.

Before the patch, linking clang 3.9 takes 52 seconds.  After the patch,
it only takes 2.5 seconds.

Backport from master

PR ld/19542
* elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated
distances in the compressed_size field of the output section.

9 years agoAdd a testcase for PR ld/18591
H.J. Lu [Tue, 2 Feb 2016 14:36:52 +0000 (06:36 -0800)] 
Add a testcase for PR ld/18591

Backport from master

PR ld/18591
* testsuite/ld-x86-64/pr18591.d: New file.
* testsuite/ld-x86-64/pr18591.s: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run pr18591.

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 2 Feb 2016 00:00:56 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoFix /usr/bin/ld: final link failed: File truncated error on hppa
John David Anglin [Mon, 1 Feb 2016 21:31:58 +0000 (16:31 -0500)] 
Fix /usr/bin/ld: final link failed: File truncated error on hppa

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 1 Feb 2016 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 31 Jan 2016 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoReplace == with = in gas/configure.ac
H.J. Lu [Fri, 29 Jan 2016 15:47:45 +0000 (07:47 -0800)] 
Replace == with = in gas/configure.ac

Backport from master

PR gas/19532
* configure.ac (compressed_debug_sections): Replace == with =.
* configure: Regenerated.

9 years agoReplace == with = in ld/configure.ac
H.J. Lu [Fri, 29 Jan 2016 15:47:13 +0000 (07:47 -0800)] 
Replace == with = in ld/configure.ac

Backport from master

PR ld/19533
* configure.ac (compressed_debug_sections): Replace == with =.
* configure: Regenerated.

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 30 Jan 2016 00:00:54 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 29 Jan 2016 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Thu, 28 Jan 2016 00:00:55 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Wed, 27 Jan 2016 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 26 Jan 2016 00:00:58 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoBump to 2.26.0
Tristan Gingold [Mon, 25 Jan 2016 09:54:54 +0000 (10:54 +0100)] 
Bump to 2.26.0

bfd/
2016-01-25  Tristan Gingold  <gingold@adacore.com>

* version.m4: Bump version to 2.26.0
* configure: Regenerate.

binutils/
2016-01-25  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

gas/
2016-01-25  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

gprof/
2016-01-25  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

ld/
2016-01-25  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

opcodes/
2016-01-25  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

9 years agoAdd generated files binutils-2_26
Tristan Gingold [Mon, 25 Jan 2016 09:20:17 +0000 (10:20 +0100)] 
Add generated files

9 years agoBump version to 2.26
Tristan Gingold [Mon, 25 Jan 2016 09:16:49 +0000 (10:16 +0100)] 
Bump version to 2.26

bfd/
2016-01-25  Tristan Gingold  <gingold@adacore.com>

* version.m4: Bump version to 2.26
* configure: Regenerate.

binutils/
2016-01-25  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

gas/
2016-01-25  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

gprof/
2016-01-25  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

ld/
2016-01-25  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

opcodes/
2016-01-25  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 25 Jan 2016 00:00:59 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 24 Jan 2016 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in