]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
7 years agoAutomatic date update in version.in users/ibm/binutils-2_25
GDB Administrator [Tue, 24 Nov 2015 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

7 years agoMIPS/GAS: Fix an ISA override not lifting ABI restrictions
Maciej W. Rozycki [Fri, 22 Apr 2016 00:04:52 +0000 (01:04 +0100)] 
MIPS/GAS: Fix an ISA override not lifting ABI restrictions

Correct a regression introduced with commit 919731affbef ("Add MIPS
.module directive") causing code like:

.set mips3
dli $2, 0x9000000080000000

to fail assembly with the following error message produced:

Error: number (0x9000000080000000) larger than 32 bits

if built with `mips3' selected as the global ISA (e.g. `-march=mips3').
This is because a `.set' directive doing an ISA override does not lift
the ABI restriction on register sizes if the ISA remains unchanged.
Previously the directive always set register sizes from the ISA chosen,
which is what some code expects.  Restore the old semantics then.

gas/
* config/tc-mips.c (code_option_type): New enum.
(parse_code_option): Return status indicating option type.
(s_mipsset): Update `parse_code_option' call site accordingly.
Always set register sizes from the ISA with ISA overrides.
(s_module): Update `parse_code_option' call site.
* testsuite/gas/mips/isa-override-1.d: New test.
* testsuite/gas/mips/micromips@isa-override-1.d: New test.
* testsuite/gas/mips/mips1@isa-override-1.d: New test.
* testsuite/gas/mips/mips2@isa-override-1.d: New test.
* testsuite/gas/mips/mips32@isa-override-1.d: New test.
* testsuite/gas/mips/mips32r2@isa-override-1.d: New test.
* testsuite/gas/mips/mips32r3@isa-override-1.d: New test.
* testsuite/gas/mips/mips32r5@isa-override-1.d: New test.
* testsuite/gas/mips/mips32r6@isa-override-1.d: New test.
* testsuite/gas/mips/mips64r2@isa-override-1.d: New test.
* testsuite/gas/mips/mips64r3@isa-override-1.d: New test.
* testsuite/gas/mips/mips64r5@isa-override-1.d: New test.
* testsuite/gas/mips/mips64r6@isa-override-1.d: New test.
* testsuite/gas/mips/r3000@isa-override-1.d: New test.
* testsuite/gas/mips/r3900@isa-override-1.d: New test.
* testsuite/gas/mips/r5900@isa-override-1.d: New test.
* testsuite/gas/mips/octeon@isa-override-1.d: New test.
* testsuite/gas/mips/octeon3@isa-override-1.d: New test.
* testsuite/gas/mips/isa-override-2.l: New list test.
* testsuite/gas/mips/mips1@isa-override-2.l: New list test.
* testsuite/gas/mips/mips2@isa-override-2.l: New list test.
* testsuite/gas/mips/mips32@isa-override-2.l: New list test.
* testsuite/gas/mips/mips32r2@isa-override-2.l: New list test.
* testsuite/gas/mips/mips32r3@isa-override-2.l: New list test.
* testsuite/gas/mips/mips32r5@isa-override-2.l: New list test.
* testsuite/gas/mips/mips32r6@isa-override-2.l: New list test.
* testsuite/gas/mips/r3000@isa-override-2.l: New list test.
* testsuite/gas/mips/r3900@isa-override-2.l: New list test.
* testsuite/gas/mips/octeon3@isa-override-2.l: New list test.
* testsuite/gas/mips/octeon3@isa-override-1.l: New stderr
output.
* testsuite/gas/mips/isa-override-1.s: New test source.
* testsuite/gas/mips/r5900@isa-override-1.s: New test source.
* testsuite/gas/mips/isa-override-2.s: New test source.
* testsuite/gas/mips/mips1@isa-override-2.s: New test source.
* testsuite/gas/mips/mips2@isa-override-2.s: New test source.
* testsuite/gas/mips/mips32@isa-override-2.s: New test source.
* testsuite/gas/mips/mips32r2@isa-override-2.s: New test source.
* testsuite/gas/mips/mips32r3@isa-override-2.s: New test source.
* testsuite/gas/mips/mips32r5@isa-override-2.s: New test source.
* testsuite/gas/mips/mips32r6@isa-override-2.s: New test source.
* testsuite/gas/mips/r3000@isa-override-2.s: New test source.
* testsuite/gas/mips/r3900@isa-override-2.s: New test source.
* testsuite/gas/mips/octeon3@isa-override-2.s: New test source.
* testsuite/gas/mips/mips.exp: Run the new tests.

(cherry picked from commit 5475e3249a6ab15afa0fe00456ada988d940a302)

7 years ago[Testsuite] treate -specs as both cflags & ldflags
Jiong Wang [Fri, 26 Feb 2016 16:51:33 +0000 (16:51 +0000)] 
[Testsuite] treate -specs as both cflags & ldflags

Backport from master
2014-11-11  Jiong Wang <jiong.wang@arm.com>

ld/testsuite/

  * lib/ld-lib.exp (run_ld_link_exec_tests): Append board_cflags if gcc
  driver used as link tool.
  (run_cc_link_exec_tests): Likewise.

7 years ago[Testsuite] Fix running unique tests on ARM
Jiong Wang [Fri, 26 Feb 2016 16:48:03 +0000 (16:48 +0000)] 
[Testsuite] Fix running unique tests on ARM

    Backport from master:
    2014-10-30  Will Newton  <will.newton@linaro.org>

    ld/testsuite/ChangeLog:
        * ld-unique/unique.exp: Use a wider glob for matching ARM
        targets.
        * ld-unique/unique.s: Use % instead of @ in .type directive.
        * ld-unique/unique_shared.s: Likewise.

7 years agoPR gold/17473: Fix gold build with system C++ headers that use <ctype.h>.
Roland McGrath [Thu, 17 Dec 2015 00:35:43 +0000 (16:35 -0800)] 
PR gold/17473: Fix gold build with system C++ headers that use <ctype.h>.

gold/
PR gold/17473
* binary.cc: Move #include "safe-ctype.h" to be last #include.

(cherry picked from commit 95c29a83ebadd0038fd304539a83c5e90798c1b9)

7 years agoRemove one unnecessary iteration in insertion sort
Alan Modra [Thu, 17 Sep 2015 03:23:29 +0000 (12:53 +0930)] 
Remove one unnecessary iteration in insertion sort

PR 18867
* elflink.c (elf_link_adjust_relocs): Correct start of insertion
sort main loop.

7 years agoFix slowdown in ld -r for most common case of out-of-order relocs
Alan Modra [Wed, 16 Sep 2015 08:37:03 +0000 (18:07 +0930)] 
Fix slowdown in ld -r for most common case of out-of-order relocs

I chose insertion sort since relocs are mostly sorted, but there is a
common case we can handle better;  A run of relocs put out of order
due to not linking input files in order.

PR 18867
* elflink.c (elf_link_adjust_relocs): Modify insertion sort to
insert a run.  Return status in case of malloc failure.
Adjust callers.

7 years agoDon't sort ld -r output relocs on alpha
Alan Modra [Thu, 27 Aug 2015 01:24:28 +0000 (10:54 +0930)] 
Don't sort ld -r output relocs on alpha

LITERAL/LITUSE relocs must be kept together.

PR 18867
* elf64-alpha.c (elf64_alpha_sort_relocs_p): New function.
(elf_backend_sort_relocs_p): Define.

7 years agoUse stable sort for ld -r relocs
Alan Modra [Wed, 26 Aug 2015 08:02:08 +0000 (17:32 +0930)] 
Use stable sort for ld -r relocs

A number of targets emit multiple relocs at a given r_offset, and
depend on those relocs staying in their original order.

PR 18867
* elflink.c (cmp_ext32l_r_offset, cmp_ext32b_r_offset): Delete.
(cmp_ext64l_r_offset, cmp_ext64b_r_offset): Delete.
(ext32l_r_offset, ext32b_r_offset, ext64l_r_offset, ext64b_r_offset):
New functions.
(elf_link_adjust_relocs): Use an insertion sort to sort relocs.

7 years agoMake arm_unaligned_reloc test less sensitive to disassembler output format.
Doug Kwan [Sun, 26 Jul 2015 08:30:55 +0000 (01:30 -0700)] 
Make arm_unaligned_reloc test less sensitive to disassembler output format.

9 years agoBump version to 2.25.2
Tristan Gingold [Tue, 21 Jul 2015 15:18:02 +0000 (17:18 +0200)] 
Bump version to 2.25.2

bfd/
2015-07-21  Tristan Gingold  <gingold@adacore.com>

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

binutils/
2015-07-21  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

gas/
2015-07-21  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

gprof/
2015-07-21  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

ld/
2015-07-21  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

opcodes/
2015-07-21  Tristan Gingold  <gingold@adacore.com>

* configure: Regenerate.

9 years agoRelease 2.25.1, add generated files binutils-2_25_1
Tristan Gingold [Tue, 21 Jul 2015 13:52:59 +0000 (15:52 +0200)] 
Release 2.25.1, add generated files

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 21 Jul 2015 00:00:40 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 20 Jul 2015 00:00:46 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 19 Jul 2015 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 18 Jul 2015 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 17 Jul 2015 00:00:42 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoCorrect readelf dynamic section buffer overlow test
Alan Modra [Thu, 16 Jul 2015 14:43:22 +0000 (00:13 +0930)] 
Correct readelf dynamic section buffer overlow test

PR binutils/18672
* readelf.c (get_32bit_dynamic_section): Correct buffer limit test.
(get_64bit_dynamic_section): Likewise.

9 years agoAutomatic date update in version.in
GDB Administrator [Thu, 16 Jul 2015 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Wed, 15 Jul 2015 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 14 Jul 2015 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 13 Jul 2015 00:00:51 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 12 Jul 2015 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 11 Jul 2015 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoFix an opd->adjust index in elf64-ppc.c
Richard Sandiford [Sun, 5 Jul 2015 18:56:59 +0000 (19:56 +0100)] 
Fix an opd->adjust index in elf64-ppc.c

bfd/
* elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value
plus addend rather than the original st_value when looking up
entries in opd->adjust.

ld/testsuite/
* ld-powerpc/tocopt6-inc.s, ld-powerpc/tocopt6a.s,
ld-powerpc/tocopt6b.s, ld-powerpc/tocopt6c.s,
ld-powerpc/tocopt6.d: New test.
* ld-powerpc/powerpc.exp (ppc64elftests): Add it.

9 years agoRemove ppc860, ppc750cl, ppc7450 insns from common ppc.
Alan Modra [Fri, 3 Jul 2015 01:26:26 +0000 (10:56 +0930)] 
Remove ppc860, ppc750cl, ppc7450 insns from common ppc.

Back in the day support for these processors was added, we probably
didn't want to waste PPC_OPCODE bits on minor variations.  I've had a
complaint that disassembly of mfspr/mtspr was wrong for power8.  This
patch fixes that problem.

Note that since -m860/-m850/-m821 are new gas options enabling the
mpc8xx specific mfspr/mtspr variants it is possible that this change
will break some mpc8xx assembly code.  ie. you might need to modify
makefiles to pass -m860 to gas.

include/opcode/
* ppc.h (PPC_OPCODE_750, PPC_OPCODE_7450, PPC_OPCODE_860): Define.
opcodes/
* ppc-opc.c (PPC750, PPC7450, PPC860): Define using PPC_OPCODE_*.
* ppc-dis.c (ppc_opts): Add 821, 850 and 860 entries.  Add
PPC_OPCODE_7450 to 7450 entry.  Add PPC_OPCODE_750 to 750cl entry.
gas/
* config/tc-ppc.c (md_show_usage): Add -m821, -m850, -m860.
* doc/c-ppc.texi (PowerPC-Opts): Likewise.
gas/testsuite/
* gas/ppc/titan.d: Correct mfmcsrr0 disassembly.

9 years agoPPC sync instruction accepts invalid and incompatible operands
Peter Bergner [Mon, 22 Jun 2015 19:55:24 +0000 (14:55 -0500)] 
PPC sync instruction accepts invalid and incompatible operands

ISA 2.07 added a new category called Elemental Memory Barriers that modifies
the sync instruction to accept an additional operand ESYNC.  Edmar added
support for this insruction varient here:

    https://sourceware.org/ml/binutils/2012-02/msg00221.html

Looking at this closer, I see that the insert_ls() function is misnamed
(since it's attached to the ESYNC operand, not the LS operand) but more
importantly, it is silently modifying the LS operand value behind the
users back when the LS operand is either invalid or is incompatible with
the new ESYNC operand.  The ISA 2.07 doc has an Assembler Note that clearly
states that assemblers that support the ESYNC operand should report all
invalid uses of LS and ESYNC.  This patch changes the assembler to
error out on invalid and incompatible operand usage.

opcodes/
* ppc-opc.c (insert_ls): Test for invalid LS operands.
(insert_esync): New function.
(LS, WC): Use insert_ls.
(ESYNC): Use insert_esync.

gas/testsuite/
* gas/ppc/e6500.s <sync>: Fix invalid test.
* gas/ppc/e6500.d: Likewise.

9 years agoAllow for optional operands with non-zero default values.
Peter Bergner [Fri, 19 Jun 2015 22:17:07 +0000 (17:17 -0500)] 
Allow for optional operands with non-zero default values.

ISA 2.07 (ie, POWER8) added the rfebb instruction which takes one operand
with the value of either a 0 or 1.  It also defines an extended mnemonic
with no operands (ie, "rfebb") that is supposed to be equivalent to "rfebb 1".
I implemented rfebb's lone operand with PPC_OPERAND_OPTIONAL, but the
problem is, optional operands that are ommitted always default to the
value 0, which is wrong in this case.  I have added support for allowing
non-zero default values by adding an additional flag PPC_OPERAND_OPTIONAL_VALUE
that specifies that the default operand value to be used is stored in the
SHIFT field of the operand field immediately following this one.

This fixes the rfebb issue.  I also fixed the mftb and mfcr instructions
so they use the same mechanism.  This allows us to flag invalid uses of
mfcr where we explicitly pass in a zero FXM value, like the use in a2.[sd].

include/opcode/

* ppc.h (PPC_OPERAND_OPTIONAL_VALUE): New.
(ppc_optional_operand_value): New inline function.

opcodes/
* ppc-dis.h (skip_optional_operands): Use ppc_optional_operand_value.
* ppc-opc.c (FXM4): Add non-zero optional value.
(TBR): Likewise.
(SXL): Likewise.
(insert_fxm): Handle new default operand value.
(extract_fxm): Likewise.
(insert_tbr): Likewise.
(extract_tbr): Likewise.

gas/
* config/tc-ppc.c (md_assemble): Use ppc_optional_operand_value.
Allow for optional operands without insert functions.

gas/testsuite/
* gas/ppc/power8.d: Fixup rfebb test results.
* gas/ppc/a2.s: Fix invalid mfcr test.
* gas/ppc/a2.d: Likewise.

9 years agoppc476 linker workaround shared lib fixes again
Alan Modra [Tue, 16 Jun 2015 07:17:51 +0000 (16:47 +0930)] 
ppc476 linker workaround shared lib fixes again

Huh, I can't even write a binary search properly.

bfd/
* elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of
dynamic relocs.
ld/testsuite/
* ld-powerpc/ppc476-shared.s: Repeat dynamic reloc generating insns.
* ld-powerpc/ppc476-shared.d: Update.
* ld-powerpc/ppc476-shared2.d: Update.

9 years agoRemove unused MTMSRD_L macro and re-add accidentally deleted comment.
Peter Bergner [Fri, 12 Jun 2015 20:06:07 +0000 (15:06 -0500)] 
Remove unused MTMSRD_L macro and re-add accidentally deleted comment.

In the commit that added PowerPC Pair Singles, Ben accidentally removed
a comment and re-added an unused MTMSRD_L macro Alan had recently deleted.
This was probably just an oversite when he was refreshing his patch to
trunk.

opcodes/
* ppc-opc.c: Add comment accidentally removed by old commit.
(MTMSRD_L): Delete.

9 years agoppc476 linker workaround shared lib fixes
Alan Modra [Fri, 5 Jun 2015 09:05:40 +0000 (18:35 +0930)] 
ppc476 linker workaround shared lib fixes

When building a shared lib from non-PIC objects, we'll get dynamic
text relocations.  These need to move with any insns we move.
Otherwise the dynamic reloc will modify the branch, resulting in
crashes and other unpleasant behaviour.

Also, ld -r --ppc476-workaround used with sufficiently aligned PIC
objects needs a fix for emitted REL16 relocs.

bfd/
* elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text
relocs with insns moved by --ppc476-workaround.  Correct
output of REL16 relocs.
ld/testsuite/
* ld-powerpc/ppc476-shared.s,
* ld-powerpc/ppc476-shared.lnk,
* ld-powerpc/ppc476-shared.d,
* ld-powerpc/ppc476-shared2.d: New tests.
* ld-powerpc/powerpc.exp: Run them.

9 years agoAdd hwsync extended mnemonic.
Peter Bergner [Fri, 5 Jun 2015 01:27:03 +0000 (20:27 -0500)] 
Add hwsync extended mnemonic.

This commit adds a new extended menmonic for "sync 0" (same as "sync").
The ISA documentation doesn't explicitly mention hwsync as an extended
mnemonic (yet), but it does mention "heavyweight sync" and "hwsync" as
the operation that gets performed when the sync's L field is 0.
This is only enabled for POWER4 and later.

opcodes/
* ppc-opc.c: (powerpc_opcodes) <hwsync>: New extended mnemonic.

gas/testsuite/
* gas/ppc/a2.d: Fixup test case due to new extended mnemonic.
* gas/ppc/power4.s <hwsync, lwsync, ptesync, sync>: Add tests.
* gas/ppc/power4.d: Likewise.

9 years agoNon-alloc sections don't belong in PT_LOAD segments
Alan Modra [Fri, 24 Apr 2015 09:49:37 +0000 (19:19 +0930)] 
Non-alloc sections don't belong in PT_LOAD segments

Taking them out showed a bug in the powerpc64 backend with .branch_lt
being removed from output_bfd but not from previously set up segment
section maps.  Removing the bfd sections meant their sh_flags (and
practically everything else) remaining zero, ie. not SHF_ALLOC,
triggering complaints about "`.branch_lt' can't be allocated in
segment".

include/elf/
* internal.h (ELF_SECTION_IN_SEGMENT_1): Ensure PT_LOAD and
similar segments only contain alloc sections.
ld/
* emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation):
Call gld${EMULATION_NAME}_map_segments regardless of need_laying_out.

9 years agoAlign .TOC. for PowerPC64
Alan Modra [Tue, 21 Apr 2015 09:48:24 +0000 (19:18 +0930)] 
Align .TOC. for PowerPC64

This change, with prerequisite 0e5fabeb, provides a toc base aligned
to 256 bytes rather than 8 bytes.  This is necessary for a minor gcc
optimisation, allowing use of d-form instructions to correctly access
toc-relative items larger than 8 bytes.

bfd/
* elf64-ppc.c (TOC_BASE_ALIGN): Define.
(ppc64_elf_next_toc_section): Align multi-got toc base.
(ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol.
ld/
* emulparams/elf64ppc.sh (GOT): Align.
ld/testsuite/
* ld-powerpc/ambiguousv1.d: Update for aligned .got.
* ld-powerpc/ambiguousv1b.d: Likewise.
* ld-powerpc/ambiguousv2.d: Likewise.
* ld-powerpc/defsym.d: Likewise.
* ld-powerpc/elfv2-2exe.d: Likewise.
* ld-powerpc/elfv2exe.d: Likewise.
* ld-powerpc/elfv2so.d: Likewise.
* ld-powerpc/relbrlt.d: Likewise.
* ld-powerpc/tls.g: Likewise.
* ld-powerpc/tlsexe.d: Likewise.
* ld-powerpc/tlsexe.g: Likewise.
* ld-powerpc/tlsexe.r: Likewise.
* ld-powerpc/tlsexetoc.d: Likewise.
* ld-powerpc/tlsexetoc.g: Likewise.
* ld-powerpc/tlsexetoc.r: Likewise.
* ld-powerpc/tlsso.d: Likewise.
* ld-powerpc/tlsso.g: Likewise.
* ld-powerpc/tlsso.r: Likewise.
* ld-powerpc/tlstoc.g: Likewise.
* ld-powerpc/tlstocso.d: Likewise.
* ld-powerpc/tlstocso.g: Likewise.
* ld-powerpc/tlstocso.r: Likewise.
* ld-powerpc/tocopt.d: Likewise.
* ld-powerpc/tocopt2.d: Likewise.
* ld-powerpc/tocopt3.d: Likewise.
* ld-powerpc/tocopt4.d: Likewise.
* ld-powerpc/tocopt5.d: Likewise.

9 years agoRewrite relro adjusting code
Alan Modra [Wed, 22 Apr 2015 13:16:19 +0000 (22:46 +0930)] 
Rewrite relro adjusting code

The linker tries to put the end of the last section in the relro
segment exactly on a page boundary, because the relro segment itself
must end on a page boundary.  If for any reason this can't be done,
padding is inserted.  Since the end of the relro segment is typically
between .got and .got.plt, padding effectively increases the size of
the GOT.  This isn't nice for targets and code models with limited GOT
addressing.

The problem with the current code is that it doesn't cope very well
with aligned sections in the relro segment.  When making .got aligned
to a 256 byte boundary for PowerPC64, I found that often the initial
alignment attempt failed and the fallback attempt to be less than
adequate.  This is a particular problem for PowerPC64 since the
distance between .got and .plt affects the size of plt call stubs,
leading to "stubs don't match calculated size" errors.

So this rewrite takes a direct approach to calculating a new relro
base.  Starting from the last section in the segment, we calculate
where it must start to position its end on the boundary, or as near as
possible considering alignment requirements.  The new start then
becomes the goal for the previous section to end, and so on for all
sections.  This of course ignores the possibility that user scripts
will place . = ALIGN(xxx); in the relro segment, or provide section
address expressions.  In those cases we might fail, but the old code
probably did too, and a fallback is provided.

ld/
* ldexp.h (struct ldexp_control): Delete dataseg.min_base.  Add
data_seg.relro_offset.
* ldexp.c (fold_binary <DATA_SEGMENT_ALIGN>): Don't set min_base.
(fold_binary <DATA_SEGMENT_RELRO_END>): Do set relro_offset.
* ldlang.c (lang_size_sections): Rewrite code adjusting relro
segment base to line up last section on page boundary.

9 years agopowerpc: Only initialise opcode indices once
Anton Blanchard [Wed, 25 Mar 2015 02:44:28 +0000 (13:44 +1100)] 
powerpc: Only initialise opcode indices once

The gdb TUI is calling gdb_print_insn() (which calls
disassemble_init_powerpc()) enough to show up high in profiles. As
suggested by Alan, only initialise if the indices are empty.

* ppc-dis.c (disassemble_init_powerpc): Only initialise
powerpc_opcd_indices and vle_opcd_indices once.

9 years agopowerpc: Add slbfee. instruction
Anton Blanchard [Wed, 25 Mar 2015 02:43:18 +0000 (13:43 +1100)] 
powerpc: Add slbfee. instruction

* ppc-opc.c (powerpc_opcodes): Add slbfee.

9 years agoMake powerpc bfd ld reloc overflow vs undefined symbols match gold
Alan Modra [Tue, 24 Mar 2015 07:07:57 +0000 (17:37 +1030)] 
Make powerpc bfd ld reloc overflow vs undefined symbols match gold

* elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
stubs, even those for undefined weak symbols.  Otherwise, don't
report relocation overflow on branches to undefined strong
symbols.  Fix memory leak.
* elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
overflow on branches to undefined strong symbols.

9 years agoFix powerpc gas abort on invalid instruction fixups
Alan Modra [Wed, 11 Mar 2015 07:23:50 +0000 (17:53 +1030)] 
Fix powerpc gas abort on invalid instruction fixups

* config/tc-ppc.c (md_assemble): Don't abort on 8 byte insn fixups.
(md_apply_fix): Report an error on data-only fixups used with insns.

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 10 Jul 2015 00:00:48 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Thu, 9 Jul 2015 00:00:42 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Wed, 8 Jul 2015 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years ago2015-07-06 Doug Kwan <dougkwan@google.com>
Doug Kwan [Tue, 7 Jul 2015 01:21:02 +0000 (18:21 -0700)] 
2015-07-06  Doug Kwan  <dougkwan@google.com>

Apply from master
2015-06-29  Doug Kwan  <dougkwan@google.com>

* testsuite/arm_bl_out_of_range.s: Align stub table so that it appears
  at address expected by test.
* testsuite/arm_cortex_a8_b.s: Ditto.
* testsuite/arm_cortex_a8_b_cond.s: Ditto.
* testsuite/arm_cortex_a8_bl.s: Ditto.
* testsuite/arm_cortex_a8_blx.s: Ditto.
* testsuite/arm_cortex_a8_local.s: Ditto.
* testsuite/arm_fix_v4bx.s: Ditto.
* testsuite/arm_unaligned_reloc.s: Ditto.
* testsuite/thumb_bl_out_of_range.s: Ditto.
* testsuite/thumb_bl_out_of_range_local.s: Ditto.
* testsuite/thumb_blx_out_of_range.s: Ditto.

9 years agoAutomatic date update in version.in
GDB Administrator [Tue, 7 Jul 2015 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Mon, 6 Jul 2015 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sun, 5 Jul 2015 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Sat, 4 Jul 2015 00:00:53 +0000 (00:00 +0000)] 
Automatic date update in version.in

9 years agoAutomatic date update in version.in
GDB Administrator [Fri, 3 Jul 2015 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Thu, 2 Jul 2015 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Wed, 1 Jul 2015 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Tue, 30 Jun 2015 00:00:48 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Mon, 29 Jun 2015 00:00:42 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Sun, 28 Jun 2015 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Sat, 27 Jun 2015 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Fri, 26 Jun 2015 00:00:40 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Thu, 25 Jun 2015 00:00:49 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Wed, 24 Jun 2015 00:00:40 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years ago[AArch64][Backport] Generate DT_TEXTREL for relocation against RO section
Jiong Wang [Tue, 23 Jun 2015 11:19:24 +0000 (12:19 +0100)] 
[AArch64][Backport] Generate DT_TEXTREL for relocation against RO section

2015-06-23  Jiong Wang  <jiong.wang@arm.com>

  Apply from master:
  2015-06-23  Jiong. Wang  <jiong.wang@arm.com>

  bfd/
    * elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function.
    (elfNN_aarch64_size_dynamic_sections): Traverse hash table to check
    relocations against read-only sections.

  ld/testsuite/
    * ld-aarch64/dt_textrel.s: New testcase.
    * ld-aarch64/dt_textrel.d: New expectation file.
    * ld-aarch64/aarch64-elf.exp: Run new testcase.

10 years agoAutomatic date update in version.in
GDB Administrator [Tue, 23 Jun 2015 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Mon, 22 Jun 2015 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoDon't use $< in Makefiles
Alan Modra [Sun, 21 Jun 2015 03:33:36 +0000 (13:03 +0930)] 
Don't use $< in Makefiles

$< is a GNU make feature.

* Makefile.am: Expand $<.
* Makefile.in: Regenerate.

10 years agoAutomatic date update in version.in
GDB Administrator [Sun, 21 Jun 2015 00:00:42 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Sat, 20 Jun 2015 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoImport fix for PR 18481 which corrects the generation of relocs for R_ARM_TLS_LE32.
Nick Clifton [Fri, 19 Jun 2015 11:14:33 +0000 (12:14 +0100)] 
Import fix for PR 18481 which corrects the generation of relocs for R_ARM_TLS_LE32.

PR 18481
bfd * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL.

gas * config/tc-arm.c (md_apply_fix): Add support for ADR in thumb
mode against a nearby symbol.

tests * gas/arm/tls.s: Add tests of the tpoff pseudo with a local
symbol.
* gas/arm/tls.d: Update expected output.

10 years agoAutomatic date update in version.in
GDB Administrator [Fri, 19 Jun 2015 00:00:42 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years ago[ARM][GAS] Backport "Positively emit symbols for alignment"
Renlin Li [Thu, 18 Jun 2015 11:37:42 +0000 (12:37 +0100)] 
[ARM][GAS] Backport "Positively emit symbols for alignment"

2015-06-17  Renlin Li  <renlin.li@arm.com>

Applied from master.
2015-04-28  Renlin Li  <renlin.li@arm.com>
2015-06-03  Renlin Li  <renlin.li@arm.com>

gas/
  * config/tc-arm.c (arm_init_frag): Always emit mapping symbols.

gas/testsuite/
  * gas/arm/thumb2_vpool_be.d: Adjust the desired output.
  * gas/arm/vldconst_be.d: Likewise.

ld/testsuite/
  * ld-arm/ifunc-10.dd: Adjust the desired output.
  * ld-arm/ifunc-2.dd: Likewise.

10 years ago[AArch64][GAS] Backport "Positively emit symbols for alignment"
Jiong Wang [Thu, 18 Jun 2015 11:32:19 +0000 (12:32 +0100)] 
[AArch64][GAS] Backport "Positively emit symbols for alignment"

2015-06-17  Renlin Li  <renlin.li@arm.com>

Applied from master.
2015-05-05  Renlin Li  <renlin.li@arm.com>

gas/
  * config/tc-aarch64.c (aarch64_init_frag): Always generate mapping
  symbols.

gas/testsuite/
  * gas/aarch64/mapping_5.d: New.
  * gas/aarch64/mapping_5.s: New.
  * gas/aarch64/mapping_6.d: New.
  * gas/aarch64/mapping_6.s: New.

10 years agoAutomatic date update in version.in
GDB Administrator [Thu, 18 Jun 2015 00:00:42 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Wed, 17 Jun 2015 00:01:04 +0000 (00:01 +0000)] 
Automatic date update in version.in

10 years ago[AArch64] Backport support id_mmfr4 system register
Jiong Wang [Tue, 16 Jun 2015 15:48:13 +0000 (16:48 +0100)] 
[AArch64] Backport support id_mmfr4 system register

2015-06-16  Matthew Wahab  <matthew.wahab@arm.com>

Applied from master
2015-06-16  Matthew Wahab  <matthew.wahab@arm.com>

opcode/
  * aarch64-opc.c (aarch64_sys_regs): Add "id_mmfr4_el1".

gas/testsuite/
  * sysreg.d: Add id_mmfr4_el1, update expected output.
  * sysreg.s: Add id_mmfr4_el1.

10 years agoAutomatic date update in version.in
GDB Administrator [Tue, 16 Jun 2015 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Mon, 15 Jun 2015 00:00:40 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Sun, 14 Jun 2015 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Sat, 13 Jun 2015 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Fri, 12 Jun 2015 00:00:40 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Thu, 11 Jun 2015 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Wed, 10 Jun 2015 00:00:42 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Tue, 9 Jun 2015 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Mon, 8 Jun 2015 00:00:40 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Sun, 7 Jun 2015 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Sat, 6 Jun 2015 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years ago[GOLD] Add PowerPC64 -fsplit-stack support
Alan Modra [Wed, 13 May 2015 04:42:38 +0000 (14:12 +0930)] 
[GOLD] Add PowerPC64 -fsplit-stack support

PowerPC64 ELFv1 requires a tweak to find_functions in order to return
code addresses, rather than OPD entry addresses.

* reloc.cc (Sized_relobj_file::find_functions): Use function_location.
* powerpc.cc (Target_powerpc::do_calls_non_split): New function.
(addi_12_1, addis_2_12, addis_12_1, cmpld_7_12_0): New constants.
(lis_0): Rename from lis_0_0.

10 years agoTidy PowerPC gold find_global_entry uses
Alan Modra [Tue, 28 Apr 2015 07:15:34 +0000 (16:45 +0930)] 
Tidy PowerPC gold find_global_entry uses

Completely removing the assert probably wasn't the best idea, so
reinstate it for allocated sections.  Also cope with debug info
potentially referring to a missing plt call stub.

And a tidy.  find_global_entry now returns an Address, so make temps
holding the return value of type Address, and compare against
invalid_address.

* powerpc.cc (Target_powerpc::do_dynsym_value): Use Address rather
than unsigned int for find_global_entry result temp.  Compare
against invalid_address.
(Target_powerpc::do_plt_address_for_global): Likewise.
(Target_powerpc::Relocate::relocate): Likewise.  Don't assert
on plt call stub existence for debug info.  Do assert for plt
and global entry stub existence if an alloc section.

10 years agoPowerPC gold assertion on missing global entry stub
Alan Modra [Tue, 28 Apr 2015 03:58:29 +0000 (13:28 +0930)] 
PowerPC gold assertion on missing global entry stub

Global entry stubs are used on ELFv2 to provide addresses for
functions not defined in a non-PIC executable but whose address is
taken, in much the same way as PLT stub code is used on other
targets to provide function addresses.  We don't want to insert a
global entry stub just because (bogus) debug info refers to the
address of a non-local function, but we also don't want gold to die.

* powerpc.cc (Target_powerpc::Relocate::relocate): Don't assert
on missing global entry stub due to bogus debug info.

10 years agoPR18147, relocation overflow when --unresolved-symbols=ignore-all
Alan Modra [Tue, 24 Mar 2015 05:16:50 +0000 (15:46 +1030)] 
PR18147, relocation overflow when --unresolved-symbols=ignore-all

If ignoring unresolved symbols, ignore reloc overflows too.  If not
ignoring unresolved symbols we will report an error about the symbol
being undefined, making any report about reloc overflow superfluous.

PR18147
* powerpc.cc (Target_powerpc::Relocate::relocate): Don't report
relocation errors for branches to strong undefined symbols.

10 years agoAutomatic date update in version.in
GDB Administrator [Fri, 5 Jun 2015 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years ago[AArch64] Backport fix for minimum code section alignment
Matthew Wahab [Thu, 4 Jun 2015 10:16:56 +0000 (11:16 +0100)] 
[AArch64] Backport fix for minimum code section alignment

10 years agoAutomatic date update in version.in
GDB Administrator [Thu, 4 Jun 2015 00:00:43 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Wed, 3 Jun 2015 00:00:47 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Tue, 2 Jun 2015 00:00:42 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Mon, 1 Jun 2015 00:00:45 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Sun, 31 May 2015 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Sat, 30 May 2015 00:00:44 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Fri, 29 May 2015 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Thu, 28 May 2015 00:00:41 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Wed, 27 May 2015 00:00:50 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Tue, 26 May 2015 00:00:39 +0000 (00:00 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Mon, 25 May 2015 00:01:02 +0000 (00:01 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Sun, 24 May 2015 00:01:20 +0000 (00:01 +0000)] 
Automatic date update in version.in

10 years agoAutomatic date update in version.in
GDB Administrator [Sat, 23 May 2015 00:01:27 +0000 (00:01 +0000)] 
Automatic date update in version.in