native_client/nacl-binutils.git
4 months agoMerge tag 'binutils-2_24' into ng/2.24/nacl-hacks master ng/2.24/nacl-hacks
Roland McGrath [Mon, 2 Dec 2013 17:13:52 +0000 (09:13 -0800)]
Merge tag 'binutils-2_24' into ng/2.24/nacl-hacks

4 months agoAdd generated files
Tristan Gingold [Mon, 2 Dec 2013 09:54:47 +0000 (10:54 +0100)]
Add generated files

4 months agoBump version to 2.24
Tristan Gingold [Mon, 2 Dec 2013 09:48:01 +0000 (10:48 +0100)]
Bump version to 2.24

bfd/
2013-12-02  Tristan Gingold  <gingold@adacore.com>

* configure.in: Bump version to 2.24
* Makefile.am (RELEASE): Set.
* configure, Makefile.in: Regenerate.

4 months agodaily update
Alan Modra [Sun, 1 Dec 2013 23:00:36 +0000 (09:30 +1030)]
daily update

4 months agodaily update
Alan Modra [Sat, 30 Nov 2013 23:00:28 +0000 (09:30 +1030)]
daily update

4 months agodaily update
Alan Modra [Fri, 29 Nov 2013 23:00:25 +0000 (09:30 +1030)]
daily update

4 months agodaily update
Alan Modra [Thu, 28 Nov 2013 23:00:25 +0000 (09:30 +1030)]
daily update

4 months agodaily update
Alan Modra [Wed, 27 Nov 2013 23:00:30 +0000 (09:30 +1030)]
daily update

4 months agodaily update
Alan Modra [Tue, 26 Nov 2013 23:00:32 +0000 (09:30 +1030)]
daily update

4 months agoBump version to 2.23.92
Tristan Gingold [Tue, 26 Nov 2013 11:39:58 +0000 (12:39 +0100)]
Bump version to 2.23.92

bfd/
2013-11-26  Tristan Gingold  <gingold@adacore.com>

* configure.in: Bump version to 2.23.92
* configure: Regenerate.

4 months agodaily update
Alan Modra [Mon, 25 Nov 2013 23:00:28 +0000 (09:30 +1030)]
daily update

4 months agold/ChangeLog:
Yufeng Zhang [Mon, 25 Nov 2013 18:40:13 +0000 (18:40 +0000)]
ld/ChangeLog:

* Makefile.am (ALL_64_EMULATION_SOURCES): Add eaarch64linux32.c
and eaarch64linux32b.c
(eaarch64linux32.c): New target.
(eaarch64linux32b.c): Likewise.
* Makefile.in: Regenerate.
* configure.tgt (aarch64_be-*-linux*): Add
aarch64linux32 and aarch64linux32b to targ_extra_libpath.
(aarch64-*-linux*): Likewise.
* emulparams/aarch64elf32.sh (SEPARATE_GOTPLT): Change to 12 (3 words).
* emulparams/aarch64linux32.sh: New file.
* emulparams/aarch64linux32b.sh: New file.

4 months agold/ChangeLog:
Yufeng Zhang [Mon, 25 Nov 2013 18:36:48 +0000 (18:36 +0000)]
ld/ChangeLog:

* configure.tgt (aarch64_be-*-linux*): Split out the linux targets
into targ_extra_libpath.
(aarch64-*-linux*): Likewise.

4 months agodaily update
Alan Modra [Sun, 24 Nov 2013 23:00:34 +0000 (09:30 +1030)]
daily update

4 months agodaily update
Alan Modra [Sat, 23 Nov 2013 23:00:28 +0000 (09:30 +1030)]
daily update

4 months agoUse in-tree assembler for exception_x86_64_bnd_test.
Cary Coutant [Fri, 22 Nov 2013 23:38:24 +0000 (15:38 -0800)]
Use in-tree assembler for exception_x86_64_bnd_test.

gold/
* testsuite/Makefile.am (exception_x86_64_bnd_test): Use in-tree
assembler.
* testsuite/Makefile.in: Regenerate.

4 months agodaily update
Alan Modra [Fri, 22 Nov 2013 23:00:20 +0000 (09:30 +1030)]
daily update

4 months agoImport config.sub and config.guess from upstream.
Alan Modra [Fri, 22 Nov 2013 22:30:43 +0000 (09:00 +1030)]
Import config.sub and config.guess from upstream.

4 months agoremove patch leftovers
Nick Clifton [Fri, 22 Nov 2013 15:05:59 +0000 (15:05 +0000)]
remove patch leftovers

4 months ago * windres.c (define_resource): Use zero for timestamp, making
Nick Clifton [Fri, 22 Nov 2013 15:04:23 +0000 (15:04 +0000)]
* windres.c (define_resource): Use zero for timestamp, making
output deterministic. time.h include is no longer needed.
* resres.c (res_append_resource): Likewise.

* libcoff-in.h: Add insert_timestamp flag to the pe_data struct.
* libcoff.h: Regenerate.
* peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Only use a real
timestamp if --insert-timestamp was used.

* pe-dll.c (fill_edata): Only use a real timestamp if
--insert-timestamp was used.
* emultempl/pe.em: Add the --insert-timestamp option.
* emultempl/pep.em: Likewise for 64bit.
* ld.texinfo: Document the --insert-timestamp option.

4 months agodaily update
Alan Modra [Thu, 21 Nov 2013 23:02:51 +0000 (09:32 +1030)]
daily update

4 months agodaily update
Alan Modra [Wed, 20 Nov 2013 23:00:29 +0000 (09:30 +1030)]
daily update

4 months agogas/testsuite/
Yufeng Zhang [Wed, 20 Nov 2013 11:22:40 +0000 (11:22 +0000)]
gas/testsuite/

* gas/aarch64/msr.s: Add tests.
* gas/aarch64/msr.d: Update.

include/opcode

* aarch64.h (aarch64_pstatefields): Change element type to
aarch64_sys_reg.

opcodes/

* aarch64-opc.c (aarch64_pstatefields): Update.

4 months agoMerge branch 'binutils-2_24-branch' into ng/2.24/nacl-hacks
Roland McGrath [Tue, 19 Nov 2013 23:13:08 +0000 (15:13 -0800)]
Merge branch 'binutils-2_24-branch' into ng/2.24/nacl-hacks

4 months agoFix *-nacl* target objcopy/strip of binary made with custom linker script
Roland McGrath [Tue, 19 Nov 2013 22:57:54 +0000 (14:57 -0800)]
Fix *-nacl* target objcopy/strip of binary made with custom linker script

bfd/
* elf-nacl.c (nacl_modify_segment_map): Calculate SIZEOF_HEADERS
when not doing linking (i.e. INFO is a null pointer).

(cherry picked from commit 33aa641a5d20d54adaac9b21b5a3e19b03f0bd4f)

4 months agodaily update
Alan Modra [Tue, 19 Nov 2013 23:00:29 +0000 (09:30 +1030)]
daily update

4 months agoFix references to __ehdr_start when it cannot be defined
Roland McGrath [Tue, 19 Nov 2013 18:54:00 +0000 (10:54 -0800)]
Fix references to __ehdr_start when it cannot be defined

ld/
* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
Don't use bfd_elf_record_link_assignment to mark __ehdr_start
hidden.  Instead, just do it directly here, and only if it was
referenced but not defined.

ld/testsuite/
* ld-elf/ehdr_start-userdef.t: New file.
* ld-elf/ehdr_start-userdef.d: New file.
* ld-elf/ehdr_start-strongref.s: New file.
* ld-elf/ehdr_start-missing.t: New file.
* ld-elf/ehdr_start-missing.d: New file.
* ld-elf/ehdr_start-weak.d: New file.
* ld-mips-elf/ehdr_start-2.nd: Expect __ehdr_start to be global.

(cherry picked from commit c2763e270c6627e55ac7a75ed3c0a717fbca9bd0)

4 months agodaily update
Alan Modra [Mon, 18 Nov 2013 23:00:33 +0000 (09:30 +1030)]
daily update

4 months agoAdd a dummy "int bnd_prefix" argument
H.J. Lu [Mon, 18 Nov 2013 20:16:16 +0000 (12:16 -0800)]
Add a dummy "int bnd_prefix" argument

* config/tc-i386.c (lex_got): Add a dummy "int bnd_prefix"
argument.

4 months agoAdd R_X86_64_PC32_BND/R_X86_64_PLT32_BND suppor to gold
H.J. Lu [Sun, 17 Nov 2013 18:30:28 +0000 (10:30 -0800)]
Add R_X86_64_PC32_BND/R_X86_64_PLT32_BND suppor to gold

elfcpp/

* x86_64.h (R_X86_64_PC32_BND): New.
(R_X86_64_PLT32_BND): Likewise.

gold/

* x86_64.cc (Target_x86_64<size>::Scan::get_reference_flags):
Handle R_X86_64_PC32_BND and R_X86_64_PLT32_BND just like
R_X86_64_PC32 and R_X86_64_PLT32, respectively.
(Target_x86_64<size>::Scan::local): Likewise.
(Target_x86_64<size>::Scan::global): Likewise.
(Target_x86_64<size>::Relocate::relocate): Likewise.
(Target_x86_64<size>::Relocatable_size_for_reloc::get_size_for_reloc):
Likewise.
(Target_x86_64<size>::Scan::check_non_pic(): Handle
R_X86_64_PC32_BND.

* testsuite/Makefile.am (check_PROGRAMS): Add
exception_x86_64_bnd_test.
(exception_x86_64_bnd_test_SOURCES): New macro.
(exception_x86_64_bnd_test_DEPENDENCIES): Likewise.
(exception_x86_64_bnd_test_LDFLAGS): Likewise.
(exception_x86_64_bnd_test_LDADD): Likewise.
(exception_x86_64_bnd_1.o): New rule.
(exception_x86_64_bnd_2.o): Likewise.
* testsuite/Makefile.in: Regenerated.

4 months agoAdd support for armv7ve to gas.
Yufeng Zhang [Mon, 18 Nov 2013 17:23:33 +0000 (17:23 +0000)]
Add support for armv7ve to gas.

gas/

* config/tc-arm.c (arm_archs): New armv7ve architecture option.
(arm_cpus): Replace ARM_ARCH_V7A_IDIV_MP_SEC_VIRT with
ARM_ARCH_V7VE for cortex-a7, cortex-a12 and cortex-a15.
(cpu_arch_ver): Likewise.
* doc/c-arm.texi: Document armv7ve.

gas/testsuite/

* gas/arm/attr-march-armv7ve.d: New test case for armv7ve.

include/opcode/

* arm.h (ARM_AEXT_V7VE): New define.
(ARM_ARCH_V7VE): New define.
(ARM_ARCH_V7A_IDIV_MP_SEC_VIRT): Removed.

4 months ago2013-11-18 Chung-Lin Tang <cltang@codesourcery.com>
Chung-Lin Tang [Mon, 18 Nov 2013 16:01:45 +0000 (08:01 -0800)]
2013-11-18  Chung-Lin Tang  <cltang@codesourcery.com>

Backport from master
2013-11-18  Chung-Lin Tang  <cltang@codesourcery.com>
* emulparams/nios2linux.sh: New emulation file.
* configure.tgt: Add nios2*-*-linux* emulation case.
* Makefile.am (enios2elf.c): Change tdir_nios2 to tdir_nios2elf.
(enios2linux.c): New emulation entry.
* Makefile.in: Regenerate.

4 months agogas/
Yufeng Zhang [Mon, 18 Nov 2013 11:34:43 +0000 (11:34 +0000)]
gas/

* config/tc-aarch64.c (parse_sys_reg): Support
S2_<op1>_<Cn>_<Cm>_<op2>.

gas/testsuite/

* gas/testsuite/sysreg.s: Add test.
* gas/testsuite/sysreg.d: Update.

4 months agoRevert "Add support for AArch64 trace unit registers."
Yufeng Zhang [Mon, 18 Nov 2013 11:57:19 +0000 (11:57 +0000)]
Revert "Add support for AArch64 trace unit registers."

This reverts commit 7568a4e05cc35bc96e7a422a7f3a453665479197.

4 months agoUpdate minor version.
Tristan Gingold [Mon, 18 Nov 2013 08:44:05 +0000 (09:44 +0100)]
Update minor version.

bfd/
2013-11-18  Tristan Gingold  <gingold@adacore.com>

* configure.in: Bump version to 2.23.91
* configure: Regenerate.

4 months agodaily update
Alan Modra [Sun, 17 Nov 2013 23:00:30 +0000 (09:30 +1030)]
daily update

4 months agoAdd R_X86_64_PC32_BND and R_X86_64_PLT32_BND
H.J. Lu [Tue, 12 Nov 2013 23:46:55 +0000 (15:46 -0800)]
Add R_X86_64_PC32_BND and R_X86_64_PLT32_BND

bfd/

* elf64-x86-64.c (x86_64_elf_howto_table): Add R_X86_64_PC32_BND
and R_X86_64_PLT32_BND.
(R_X86_64_standard): Replace R_X86_64_RELATIVE64 with
R_X86_64_PLT32_BND.
(IS_X86_64_PCREL_TYPE): Add R_X86_64_PLT32_BND.
(x86_64_reloc_map): Add BFD_RELOC_X86_64_PC32_BND and
BFD_RELOC_X86_64_PLT32_BND.
(elf_x86_64_check_relocs): Handle R_X86_64_PC32_BND and
R_X86_64_PLT32_BND.
(elf_x86_64_gc_sweep_hook): Likewise.
(elf_x86_64_relocate_section): Likewise.
* reloc.c (bfd_reloc_code_real): Add BFD_RELOC_X86_64_PC32_BND
and BFD_RELOC_X86_64_PLT32_BND.
* bfd-in2.h: Regenerated.
* libbfd.h: Likewise.

gas/

* config/tc-i386.c (reloc): Add an argument, bnd_prefix, to
indicate if instruction has the BND prefix.  Return
BFD_RELOC_X86_64_PC32_BND instead of BFD_RELOC_32_PCREL if
bnd_prefix isn't zero.
(output_branch): Pass BFD_RELOC_X86_64_PC32_BND to frag_var
if needed.
(output_jump): Update reloc call.
(output_interseg_jump): Likewise.
(output_disp): Likewise.
(output_imm): Likewise.
(x86_cons_fix_new): Likewise.
(lex_got): Add an argument, bnd_prefix, to indicate if
instruction has the BND prefix.  Use BFD_RELOC_X86_64_PLT32_BND
if needed.
(x86_cons): Update lex_got call.
(i386_immediate): Likewise.
(i386_displacement): Likewise.
(md_apply_fix): Handle BFD_RELOC_X86_64_PC32_BND and
BFD_RELOC_X86_64_PLT32_BND.
(tc_gen_reloc): Likewise.
* config/tc-i386-intel.c (i386_operator): Update lex_got call.

gas/testsuite/

* gas/i386/i386.exp: Run x86-64-mpx-branch-1 and
x86-64-mpx-branch-2 on 64-bit ELF targets.
* gas/i386/x86-64-mpx-branch-1.d: New file.
* gas/i386/x86-64-mpx-branch-1.s: Likewise.
* gas/i386/x86-64-mpx-branch-2.d: Likewise.
* gas/i386/x86-64-mpx-branch-2.s: Likewise.

include/elf/

* x86-64.h: Add R_X86_64_PC32_BND and R_X86_64_PLT32_BND.

ld/testsuite/

* ld-x86-64/mpx.exp: New file.
* ld-x86-64/mpx1.out: Likewise.
* ld-x86-64/mpx1a.c: Likewise.
* ld-x86-64/mpx1a.rd: Likewise.
* ld-x86-64/mpx1b.c: Likewise.
* ld-x86-64/mpx1c.c: Likewise.
* ld-x86-64/mpx1c.rd: Likewise.

4 months agogas/
Yufeng Zhang [Fri, 15 Nov 2013 23:40:34 +0000 (23:40 +0000)]
gas/

* config/tc-aarch64.c (set_other_error): New function.
(parse_sys_reg): Add new parameter 'sys_reg' and if non-NULL set
the variable to which it points with 'o'.
(parse_operands): Update; check for write to read-only system
registers or read from write-only ones.

gas/testsuite/

* gas/aarch64/diagnostic.s: Add tests.
* gas/aarch64/diagnostic.l: Update.
* gas/aarch64/tracereg-illegal.d: New file.
* gas/aarch64/tracereg-illegal.l: Ditto.
* gas/aarch64/tracereg-illegal.s: Ditto.
* gas/aarch64/tracereg.d: Ditto.
* gas/aarch64/tracereg.s: Ditto.

include/opcode

* aarch64.h (aarch64_sys_reg_readonly_p): New declaration.
(aarch64_sys_reg_writeonly_p): Ditto.

opcodes/

* aarch64-opc.c (CPENT): New define.
(F_READONLY, F_WRITEONLY): Likewise.
(aarch64_sys_regs): Add trace unit registers.
(aarch64_sys_reg_readonly_p): New function.
(aarch64_sys_reg_writeonly_p): Ditto.

4 months agodaily update
Alan Modra [Fri, 15 Nov 2013 23:00:32 +0000 (09:30 +1030)]
daily update

5 months agoReorder invalid default mask check
Michael Zolotukhin [Fri, 15 Nov 2013 13:22:32 +0000 (05:22 -0800)]
Reorder invalid default mask check

gas/

2013-11-15  Michael Zolotukhin  <michael.v.zolotukhin@gmail.com>

* config/tc-i386.c (check_VecOperands): Reorder checks.

gas/testsuite/

2013-11-15  Michael Zolotukhin  <michael.v.zolotukhin@gmail.com>

* gas/i386/inval-avx512f.s: Add invalid test for gather instruction
with default mask.
* gas/i386/inval-avx512f.l: Update correspondingly.

5 months agoFixes to powerpc64 gold ELFv2 support
Alan Modra [Fri, 15 Nov 2013 00:06:34 +0000 (10:36 +1030)]
Fixes to powerpc64 gold ELFv2 support

(cherry picked from commit 9055360d4a69313949c3535ec065080cb814367d)

5 months agoppc: signed/unsigned comparison
Jan-Benedict Glaw [Mon, 11 Nov 2013 08:35:51 +0000 (09:35 +0100)]
ppc: signed/unsigned comparison

[BR]: https://sourceware.org/ml/binutils/2013-11/msg00064.html
(cherry picked from commit e2b5892e6e75109898db1cfbda2975fa422ba762)

5 months agoPowerPC64 ELFv2, allocate dynreloc space for ifunc
Alan Modra [Mon, 11 Nov 2013 03:16:26 +0000 (13:46 +1030)]
PowerPC64 ELFv2, allocate dynreloc space for ifunc

(cherry picked from commit 14b5f73fac0e34c2fca81aa0dfbc9c7eebc922f2)

5 months agoCorrect elf64-ppc.c handling of protected symbols
Alan Modra [Tue, 5 Nov 2013 23:50:52 +0000 (10:20 +1030)]
Correct elf64-ppc.c handling of protected symbols

(cherry picked from commit afe397ea85a3d09d936c93328a1f6bf640577cf3)

5 months agoHide ppc64 .TOC. from --export-dynamic
Alan Modra [Tue, 5 Nov 2013 02:08:51 +0000 (12:38 +1030)]
Hide ppc64 .TOC. from --export-dynamic

(cherry picked from commit dba6fa9bce92c9f9fcca07269ac8443797bd9338)

5 months agoUpdate elf64-ppc.c to use elf_link_hash_table shortcuts.
Alan Modra [Tue, 5 Nov 2013 01:22:26 +0000 (11:52 +1030)]
Update elf64-ppc.c to use elf_link_hash_table shortcuts.

(cherry picked from commit 33e44f2eb27d78f57ed83d11f04652691d896a6f)

5 months agoRemove powerpc.cc copy of use_plt_offset
Alan Modra [Fri, 1 Nov 2013 05:39:56 +0000 (16:09 +1030)]
Remove powerpc.cc copy of use_plt_offset

(cherry picked from commit 88b8e63904fda25c029deaf25d7b4e489b351470)

5 months agoEdit ELFv2 global entry prologue to non-PIC
Alan Modra [Fri, 1 Nov 2013 08:55:56 +0000 (19:25 +1030)]
Edit ELFv2 global entry prologue to non-PIC

(cherry picked from commit 52a82034ac9a288d2d8e60efa880623288b5d228)

5 months agoPowerPC64 ELFv2 symbols defined in plt
Alan Modra [Fri, 1 Nov 2013 08:54:20 +0000 (19:24 +1030)]
PowerPC64 ELFv2 symbols defined in plt

(cherry picked from commit a345bc8d317a159e3e887632d80c5a8282d34f07)

5 months agoAllow for extra st_other readelf output in ld testsuite
Alan Modra [Thu, 31 Oct 2013 09:03:23 +0000 (19:33 +1030)]
Allow for extra st_other readelf output in ld testsuite

(cherry picked from commit 4115bfc68301edaca4dd1fd83eddeaafeda4c63c)

5 months agold crossref test fix
Alan Modra [Thu, 31 Oct 2013 09:00:24 +0000 (19:30 +1030)]
ld crossref test fix

(cherry picked from commit 14f2c476752f3cc4bfa7baee2a5a5183aafad975)

5 months agoSimplify ppc64 code setting toc_off.
Alan Modra [Wed, 30 Oct 2013 07:00:43 +0000 (17:30 +1030)]
Simplify ppc64 code setting toc_off.

(cherry picked from commit 8b974ba3e8216b7f6659d2803444e0ddceaeded7)

5 months agoPowerPC64 ELFv2 support for gold.
Alan Modra [Tue, 29 Oct 2013 07:15:48 +0000 (17:45 +1030)]
PowerPC64 ELFv2 support for gold.

(cherry picked from commit b4f7960d5307fe4aad2126382df78f63696e96b3)

5 months agoAdd PowerPC64 ELFv2 tests.
Alan Modra [Tue, 29 Oct 2013 06:10:34 +0000 (16:40 +1030)]
Add PowerPC64 ELFv2 tests.

(cherry picked from commit d4a95d4999e7fe0d868254bec76722b35f064184)

5 months agoReplace DT_PPC_TLSOPT with DT_PPC_OPT.
Alan Modra [Tue, 29 Oct 2013 06:04:35 +0000 (16:34 +1030)]
Replace DT_PPC_TLSOPT with DT_PPC_OPT.

(cherry picked from commit e8910a83af41c3dbfd00191b2720d4094f8d9532)

5 months agoSupport ELFv2 stack frame.
Alan Modra [Tue, 29 Oct 2013 05:47:22 +0000 (16:17 +1030)]
Support ELFv2 stack frame.

(cherry picked from commit a078d95abc554b6c2572fcab5550591639b1c871)

5 months agoELFv2 stub, plt and glink changes
Alan Modra [Tue, 29 Oct 2013 05:28:05 +0000 (15:58 +1030)]
ELFv2 stub, plt and glink changes

(cherry picked from commit b9e5796b0d6ebc355e4a6d06791b7366939d10f2)

5 months agoAdd ELFv2 .localentry support.
Alan Modra [Tue, 29 Oct 2013 05:07:43 +0000 (15:37 +1030)]
Add ELFv2 .localentry support.

(cherry picked from commit 6911b7dcb8ea17f8b811578dd4ac1ab7bb675e7b)

5 months agoAdd .abiversion related support for ELFv2
Alan Modra [Tue, 29 Oct 2013 04:36:09 +0000 (15:06 +1030)]
Add .abiversion related support for ELFv2

(cherry picked from commit ee67d69a3ff0eed25d98c5e97ed6c3ede8069edc)

5 months agoChange plt stubs to have destination in r12.
Alan Modra [Tue, 29 Oct 2013 02:09:30 +0000 (12:39 +1030)]
Change plt stubs to have destination in r12.

(cherry picked from commit 71a39c98f8bedad54818c62ab2d567b0e2de546b)

5 months agoReport overflow on PowerPC64 @h and @ha relocations.
Alan Modra [Tue, 29 Oct 2013 06:23:25 +0000 (16:53 +1030)]
Report overflow on PowerPC64 @h and @ha relocations.

(cherry picked from commit f9c6b9078c54ea0f018b673e2ff128e61a0aa666)

5 months agomultilib osdir search paths for powerpc*-linux
Alan Modra [Tue, 24 Sep 2013 06:29:39 +0000 (06:29 +0000)]
multilib osdir search paths for powerpc*-linux

(cherry picked from commit 6c668e71eb5f8a9a3355e239738c85448adfc0e8)

5 months agodaily update
Alan Modra [Thu, 14 Nov 2013 23:00:36 +0000 (09:30 +1030)]
daily update

5 months agodaily update
Alan Modra [Wed, 13 Nov 2013 23:00:38 +0000 (09:30 +1030)]
daily update

5 months agobfd/
Yufeng Zhang [Wed, 13 Nov 2013 14:47:04 +0000 (14:47 +0000)]
bfd/

* elfnn-aarch64.c (elfNN_aarch64_howto_table): Use
R_AARCH64_TLS_DTPMOD64 instead of R_AARCH64_TLS_DTPMOD;
likewise for R_AARCH64_TLS_DTPREL and R_AARCH64_TLS_TPREL.

include/elf/

* aarch64.h: Define R_AARCH64_TLS_DTPMOD64,
R_AARCH64_TLS_DTPREL64 and R_AARCH64_TLS_TPREL64; guard
R_AARCH64_TLS_DTPMOD, R_AARCH64_TLS_DTPREL and
R_AARCH64_TLS_TPREL with RELOC_MACROS_GEN_FUNC.

5 months agodaily update
Alan Modra [Tue, 12 Nov 2013 23:00:42 +0000 (09:30 +1030)]
daily update

5 months agodaily update
Alan Modra [Mon, 11 Nov 2013 23:00:31 +0000 (09:30 +1030)]
daily update

5 months ago * elfxx-aarch64.c (_bfd_aarch64_elf_grok_prstatus): Fix hard-coded
Yufeng Zhang [Mon, 11 Nov 2013 10:26:41 +0000 (10:26 +0000)]
* elfxx-aarch64.c (_bfd_aarch64_elf_grok_prstatus): Fix hard-coded
size of struct elf_prstatus.

5 months agodaily update
Alan Modra [Sun, 10 Nov 2013 23:00:17 +0000 (09:30 +1030)]
daily update

5 months agodaily update
Alan Modra [Sat, 9 Nov 2013 23:00:15 +0000 (09:30 +1030)]
daily update

5 months agodaily update
Alan Modra [Fri, 8 Nov 2013 23:00:30 +0000 (09:30 +1030)]
daily update

5 months agoRemove CpuNop from CPU_K6_2_FLAGS
H.J. Lu [Fri, 8 Nov 2013 17:42:08 +0000 (09:42 -0800)]
Remove CpuNop from CPU_K6_2_FLAGS

PR gas/16140
* i386-gen.c (cpu_flag_init): Remove CpuNop from CPU_K6_2_FLAGS.
* i386-init.h: Regenerated.

5 months agodaily update
Alan Modra [Thu, 7 Nov 2013 23:00:31 +0000 (09:30 +1030)]
daily update

5 months agoMerge branch 'binutils-2_24-branch' into ng/2.24/nacl-hacks
Roland McGrath [Thu, 7 Nov 2013 18:04:05 +0000 (10:04 -0800)]
Merge branch 'binutils-2_24-branch' into ng/2.24/nacl-hacks

5 months agoSet CPU type in BFD backend for x86_64-nacl* and i?86-nacl* targets
Roland McGrath [Wed, 6 Nov 2013 22:47:05 +0000 (14:47 -0800)]
Set CPU type in BFD backend for x86_64-nacl* and i?86-nacl* targets

bfd/
* archures.c (bfd_mach_i386_nacl): Fix definition so it doesn't
collide with bfd_mach_l1om.
* bfd-in2.h: Regenerate.

* elf32-i386.c (elf32_i386_nacl_elf_object_p): New function.
(elf_backend_object_p): Use that in elf32-i386-nacl definition.
* elf64-x86-64.c (elf64_x86_64_nacl_elf_object_p): New function.
(elf_backend_object_p): Use that in elf64-x86-64-nacl definition.
(elf32_x86_64_nacl_elf_object_p): New function.
(elf_backend_object_p): Use that in elf32-x86-64-nacl definition.

binutils/
* objdump.c (dump_dwarf): Grok bfd_mach_x86_64_nacl and
bfd_mach_x64_32_nacl as equivalent to bfd_mach_x86_64.

ld/testsuite/
* ld-x86-64/x86-64.exp (mixed1, mixed2): Loosen error string match
so it accepts "i386:nacl" in place of "i386".
* ld-x86-64/ilp32-2.d: Likewise.
* ld-x86-64/ilp32-3.d: Likewise.
* ld-x86-64/lp64-2.d: Likewise.
* ld-x86-64/lp64-3.d: Likewise.

(cherry picked from commit 64b384e1e821cedccefa24f6d5bb82d353546ca1)

5 months agodaily update
Alan Modra [Wed, 6 Nov 2013 23:00:31 +0000 (09:30 +1030)]
daily update

5 months agodaily update
Alan Modra [Tue, 5 Nov 2013 23:00:33 +0000 (09:30 +1030)]
daily update

5 months agogas/
Yufeng Zhang [Tue, 5 Nov 2013 20:54:22 +0000 (20:54 +0000)]
gas/

* config/tc-aarch64.c (parse_sys_reg): Update to use aarch64_sys_reg;
call aarch64_sys_reg_deprecated_p and warn about the deprecated
system registers.

gas/testsuite/

* gas/aarch64/deprecated.d: New file.
* gas/aarch64/deprecated.l: New file.
* gas/aarch64/deprecated.s: New file.
* gas/aarch64/sysreg-1.s: Add tests.
* gas/aarch64/sysreg-1.d: Add tests.

include/opcode/

* aarch64.h (aarch64_sys_reg): New typedef.
(aarch64_sys_regs): Change to define with the new type.
(aarch64_sys_reg_deprecated_p): Declare.

opcodes/

* aarch64-opc.c (F_DEPRECATED): New macro.
(aarch64_sys_regs): Update; flag "spsr_svc" and "spsr_hyp" with
F_DEPRECATED.
(aarch64_print_operand): Call aarch64_sys_reg_deprecated_p on
AARCH64_OPND_SYSREG.

5 months agogas/
Yufeng Zhang [Tue, 5 Nov 2013 20:50:18 +0000 (20:50 +0000)]
gas/

* config/tc-aarch64.c (parse_operands): Handle AARCH64_OPND_COND1.

gas/testsuite/

* gas/aarch64/alias.s: Add tests.
* gas/aarch64/alias.d: Update.
* gas/aarch64/no-aliases.d: Update.
* gas/aarch64/diagnostic.s: Add tests.
* gas/aarch64/diagnostic.l: Update.
* gas/aarch64/illegal.s: Add tests.
* gas/aarch64/illegal.l: Update.

include/opcode/

* aarch64.h (enum aarch64_operand_class): Add AARCH64_OPND_CLASS_COND.
(enum aarch64_opnd): Add AARCH64_OPND_COND1.

opcodes/

* aarch64-dis.c (convert_ubfm_to_lsl): Check for cond != '111x'.
(convert_from_csel): Likewise.
* aarch64-opc.c (operand_general_constraint_met_p): Handle
AARCH64_OPND_CLASS_COND and AARCH64_OPND_COND1.
(aarch64_print_operand): Handle AARCH64_OPND_COND1.
* aarch64-tbl.h (aarch64_opcode_table): Use COND1 instead of
COND for cinc, cset, cinv, csetm and cneg.
(AARCH64_OPERANDS): Add entry for AARCH64_OPND_COND1.
* aarch64-asm-2.c: Re-generated.
* aarch64-dis-2.c: Ditto.
* aarch64-opc-2.c: Ditto.

5 months agoopcodes/
Yufeng Zhang [Tue, 5 Nov 2013 20:46:24 +0000 (20:46 +0000)]
opcodes/

* aarch64-opc.c (set_syntax_error): New function.
(operand_general_constraint_met_p): Replace set_other_error
with set_syntax_error.

gas/testsuite/

* gas/aarch64/diagnostic.s: Add tests of ldp/stp.
* gas/aarch64/diagnostic.l: Update.

5 months agoconfig/tc-aarch64.c: Avoid trying to parse a vector mov as immediate.
Will Newton [Fri, 1 Nov 2013 00:21:11 +0000 (17:21 -0700)]
config/tc-aarch64.c: Avoid trying to parse a vector mov as immediate.

Parsing a vector mov instruction currently leads to a phantom undefined
symbol being added to the symbol table. e.g.:

       .text
       mov     x0, v0.D[0]

Produces an undefined symbol called "v0.D".

gas/ChangeLog:

2013-11-05  Will Newton  <will.newton@linaro.org>

PR gas/16103
* config/tc-aarch64.c (parse_operands): Avoid trying to
parse a vector register as an immediate.

gas/testsuite/ChangeLog:

2013-11-05  Will Newton  <will.newton@linaro.org>

* gas/aarch64/advsimd-mov-bad.d: New file.
* gas/aarch64/advsimd-mov-bad.s: Likewise.

5 months agodaily update
Alan Modra [Mon, 4 Nov 2013 23:00:35 +0000 (09:30 +1030)]
daily update

5 months agoFix calls to be aligned at the end of the bundle.
David Sehr [Tue, 29 Oct 2013 17:20:28 +0000 (10:20 -0700)]
Fix calls to be aligned at the end of the bundle.

BUG=
R=mcgrathr@chromium.org

Review URL: https://codereview.chromium.org/49263004

5 months agoFix merge conflict
Victor Khimenko [Tue, 15 Oct 2013 12:41:53 +0000 (16:41 +0400)]
Fix merge conflict

Couple of changes lost from CL 48ea2e338fe5a09b3ede4a41514282e7e872f75f

We don't use TC_NACL_C define here thus wrong version of code is used.

Compile "nacljmp %eax" (32bit) or "nacljmp %eax,%r15" (64bit) to see the
difference.

R=halyavin@google.com, halyavin@chromium.org

Review URL: https://codereview.appspot.com/14697043

5 months agoAllow use of external linker scripts.
Victor Khimenko [Mon, 23 Sep 2013 17:06:23 +0000 (21:06 +0400)]
Allow use of external linker scripts.

nacl-glibc uses different from nacl-newlib.  To make it possible
disable internal scripts and allow use of LIBPATH for external ones.

R=mcgrathr@chromium.org

Review URL: https://codereview.appspot.com/13791044

5 months agoCherry-picked hacks for old nacl-gcc 4.4.3
Victor Khimenko [Thu, 19 Sep 2013 15:25:32 +0000 (19:25 +0400)]
Cherry-picked hacks for old nacl-gcc 4.4.3

Old version of nacl-gcc (specifically nacl-gcc 4.4.3 which does not yet uses .bundle_lock/.bundle_unlock) produces code where some instructions which must be adjacent are separated with NOPs. Regular rewrite rules can not be used in such a case (links to bugs which include reproducers are lifted from old CLs). In fact you can not even do do "make build-with-glibc" without these changes because build of either glibc.so.* or (at later stage) libstdc++.so.* will fail.

---
Fix tls transition check from R_X86_64_GOTTPOFF

x86_64 linker expects either movq or addq there, while for NaCl we generate movl or addl.
Fixed the check to accept movl and addl, the rewrite itself seems to work as is.

BUG=http://code.google.com/p/nativeclient/issues/detail?id=1278

Review URL: http://codereview.chromium.org/6025010
---
TLS rewrite for x86_64 NaCl

Implement GD->IE, GD->LE, LD->LE transitions.
IE->LE works as is.

BUG=http://code.google.com/p/nativeclient/issues/detail?id=237

Review URL: http://codereview.chromium.org/8161011
---
TLS rewrite for i386 NaCl

Implement GD->IE,GD->LE,LD->LE transitions.
IE->LE works as is.

BUG=http://code.google.com/p/nativeclient/issues/detail?id=237

Review URL: http://codereview.chromium.org/8186010
---
Special processing of R_X86_64_32 relocations

R_X86_64_32 relocations in NaCl64 play the same role as R_X86_64_64 in native x86_64. They should be rewritten in case relocated symbol is hidden and will not exist in statically linked binary.

R_X86_64_64 are rewritten into R_X86_64_RELATIVE using the absolute value of the symbol. Unfortunately we don't have 32-bit alternative, thus we change relocation to use section instead of symbol. Usually this rewrite produces buggy relocations (why? there is corresponding comment in bfd, but it does not explain much), but in our special case we just create valid relocations.

BUG=http://code.google.com/p/nativeclient/issues/detail?id=1095

Review URL: http://codereview.chromium.org/4128004
---
Prevent ld from rewriting tls access sequences with calls

NaCl assembler inserts nops in front of a call for proper bundling. When linker tries to rewrite a code sequence that consists of something followed by a call, it complains about these nops.

At the moment, simply disable rewriting these sequences.

BUG=http://code.google.com/p/nativeclient/issues/detail?id=237

Review URL: http://codereview.chromium.org/3467009
---

R=mcgrathr@chromium.org

Review URL: https://codereview.appspot.com/13251051

5 months agoForward-port nacl assembler hacks
Victor Khimenko [Mon, 16 Sep 2013 21:00:55 +0000 (01:00 +0400)]
Forward-port nacl assembler hacks

Most changes are not really needed because they can be replaced
with .bundle_lock/.bundle_unlock directives, but call handling can
not be emulated.

Simple test to verify changes:

$ cat test.s
calltest:
    call calltarget1
    call calltarget2
    call calltarget3
    call externtarget

.p2align 5
regular_instruction:
    .fill 30,1,0x90
  calltarget1:
    mov %rax,%rax

.p2align 5
nacl_instruction:
    .fill 27,1,0x90
  calltarget2:
    mov %nacl:(%r15,%rax),%rax

.p2align 5
bundle_instruction:
    .fill 27,1,0x90
  calltarget3:
  .bundle_lock
    lea (%rax),%eax
    mov (%r15,%rax),%rax
  .bundle_unlock
$ x86_64-nacl-as --64 test.s -o test.o
$ objdump -dr test.o
test.o:     file format elf64-x86-64

Disassembly of section .text:

0000000000000000 <calltest>:
...
  1b:   e8 7e 00 00 00          callq  9e <calltarget1>
...
  3b:   e8 9b 00 00 00          callq  db <calltarget2>
...
  5b:   e8 bb 00 00 00          callq  11b <calltarget3>
...
  7b:   e8 00 00 00 00          callq  80 <regular_instruction>
                        7c: R_X86_64_PC32       externtarget-0x4
0000000000000080 <regular_instruction>:
...
000000000000009e <calltarget1>:
  9e:   66 90                   xchg   %ax,%ax
  a0:   48 89 c0                mov    %rax,%rax
...
00000000000000db <calltarget2>:
  db:   0f 1f 44 00 00          nopl   0x0(%rax,%rax,1)
  e0:   89 c0                   mov    %eax,%eax
  e2:   49 8b 04 07             mov    (%r15,%rax,1),%rax
...
000000000000011b <calltarget3>:
 11b:   0f 1f 44 00 00          nopl   0x0(%rax,%rax,1)
 120:   8d 00                   lea    (%rax),%eax
 122:   49 8b 04 07             mov    (%r15,%rax,1),%rax

Note relocation's handling and how all the instructions are correctly
moved to the end of bundle (for calls) or to the next bundle (for other
instructions).

R=mcgrathr@chromium.org

Review URL: https://codereview.appspot.com/13431045

5 months agodaily update
Alan Modra [Sun, 3 Nov 2013 23:00:13 +0000 (09:30 +1030)]
daily update

5 months agodaily update
Alan Modra [Sat, 2 Nov 2013 23:00:40 +0000 (09:30 +1030)]
daily update

5 months agodaily update
Alan Modra [Fri, 1 Nov 2013 23:00:34 +0000 (09:30 +1030)]
daily update

5 months agox86_64-*-nacl*: Adjust test cases for PLT nop fix.
Roland McGrath [Fri, 1 Nov 2013 21:54:40 +0000 (14:54 -0700)]
x86_64-*-nacl*: Adjust test cases for PLT nop fix.

ld/testsuite/
* ld-x86-64/plt-nacl.pd: Update expected disassembly for PLT nop fix.
* ld-x86-64/tlsdesc-nacl.pd: Likewise.

(cherry picked from commit 61674ef7c5fed87cf71e65eab274199634208298)

5 months ago*-*-nacl* layout: Drop requirement that some section have SEC_HAS_CONTENTS set.
Roland McGrath [Fri, 1 Nov 2013 21:37:46 +0000 (14:37 -0700)]
*-*-nacl* layout: Drop requirement that some section have SEC_HAS_CONTENTS set.

bfd/
* elf-nacl.c (segment_eligible_for_headers): Drop requirement that
some section have SEC_HAS_CONTENTS set.  It's not set for
.note.gnu.build-id, and a segment of only read-only SHT_NOBITS
sections is implausible and not really supportable anyway.

(cherry picked from commit 86e0565d9c985fa0ba46c85dbe6e77bcaf62dd33)

5 months agodaily update
Alan Modra [Thu, 31 Oct 2013 23:00:31 +0000 (09:30 +1030)]
daily update

5 months agodaily update
Alan Modra [Wed, 30 Oct 2013 23:00:38 +0000 (09:30 +1030)]
daily update

5 months ago * nm.c (display_rel_file): Treat bfd_error_no_symbols as
Nick Clifton [Thu, 31 Oct 2013 11:30:08 +0000 (11:30 +0000)]
* nm.c (display_rel_file): Treat bfd_error_no_symbols as
non-fatal.

5 months agogold: x86_64-nacl: Correct 9-byte nop sequence to match what the assembler generates.
Roland McGrath [Wed, 30 Oct 2013 22:57:58 +0000 (15:57 -0700)]
gold: x86_64-nacl: Correct 9-byte nop sequence to match what the assembler generates.

gold/
* x86_64.cc (Output_data_plt_x86_64_nacl::first_plt_entry):
Correct 9-byte nop sequence to match what the assembler generates.

(cherry picked from commit dd0845d708ab82f931fd7b800b4d218842ed635f)

5 months agoBFD: elf64-x86-64-nacl: Correct 9-byte nop sequence used in PLT0 entry.
Roland McGrath [Tue, 29 Oct 2013 23:15:38 +0000 (16:15 -0700)]
BFD: elf64-x86-64-nacl: Correct 9-byte nop sequence used in PLT0 entry.

bfd/
* elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Correct 9-byte nop
sequence to match what the assembler generates.

(cherry picked from commit 70cc877f6e7fc1bb19d3a60b9e10fafd38b86b4a)

5 months agodaily update
Alan Modra [Tue, 29 Oct 2013 23:00:22 +0000 (09:30 +1030)]
daily update

5 months agodaily update
Alan Modra [Sun, 20 Oct 2013 23:00:08 +0000 (23:00 +0000)]
daily update

5 months agodaily update
Alan Modra [Sat, 19 Oct 2013 23:00:08 +0000 (23:00 +0000)]
daily update