]> git.ipfire.org Git - thirdparty/binutils-gdb.git/log
thirdparty/binutils-gdb.git
10 years agodaily update
Alan Modra [Wed, 27 Aug 2014 00:00:34 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Tue, 26 Aug 2014 00:00:14 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Mon, 25 Aug 2014 00:00:18 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Sun, 24 Aug 2014 00:00:32 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Sat, 23 Aug 2014 00:12:32 +0000 (09:42 +0930)] 
daily update

10 years agoFix PR ld/17277: bogus dynamic relocs and TEXTREL for ARM PC-relative relocs
Roland McGrath [Wed, 20 Aug 2014 17:12:57 +0000 (10:12 -0700)] 
Fix PR ld/17277: bogus dynamic relocs and TEXTREL for ARM PC-relative relocs

bfd/
PR ld/17277
* elf32-arm.c (elf32_arm_check_relocs): Increment P->pc_count for
all reloc types with pc_relative set in the howto, not just for
R_ARM_REL32 and R_ARM_REL32_NOI.
(allocate_dynrelocs_for_symbol): Update comment.
(elf32_arm_gc_sweep_hook): For all reloc types with pc_relative
set in the howto, set call_reloc_p and may_need_local_target_p but
not may_become_dynamic_p; not only for R_ARM_REL32 and R_ARM_REL32_NOI.
(elf32_arm_check_relocs): Likewise.

ld/testsuite/
PR ld/17277
* ld-arm/pcrel-shared.s: New file.
* ld-arm/pcrel-shared.rd: New file.
* ld-arm/arm-elf.exp (armelftests_common): Add it.

(cherry picked from commit 469a34932ae4208240e98c843b01ea1f00892137)

10 years agodaily update
Alan Modra [Fri, 22 Aug 2014 00:31:31 +0000 (10:01 +0930)] 
daily update

10 years agodaily update
Alan Modra [Wed, 20 Aug 2014 00:00:39 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Tue, 19 Aug 2014 00:00:39 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Mon, 18 Aug 2014 00:00:16 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Sun, 17 Aug 2014 00:00:18 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Sat, 16 Aug 2014 00:00:28 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Fri, 15 Aug 2014 00:00:36 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Thu, 14 Aug 2014 00:00:35 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Wed, 13 Aug 2014 00:00:34 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Tue, 12 Aug 2014 00:00:24 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Mon, 11 Aug 2014 00:00:16 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Sun, 10 Aug 2014 00:00:28 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Sat, 9 Aug 2014 00:00:21 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Fri, 8 Aug 2014 00:00:38 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Thu, 7 Aug 2014 00:00:23 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Wed, 6 Aug 2014 00:00:33 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Tue, 5 Aug 2014 00:00:25 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Mon, 4 Aug 2014 00:00:33 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Sun, 3 Aug 2014 00:00:31 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Sat, 2 Aug 2014 00:00:31 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Fri, 1 Aug 2014 00:00:18 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Thu, 31 Jul 2014 00:00:18 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Wed, 30 Jul 2014 00:00:25 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Tue, 29 Jul 2014 00:00:20 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Mon, 28 Jul 2014 00:00:18 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Sun, 27 Jul 2014 00:00:32 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Sat, 26 Jul 2014 00:00:21 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Fri, 25 Jul 2014 00:00:18 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Thu, 24 Jul 2014 00:00:18 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Wed, 23 Jul 2014 00:00:21 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Tue, 22 Jul 2014 00:00:17 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Mon, 21 Jul 2014 00:01:15 +0000 (09:31 +0930)] 
daily update

10 years agodaily update
Alan Modra [Sun, 20 Jul 2014 00:00:14 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Sat, 19 Jul 2014 00:00:17 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Fri, 18 Jul 2014 00:00:18 +0000 (09:30 +0930)] 
daily update

10 years agoProperly handle EVEX register aliases
Ilya Tocar [Thu, 17 Jul 2014 09:59:32 +0000 (13:59 +0400)] 
Properly handle EVEX register aliases

gas/

* config/tc-i386.c (parse_register): Set need_vrex.

gas/testsuite/

* gas/i386/x86-64-equ.d: New.
* gas/i386/x86-64-equ.s: New.
* gas/i386/i386.exp: Run x86-64-equ.

10 years agodaily update
Alan Modra [Thu, 17 Jul 2014 00:00:23 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Wed, 16 Jul 2014 00:00:29 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Tue, 15 Jul 2014 00:00:20 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Mon, 14 Jul 2014 00:00:27 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Sun, 13 Jul 2014 00:00:32 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Sat, 12 Jul 2014 00:00:17 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Fri, 11 Jul 2014 00:00:33 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Thu, 10 Jul 2014 00:00:46 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Wed, 9 Jul 2014 00:00:43 +0000 (09:30 +0930)] 
daily update

10 years agoFix disasm of vmovsd/vmovss with different length values.
Ilya Tocar [Tue, 8 Jul 2014 09:45:43 +0000 (13:45 +0400)] 
Fix disasm of vmovsd/vmovss with different length values.

gas/testsuite

* gas/i386/evex-lig256-intel.d: Updated.
* gas/i386/evex-lig256.d: Updated.
* gas/i386/evex-lig512-intel.d: Updated.
* gas/i386/evex-lig512-intel.d: Updated.
* gas/i386/x86-64-evex-lig256-intel.d: Updated.
* gas/i386/x86-64-evex-lig256.d: Updated.
* gas/i386/x86-64-evex-lig512-intel.d: Updated.
* gas/i386/x86-64-evex-lig512-intel.d: Updated.

opcodes

* i386-dis-evex.h (EVEX_W_0F10_P_1_M_1): Fix vmovss.
(EVEX_W_0F10_P_3_M_1): Fix vmovsd.

10 years agodaily update
Alan Modra [Tue, 8 Jul 2014 00:00:17 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Mon, 7 Jul 2014 00:00:16 +0000 (09:30 +0930)] 
daily update

10 years agodaily update
Alan Modra [Sun, 6 Jul 2014 00:00:25 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Sat, 5 Jul 2014 00:00:57 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Fri, 4 Jul 2014 00:00:40 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Thu, 3 Jul 2014 00:00:41 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Wed, 2 Jul 2014 00:00:38 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Tue, 1 Jul 2014 00:00:16 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Mon, 30 Jun 2014 00:42:20 +0000 (10:12 +0930)] 
daily update

11 years agodaily update
Alan Modra [Sat, 28 Jun 2014 00:00:17 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Fri, 27 Jun 2014 00:00:17 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Thu, 26 Jun 2014 00:00:17 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Wed, 25 Jun 2014 00:00:17 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Tue, 24 Jun 2014 00:00:38 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Mon, 23 Jun 2014 00:00:14 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Sun, 22 Jun 2014 00:00:15 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Sat, 21 Jun 2014 00:00:16 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Fri, 20 Jun 2014 00:00:17 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Thu, 19 Jun 2014 00:00:41 +0000 (09:30 +0930)] 
daily update

11 years agoDon't free linker hash table
Alan Modra [Wed, 18 Jun 2014 00:21:10 +0000 (09:51 +0930)] 
Don't free linker hash table

PR 17047
* ldlang.c (lang_finish): Don't free linker hash table.

11 years agodaily update
Alan Modra [Wed, 18 Jun 2014 00:00:31 +0000 (09:30 +0930)] 
daily update

11 years agoFix duplicated assignments to __rel_iplt and __rela_iplt symbols
Alan Modra [Mon, 16 Jun 2014 12:51:16 +0000 (22:21 +0930)] 
Fix duplicated assignments to __rel_iplt and __rela_iplt symbols

* scripttempl/elf.sc: Edit out __rela_iplt symbol assignments from
.rel sections, and __rel_iplt from .rela sections.

11 years agodaily update
Alan Modra [Tue, 17 Jun 2014 00:00:36 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Mon, 16 Jun 2014 00:00:16 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Sun, 15 Jun 2014 00:00:37 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Sat, 14 Jun 2014 00:00:40 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Fri, 13 Jun 2014 00:00:41 +0000 (09:30 +0930)] 
daily update

11 years agoRegenerate msp430 file to pick up cosmetic changes
Alan Modra [Sun, 8 Jun 2014 03:12:26 +0000 (12:42 +0930)] 
Regenerate msp430 file to pick up cosmetic changes

* msp430-decode.c: Regenerate.

11 years agoPROVIDE in linker script vs. built-in symbols
Alan Modra [Sat, 7 Jun 2014 04:28:53 +0000 (13:58 +0930)] 
PROVIDE in linker script vs. built-in symbols

* ldexp.c (exp_fold_tree_1 <etree_provide>): Make PROVIDEd
linker script symbol value override a built-in linker symbol.

11 years agoAllow both signed and unsigned fields in PowerPC cmpli insn
Alan Modra [Sat, 7 Jun 2014 02:39:04 +0000 (12:09 +0930)] 
Allow both signed and unsigned fields in PowerPC cmpli insn

There are legitimate reasons to allow a signed value in a cmpli insn
field, for example to test for a "stw r1,lock@sdarel(r13)" instruction
in user code, a kernel might use
subis r3,r3,STW_R1_0R13@ha # subtract off high part
cmplwi r3,lock@sdarel # is low part accessing lock?
Since the lock@sdarel may take a range of -32768 to 32767,
the allowed range of cmpli immediate must be at least [-32768,65535].

bfd/
* elf32-ppc.c (ppc_elf_relocate_section): Treat field of cmpli
insn as a bitfield; Use complain_overflow_bitfield.
* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
opcodes/
* ppc-opc.c (UISIGNOPT): Define and use with cmpli.
gas/
* config/tc-ppc.c (ppc_insert_operand): Handle PPC_OPERAND_SIGNOPT
on unsigned fields.  Comment on PPC_OPERAND_SIGNOPT signed fields
in 64-bit mode.
gold/
* powerpc.cc (relocate): Treat field of cmpli insn as a bitfield.

11 years agoSupport fusion for ELFv2 stubs
Alan Modra [Tue, 3 Jun 2014 01:25:29 +0000 (10:55 +0930)] 
Support fusion for ELFv2 stubs

Power8 fuses addis,addi and addis,ld sequences when the target of the
addis is the same as the addi/ld.  Thus
    addis r12,r2,xxx@ha
    addi r12,r12,xxx@l / ld r12,xxx@l(r12)
is faster than
    addis r11,r2,xxx@ha
    addi r12,r11,xxx@l / ld r12,xxx@l(r11)
So use the form that allows fusion in plt call and branch stubs.

bfd/
* elf64-ppc.c (ADDIS_R12_R2): Define.
(build_plt_stub): Support fusion on ELFv2 stub.
(ppc_build_one_stub): Likewise for plt branch stubs.
gold/
* powerpc.cc (addis_12_2): Define.
(Stub_table::do_write): Support fusion on ELFv2 stubs.
ld/testsuite/
* ld-powerpc/elfv2exe.d: Update for changed plt call stubs.

11 years agoFix gold plugin_test failures on PowerPC64 ELFv2
Alan Modra [Tue, 3 Jun 2014 01:17:55 +0000 (10:47 +0930)] 
Fix gold plugin_test failures on PowerPC64 ELFv2

readelf output for ELFv2 includes st_other bits specifying a
function's local entry offset.

* testsuite/plugin_test.c (parse_readelf_line): Skip non-visibility
st_other output.

11 years agoFix PowerPC64 ELFv2 icf_safe failures
Alan Modra [Sun, 1 Jun 2014 12:31:44 +0000 (22:01 +0930)] 
Fix PowerPC64 ELFv2 icf_safe failures

ELFv2 doesn't use .opd, so folding function code can't be allowed
in safe mode if a function's address might be taken.

* powerpc.cc (Target_powerpc::local_reloc_may_be_function_pointer):
Only ignore relocs on ELFv1.
(Target_powerpc::global_reloc_may_be_function_pointer): Likewise.

11 years agoFix testsuite to use newly-built linker for ehdr_start_test_4, and fix
Cary Coutant [Fri, 30 May 2014 17:21:27 +0000 (10:21 -0700)] 
Fix testsuite to use newly-built linker for ehdr_start_test_4, and fix
check script to look for the right binding.

gold/
* testsuite/Makefile.am (ehdr_start_test_4): Fix typo in -B option.
* testsuite/Makefile.in: Regenerate.
* testsuite/ehdr_start_test_4.sh: Look for "U" instead of "w".

11 years agoFix "overflow in PLT unwind data" warning
Alan Modra [Thu, 15 May 2014 09:07:43 +0000 (18:37 +0930)] 
Fix "overflow in PLT unwind data" warning

When linking statically, it's possible to hit this warning with IFUNC
or very large executables, due to .glink being unused.

* powerpc.cc (do_plt_fde_location): Handle zero length .glink.
Compare FDE contents with DW_CFA_nop rather than 0.

11 years agoReferencing a function's address on PowerPC64 ELFv2
Alan Modra [Tue, 25 Mar 2014 04:42:48 +0000 (15:12 +1030)] 
Referencing a function's address on PowerPC64 ELFv2

ELFv2 needs to create plt entries in a non-PIC executable for an
address reference to a function defined in a shared object.  It's
possible that an object file has no features that distinguish it as
ELFv1 or ELFv2, eg. an object only containing data.  Such files need
to be handled like those that are known to be ELFv2.
However, this unnecessarily creates plt entries for the analogous
ELFv1 case, so arrange to set output abi version earlier, and use the
output abi version to further distinguish ambiguous input files.

bfd/
* elf64-ppc.c (ppc64_elf_check_relocs): Account for possibly
needed plt entries when taking the address of functions for
abiversion == 0 (ie. unknown) as well as abiversion == 2.
Move opd setup and abiversion checks to..
(ppc64_elf_before_check_relocs): ..here.  Renamed from
ppc64_elf_process_dot_syms.  Set output abiversion from input and
input abiversion from output, if either is not set.
(ppc64_elf_merge_private_bfd_data): Don't merge flags here.
(elf_backend_check_directives): Update.
ld/testsuite/
* ld-powerpc/startv1.s, * ld-powerpc/startv2.s, * ld-powerpc/funref.s,
* ld-powerpc/funv1.s, * ld-powerpc/funv2.s,
* ld-powerpc/ambiguousv1.d, * ld-powerpc/ambiguousv2.d: New test files.
* ld-powerpc/powerpc.exp: Run new tests.

11 years agoFix overflow handling of VLE_SDA21
Alan Modra [Fri, 14 Mar 2014 04:31:53 +0000 (15:01 +1030)] 
Fix overflow handling of VLE_SDA21

bfd/
* elf32-ppc.c (ppc_elf_relocate_section): Correct overflow
handling for VLE_SDA21 relocs.
ld/testsuite/
* ld-powerpc/vle.ld: Place .PPC.EMB.sdata0 within 32k of 0.
* ld-powerpc/vle-reloc-3.d: Update.

11 years agoBetter overflow checking for powerpc32 relocations
Alan Modra [Sat, 8 Mar 2014 02:35:06 +0000 (13:05 +1030)] 
Better overflow checking for powerpc32 relocations

Similar to the powerpc64 patch, this improves overflow checking in
elf32-ppc.c.  Many reloc "howto" entries needed fixes, some just
cosmetic.

The patch also fixes the R_PPC_VLE_SDA21 reloc application code, which
was horribly broken.  In fact, it may still be broken since Power ISA
2.07 says e_li behaves as
   RT <- EXTS(li20 1:4 || li20 5:8 || li20 0 || li20 9:19)
where li20 is a field taken from bits 17..20, 11..15, 21..31 of the
instruction.  Freescale VLEPEM says differently, and I assume
correctly, that
   RT <- EXTS(li20 0:3 || li20 4:8 || li20 9:19)
The VLE_SDA21 relocation description matches this too.

Now the VLE_SDA21 relocation specifies in the case where e_addi16 is
converted to e_li for symbols in .PPC.EMB.sdata0 or .PPC.EMB.sbss0
(no base register), that the field is restricted to 16 bits, with the
sign bit being propagated to the top 4 bits.  I don't see the sense in
restricting the value like this, so have allowed the full 20 bit
signed value.  This of course is compatible with the reloc description
in that values in the 16 bit signed range will result in exactly the
same insn field as when the reloc description is followed to the
letter.

* elf32-ppc.c (ppc_elf_howto_raw): Correct overflow check for
many relocations.  Correct bitsize and rightshift too for a number
of VLE relocs.  Describe R_PPC_VLE_SDA21 and R_PPC_VLE_SDA21_LO.
Correct dst_mask on R_PPC_VLE_SDA21_LO.
(ppc_elf_vle_split16): Tidy, delete unnecessary prototype.
(ppc_elf_relocate_section): Modify overflow test for 16-bit
fields in instructions to signed/unsigned according to whether
the field takes a signed or unsigned value.  Tidy vle split16 code.
Correct R_PPC_VLE_SDA21 and R_PPC_VLE_SDA21_LO handling.

11 years agoBetter overflow checking for powerpc64 relocations
Alan Modra [Thu, 6 Mar 2014 23:44:30 +0000 (10:14 +1030)] 
Better overflow checking for powerpc64 relocations

R_PPC64_ADDR16 is used in three contexts:
- .short data relocation
- 16-bit signed insn fields, eg. addi
- 16-bit unsigned insn fields, eg. ori
In the first case we want to allow both signed and unsigned 16-bit
values, the latter two ought to error if the field exceeds the range
of values allowed for 16-bit signed and unsigned integers
respectively.  These conflicting requirements meant that ld had to
choose the least restrictive overflow checks, and thus it is possible
to construct testcases where an addi field overflows but is not
reported by ld.  Many relocations dealing with 16-bit insn fields have
this problem.  What's more, some relocations that are only ever used
for signed fields of instructions woodenly copied the lax overflow
checking of R_PPC64_ADDR16.

bfd/
* elf64-ppc.c (ppc64_elf_howto_raw): Use complain_overflow_signed
for R_PPC64_ADDR14, R_PPC64_ADDR14_BRTAKEN, R_PPC64_ADDR14_BRNTAKEN,
R_PPC64_SECTOFF, R_PPC64_ADDR16_DS, R_PPC64_SECTOFF_DS,
R_PPC64_REL16 entries.  Use complain_overflow_dont for R_PPC64_TOC.
(ppc64_elf_relocate_section): Modify overflow test for 16-bit
fields in instructions to signed/unsigned according to whether
the field takes a signed or unsigned value.
gold/
* powerpc.cc (Powerpc_relocate_functions::Overflow_check): Add
CHECK_UNSIGNED, CHECK_LOW_INSN, CHECK_HIGH_INSN.
(Powerpc_relocate_functions::has_overflow_unsigned): New function.
(Powerpc_relocate_functions::has_overflow_bitfield,
overflowed): Use the above.
(Target_powerpc::Relocate::relocate): Correct overflow checking
for a number of relocations.  Modify overflow test for 16-bit
fields in instructions to signed/unsigned according to whether
the field takes a signed or unsigned value.

11 years agoControl powerpc64-ld provision of register save/restore
Alan Modra [Wed, 19 Feb 2014 03:53:12 +0000 (14:23 +1030)] 
Control powerpc64-ld provision of register save/restore

This patch allows the user to override powerpc64-ld's default for
providing linker generated register save and restore functions as used
by gcc -Os code.  Normally these are not provided by ld -r, so Linux
kernel modules have needed to include their own copies.

bfd/
* elf64-ppc.h (struct ppc64_elf_params): Add save_restore_funcs.
* elf64-ppc.c (ppc64_elf_func_desc_adjust): Use it to control
provision of out-of-line register save/restore routines.
ld/
* emultempl/ppc64elf.em (params): Init new field.
(ppc_create_output_section_statements): Set params.save_restore_funcs
default.
(PARSE_AND_LIST_*): Add support for --save-restore-funcs and
--no-save-restore-funcs.

11 years agoConsolidate ppc64 ld/bfd communication
Alan Modra [Mon, 17 Feb 2014 06:38:00 +0000 (17:08 +1030)] 
Consolidate ppc64 ld/bfd communication

Moves assorted variables used to communicate between ld and bfd into
a struct, hooks it into the bfd link_hash_table early, and removes
all other places where such variables were passed piecemeal.

bfd/
* elf64-ppc.h (struct ppc64_elf_params): Define.
(ppc64_elf_init_stub_bfd, ppc64_elf_edit_opd, ppc64_elf_tls_setup,
ppc64_elf_setup_section_lists, ppc64_elf_size_stubs,
ppc64_elf_build_stubs): Update prototype.
* elf64-ppp.c (struct ppc_link_hash_table): Add params, delete other
fields now in params.  Adjust code throughout file.
(ppc64_elf_init_stub_bfd): Delete "abfd" parameter, add "params".
Save params pointer in htab.
(ppc64_elf_edit_opd, ppc64_elf_tls_setup,
ppc64_elf_setup_section_lists, ppc64_elf_size_stubs,
ppc64_elf_build_stubs): Remove parameters now in "params".
ld/
* emultemps/ppc64elf.em (params): New static struct replacing
various other static vars.  Adjust code throughout file.

11 years agoPR15530, mark symbol in executables if it matches dynamic_list
Alan Modra [Wed, 12 Feb 2014 10:38:01 +0000 (21:08 +1030)] 
PR15530, mark symbol in executables if it matches dynamic_list

For powerpc64 as HJ did earlier for other ELF targets, and a tidy.

PR gold/15530
* elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
--export-dynamic and --dynamic-list marking of symbols.
* elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Reorder
cheap tests first.

11 years agoMark symbol in executables if it matches dynamic_list
H.J. Lu [Thu, 6 Feb 2014 17:44:25 +0000 (09:44 -0800)] 
Mark symbol in executables if it matches dynamic_list

bfd/

PR gold/16530
* elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Mark symbol in
executables if it matches dynamic_list.

ld/testsuite/

PR gold/16530
* ld-elf/dynamic-1.c: New file.
* ld-elf/dynamic-1.rd: Likewise.
* ld-elf/dynamic-1.syms: Likewise.

* ld-elf/shared.exp (build_tests): Add dynamic-1.

11 years agoError on shared lib call to @local ifunc
Alan Modra [Mon, 13 Jan 2014 03:21:16 +0000 (13:51 +1030)] 
Error on shared lib call to @local ifunc

On powerpc32, making ifuncs have non-default visibility in shared
libraries or pies can result in runtime failures.  The problem is that
if gcc is told that a given function has non-default visibility, then
calls to that function are assumed to be local (which is true) and
thus need not go via a plt call stub (which is false for ifunc).  If
the caller has no other reason to set up the got pointer (r30), code
won't be emitted to do so.  However, a pic plt call stub makes use of
r30 to load the plt entry.  So a call to an ifunc, which always needs
a plt entry, will fail.

This patch makes ld emit an error for the problem case, and allows
calls to non-default visibility ifuncs to work in normal executables.
I also fix some cases where ifuncs fail when using the old bss-plt.

* elf32-ppc.c (ppc_elf_check_relocs): For @local call to ifunc,
error when shared and force a plt call otherwise.
(ppc_elf_size_dynamic_sections): Don't emit DT_PPC_GOT unless
plt_type == PLT_NEW.
(ppc_elf_relocate_section): Add missing test to resolve ifuncs to
the appropriate call stub.

11 years agodaily update
Alan Modra [Thu, 12 Jun 2014 00:00:17 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Wed, 11 Jun 2014 00:00:40 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Tue, 10 Jun 2014 00:00:17 +0000 (09:30 +0930)] 
daily update

11 years agodaily update
Alan Modra [Mon, 9 Jun 2014 00:00:16 +0000 (09:30 +0930)] 
daily update