Commit Graph

10467 Commits

Author SHA1 Message Date
Alan Modra 34e02e2590 daily update 2013-05-24 00:00:05 +00:00
Alan Modra 03ae2d5e4f * format.c (bfd_check_format_matches): Don't match a target in
targ_selvecs if some other target is a better match.  If
	targets implement match priority, fall back to the first of
	the best matches.
2013-05-23 03:35:59 +00:00
Alan Modra 2c573464eb daily update 2013-05-23 00:00:05 +00:00
Alan Modra ad3d91277b PR binutils/15462
* elfxx-mips.c (_bfd_mips_elf_relocate_section): Warning fix.
2013-05-22 08:39:52 +00:00
Alan Modra 5b3905f13a PR binutils/15474
* srec.c (srec_set_section_contents): Properly convert size
	and offset to address when octets_per_byte is not unity.
2013-05-22 06:13:59 +00:00
Alan Modra 65bff914ee daily update 2013-05-22 00:00:05 +00:00
Alan Modra 954f389075 daily update 2013-05-21 00:00:04 +00:00
Maciej W. Rozycki 8be65dd3d9 * elf32-vax.c (elf_vax_instantiate_got_entries): Only set the
refcount member of the gotplt_union when resetting the reference
	count.  Adjust comment.
2013-05-20 23:28:32 +00:00
Will Newton 593f8f2938 bfd/elf64-aarch64.c: Remove dead code.
The relocs_copied member is never assigned a non-NULL value, so
this code does not appear to be used.

bfd/ChangeLog:

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

	* elf64-aarch64.c (elf64_aarch64_link_hash_entry): Remove
	relocs_copied member.
	(elf64_aarch64_link_hash_newfunc): Remove initialization of
	relocs_copied member.
	(elf64_aarch64_copy_indirect_symbol): Remove code to copy
	relocs_copied member.
2013-05-20 13:26:40 +00:00
Alan Modra 94b7bb3559 daily update 2013-05-20 00:00:04 +00:00
Maciej W. Rozycki a0f0eb1e92 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Convert K&R
function definition.
2013-05-19 21:40:00 +00:00
Alan Modra f3018c5d82 daily update 2013-05-19 00:00:07 +00:00
Alan Modra d4dd980d61 daily update 2013-05-18 00:00:06 +00:00
Alan Modra 67cb00443b daily update 2013-05-17 00:00:06 +00:00
Cary Coutant af65e5888e bfd/
* ecoff.c (ecoff_link_check_archive_element): Add initializers for
	external_ext_size and esize.
2013-05-16 16:34:51 +00:00
Tristan Gingold 9f6e76f4ea bfd/
2013-05-16  Tristan Gingold  <gingold@adacore.com>

	* coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_16.
	* coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.


gas/
2013-05-16  Tristan Gingold  <gingold@adacore.com>

	* config/tc-ppc.c (ppc_is_toc_sym): Symbols of class XMC_TC
	are also TOC symbols.
2013-05-16 15:41:40 +00:00
Alan Modra d5c48113b6 daily update 2013-05-16 00:00:06 +00:00
Andreas Schwab c495064deb * elf64-aarch64.c (elf_backend_default_execstack): Define to 0. 2013-05-15 06:51:19 +00:00
Alan Modra ffc95def8f daily update 2013-05-15 00:00:06 +00:00
Alan Modra 152af37f7f daily update 2013-05-14 00:00:06 +00:00
Alan Modra 175caf72ec daily update 2013-05-13 00:00:06 +00:00
Alan Modra 293228cd92 daily update 2013-05-12 00:00:06 +00:00
Alan Modra 4f8f8ad1bd daily update 2013-05-11 00:00:06 +00:00
Joel Brobecker 110a61d342 XCOFF/AIX: Remove SEC_ALLOC flags for unmapped sections.
The .except, .loader and .typchk are not mapped to memory,
so do not set their SEC_ALLOC flag.

bfd/ChangeLog:

        * coffcode.h (styp_to_sec_flags) [RS6000COFF_C]: Add handling
        of STYP_EXCEPT, STYP_LOADER and STYP_TYPCHK sections.

ld/testsuite/ChangeLog:

        * ld-powerpc/aix-core-sec-1.hd, ld-powerpc/aix-core-sec-2.hd,
        ld-powerpc/aix-core-sec-3.hd: Adjust expected section flags
        for section .loader.
2013-05-10 13:08:24 +00:00
Alan Modra 4e45246814 daily update 2013-05-10 00:00:05 +00:00
Joel Brobecker ceae87f3fe Use fputc in place of putc to avoid -Wunused-value warning (AIX).
Currently, bfd does not compile with -Wunused-value because
the following code:

        val = putc ('\n', f);

gets expanded into some code that triggers a warning:

        warning: value computed is not used [-Wunused-value]

This is because putc is implemented as a macro...

>#define putc(__x, __p)  (((!((__p)->_flag & 0xC000)) && \
>                        ((__p)->_flag = ((__p)->_flag  & 0x3FFF) | 0x8000)),\
>                        (--(__p)->_cnt < 0 ? \
>                        __flsbuf((unsigned char) (__x), (__p)) : \
>                        (int) (*(__p)->_ptr++ = (unsigned char) (__x))))

It's the first part, before the coma operator, which triggers
the unused-value warning.

This patch fixes the issue by simply avoiding the macro and using
fputc instead.

bfd/ChangeLog:

        * bfd.c (_bfd_default_error_handler): Replace use of putc
        by fputc.  Add comment explaining why.
2013-05-09 06:58:16 +00:00
Alan Modra 9055c47acd daily update 2013-05-09 00:00:05 +00:00
Alan Modra 012b2306cc * elflink.c (elf_link_add_object_symbols): Don't omit reading
of symbols when hashes already exist.
2013-05-08 23:31:38 +00:00
Alan Modra 2f9ea77e8a daily update 2013-05-08 00:00:06 +00:00
Will Newton 7b70956dc8 bfd/elf-ifunc.c: Add header size arg to _bfd_elf_allocate_ifunc_dyn_relocs.
bfd/ChangeLog:

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

	* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Add a
	plt_header_size argument for ports where it differs from
	plt_entry_size.
	* elf-bfd.h: Likewise.
	* elf32-i386.c: Pass plt_header_size to
	_bfd_elf_allocate_ifunc_dyn_relocs.
	* elf64-x86-64.c: Likewise.
2013-05-07 17:03:52 +00:00
Will Newton 1ee9e8b3d2 bfd/elf-ifunc.c: Remove unused function _bfd_elf_create_ifunc_dyn_reloc.
bfd/ChangeLog:

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

        * elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Remove unused
	function.
	* elf-bfd.h: Likewise.
2013-05-07 17:01:12 +00:00
Alan Modra db237b7f45 daily update 2013-05-07 00:00:04 +00:00
Catherine Moore b47468a6db 2013-05-06 Paul Brook <paul@codesourcery.com>
include/elf/
        * mips.h (R_MIPS_PC32): Update comment.

        * elf64-mips.c (elf_mips_gnu_pcrel32): New.
        (bfd_elf64_bfd_reloc_type_lookup, bfd_elf64_bfd_reloc_name_lookup,
        mips_elf64_rtype_to_howto): Handle R_MIPS_PC32.
        * elfn32-mips.c (elf_mips_gnu_pcrel32): New.
        (bfd_elfn32_bfd_reloc_type_lookup, bfd_elfn32_bfd_reloc_name_lookup,
        mips_elfn32_rtype_to_howto): Handle R_MIPS_PC32.

2013-05-06  Paul Brook  <paul@codesourcery.com>
	    Catherine Moore  <clm@codesourcery.com>

        gas/
        * config/tc-mips.c (md_pcrel_from): Handle BFD_RELOC_32_PCREL.
        (limited_pcrel_reloc_p): Likewise.
	(md_apply_fix): Likewise.
	(tc_gen_reloc): Likewise.
2013-05-06 15:25:45 +00:00
Alan Modra 128205bb36 * elf64-ppc.c (opd_entry_value): Handle case where symbol
hashes are not available.
2013-05-06 09:32:55 +00:00
Alan Modra f45794cb51 * elflink.c (elf_link_add_object_symbols): Don't save symbol
hashes around loading as-needed library.  Zero them on allocation,
	and restore to initial all-zero state if library not needed.
	Arrange to reuse hashes if we load library again later.
2013-05-06 08:45:40 +00:00
Alan Modra 90767a0a53 daily update 2013-05-06 00:00:06 +00:00
Alan Modra 8733d1bff8 daily update 2013-05-05 00:00:05 +00:00
Richard Sandiford d150b1a28f bfd/
* elf32-mips.c (elf_mips_copy_howto, elf_mips_jump_slot_howto):
	Use _bfd_mips_elf_generic_reloc instead of bfd_elf_generic_reloc.
	* elfn32-mips.c: Likewise.
	* elf64-mips.c: Likewise.
2013-05-04 09:33:08 +00:00
Alan Modra 00c3d0edb0 daily update 2013-05-04 00:00:05 +00:00
Alan Modra a8d69dfe49 daily update 2013-05-03 00:00:05 +00:00
Nick Clifton 13761a1136 * archures.c: Add some more MSP430 machine numbers.
* config.bfd (msp430): Define targ_selvecs.
	* configure.in: Add bfd_elf32_msp430_ti_vec.
	* cpu-msp430.c: Add some more MSP430 machine numbers.
	* elf32-msp430.c Add support for MSP430X relocations.
	Add support for TI compiler generated relocations.
	Add support for sym_diff relocations.
	Add support for relaxing out of range short branches into long
	branches.
	Add support for MSP430 attribute section.
	* reloc.c: Add MSP430X relocations.
	* targets.c: Add bfd_elf32_msp430_ti_vec.
	* bfd-in2.h: Regenerate.
	* configure: Regenerate.
	* libbfd.h: Regenerate.

	* readelf.c: Add support for MSP430X architecture.

	* readelf.exp: Expect -wi test to fail for the MSP430.

	* config/tc-msp430.c: Add support for the MSP430X architecture.
	Add code to insert a NOP instruction after any instruction that
	might change the interrupt state.
	Add support for the LARGE memory model.
	Add code to initialise the .MSP430.attributes section.
	* config/tc-msp430.h: Add support for the MSP430X architecture.
	* doc/c-msp430.texi: Document the new -mL and -mN command line
	options.
	* NEWS: Mention support for the MSP430X architecture.

	* gas/all/gas.exp: Skip the DIFF1 test for the MSP430.
	Expect the FORWARD test to pass for the MSP430.
	Skip the REDEF tests for the MSP430.
	Expect the 930509A test to fail for the MSP430.
	* gas/all/sleb128-4.d: Skip for the MSP430.
	* gas/elf/elf.exp: Set target_machine to msp430 for the MSP430.
	Skip the EHOPT0 test for the MSP430.
	Skip the REDEF and EQU-RELOC tests for the MSP430.
	* gas/elf/section2.e-msp430: New file.
	* gas/lns/lns-big-delta.d: Remove expectation of 20-bit
	addresses.
	* gas/lns/lns.exp: Use alternate LNS COMMON test for the MSP430.
	* gas/msp430/msp430x.s: New test.
	* gas/msp430/msp430x.d: Expected disassembly.
	* gas/msp430/msp430.exp: Run new test.
	* gas/msp430/opcode.d: Update expected disassembly.

	* msp430.h: Add MSP430X relocs.
	Add some more MSP430 machine numbers.
	Add values used by .MSP430.attributes section.

	* msp430.h: Add patterns for MSP430X instructions.

	* Makefile.am: Add emsp430X.c
	* Makefine.in: Regenerate.
	* configure.tgt (msp430): Add msp430X emulation.
	* ldmain.c (multiple_definition): Only disable relaxation if it
	was enabled by the user.
	* ldmain.h (RELAXATION_ENABLED_BY_USER): New macro.
	* emulparams/msp430all.sh: Add support for MSP430X.
	* emultempl/generic.em: (before_parse): Enable relaxation for the
	MSP430.
	* scripttempl/msp430.sc: Reorganize sections.  Add .rodata
	section.
	* scripttempl/msp430_3.sc: Likewise.
	* NEWS: Mention support for MSP430X.

	* ld-elf/flags1.d: Expect this test to pass on the MSP430.
	* ld-elf/init-fini-arrays.d: Expect this test to fail on the
	MSP430.
	* ld-elf/merge.d: Expect this test to pass on the MSP430.
	* ld-elf/sec64k.exp: Skip these tests for the MSP430.
	* ld-gc/pr13683.d: Expect this test to fail on the MSP430.
	* ld-srec/srec.exp: Expect these tests to fail on the MSP430.
	* ld-undefined/undefined.exp: Expect the UNDEFINED LINE test to
	fail on the MSP430.

	* msp430-dis.c: Add support for MSP430X instructions.
2013-05-02 21:06:15 +00:00
Alan Modra f693e90f2a daily update 2013-05-02 00:00:05 +00:00
Maciej W. Rozycki df26367c79 bfd/
* config.bfd: Replace alpha*-*-linuxecoff* pattern with
	alpha*-*-linux*ecoff*.

	binutils/testsuite/
	* lib/binutils-common.exp (is_elf_format): Also exclude
	*-*-linux*ecoff*.

	gas/
	* configure.tgt: Replace alpha*-*-linuxecoff* pattern with
	alpha*-*-linux*ecoff*.

	ld/
	* configure.tgt: Replace alpha*-*-linuxecoff* pattern with
	alpha*-*-linux*ecoff*.  Update the `sed' pattern used to convert
	from alpha*-*-linux-* to alpha*-*-linux*ecoff*.
2013-05-01 17:27:46 +00:00
Alan Modra 49fcdb99e2 daily update 2013-05-01 00:00:05 +00:00
Nick Clifton ed54588daf PR binutils/15417
* elflink.c (elf_link_add_object_symbols): Initialise 'idx' to
	zero.
2013-04-30 12:13:09 +00:00
Alan Modra b829706801 * elflink.c (bfd_elf_record_link_assignment): Dont make
STV_INTERNAL symbols STV_HIDDEN.
2013-04-30 01:05:18 +00:00
Alan Modra dee737d745 daily update 2013-04-30 00:00:04 +00:00
Nick Clifton b40bf0a255 * elflink.c (_bfd_elf_gc_mark_extra_sections): Remove mark from
fragmented .debug_line sections associated with unmarked code
	sections.

	* dwarf.c (read_debug_line_header): New function.  Reads in a
	header in a .debug_line section.
	(display_debug_lines_raw): Use new function.  Handle fragmentary
	.debug_line sections.
	(display_debug_lines_decoded): Likewise.
	* readelf.c (process_section_headers): Handle fragmenatry
	.debug_line sections.
	(display_debug_section): Likewise.

	* as.c (Options): Add -gdwarf-sections.
	(parse_args): Likewise.
	* as.h (flag_dwarf_sections): Declare.
	* dwarf2dbg.c (emit_fixed_inc_line_addr): Skip section changes.
	(process_entries): When -gdwarf-sections is enabled generate
	fragmentary .debug_line sections.
	(out_debug_line): Set the section for the .debug_line section end
	symbol.
	* doc/as.texinfo: Document -gdwarf-sections.
	* NEWS: Mention -gdwarf-sections.

	* gas/elf/dwarf2-3.d: Fix expected readelf output.

	* scripttempl/DWARF.sc: Add support for .debug_line.* and
	.debug_line_end.
2013-04-29 13:38:59 +00:00
Will Newton aba8c3de87 bfd/efl32-arm.c: Fix handling of IRELATIVE relocs.
bfd/ChangeLog:

2013-04-24  Will Newton  <will.newton@linaro.org>

	* elf32-arm.c (elf32_arm_populate_plt_entry): Call
	elf32_arm_add_dynreloc when emitting R_ARM_IRELATIVE relocs.

ld/testsuite/ChangeLog:

2013-04-24  Will Newton  <will.newton@linaro.org>

	* ld-arm/arm-elf.exp: Add IFUNC test 17.
	* ld-arm/ifunc-17.dd: New file.
	* ld-arm/ifunc-17.gd: Likewise.
	* ld-arm/ifunc-17.rd: Likewise.
	* ld-arm/ifunc-17.s: Likweise.
	* ld-arm/ifunc-1.rd: Reorder relocs to match linker output.
	* ld-arm/ifunc-2.rd: Likewise.
	* ld-arm/ifunc-5.rd: Likewise.
	* ld-arm/ifunc-6.rd: Likewise.
2013-04-29 09:48:32 +00:00
Nick Clifton 7fcfd62ddc * elf64-aarch64.c (elf64_aarch64_check_relocs): Move relocation
error check up and add error message.
2013-04-29 08:33:51 +00:00