aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
2014-06-06daily updateAlan Modra1-1/+1
2014-06-05Make it easy to make --disable-werror the default for both binutils and gdbJoel Brobecker6-6/+42
The goal of this patch is to provide an easy way to make --disable-werror the default when building binutils, or the parts of binutils that need to get built when building GDB. In development mode, we want to continue making -Werror the default with GCC. But, when making releases, I think we want to make it as easy as possible for regular users to successfully build from sources. GDB already has this kind of feature to turn -Werror as well as the use of the libmcheck library. As GDB Release Manager, I take advantage of it to turn those off after having cut the branch. I'd like to be able to do the same for the binutils bits. And perhaps Tristan will want to do the same for his releases too (not sure, binutils builders might be a little savvier than GDB builders). This patch introduces a new file, called development.sh, which just sets a variable called $development. In our development branches (Eg. "master"), it's set to true. But setting it to false would allow us to change the default behavior of various development-related features to be turned off; in this case, it turns off the use of -Werror by default (use --enable-werror to turn it back on). bfd/ChangeLog: * development.sh: New file. * warning.m4 (AM_BINUTILS_WARNINGS): Source bfd/development.sh. Make -Werror the default with GCC only if DEVELOPMENT is true. * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add $(srcdir)/development.sh. * Makefile.in, configure: Regenerate. binutils/ChangeLog: * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on bfd's development.sh. * Makefile.in, configure: Regenerate. gas/ChangeLog: * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on bfd's development.sh. * Makefile.in, configure: Regenerate. gold/ChangeLog: * Makefile.am (CONFIG_STATUS_DEPENDENCIES): New. * Makefile.in, configure: Regenerate. gprof/ChangeLog: * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on bfd's development.sh. * Makefile.in, configure: Regenerate. ld/ChangeLog: * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on bfd's development.sh. * Makefile.in, configure: Regenerate. opcodes/ChangeLog: * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add dependency on bfd's development.sh. * Makefile.in, configure: Regenerate. gdb/ChangeLog: * development.sh: Delete. * Makefile.in (config.status): Adjust dependency on development.sh. * configure.ac: Adjust development.sh source call. * configure: Regenerate. gdb/gdbserver/ChangeLog: * configure.ac: Adjust development.sh source call. * Makefile.in (config.status): Adjust dependency on development.sh. * configure: Regenerate. Tested on x86_64-linux by building two ways: One with DEVELOPMENT set to true, and one with DEVELOPMENT set to false. In the first case, I could see the use of -Werror, while it disappeared in the second case.
2014-06-05daily updateAlan Modra1-1/+1
2014-06-04bfd/elfnn-aarch64.c: Cleanup a couple of TLS functionsWill Newton2-3/+7
Add an assert and remove an unused line of code. bfd/ChangeLog: 2014-06-04 Will Newton <will.newton@linaro.org> * elfnn-aarch64.c (tpoff_base): Make test of tls_sec being non-NULL into an assert. (elfNN_aarch64_tls_relax): Remove unused code.
2014-06-04daily updateAlan Modra1-1/+1
2014-06-03* elf32-rx.c (rx_table_map): Use BFD_VMA_FMT for portability.DJ Delorie2-6/+10
2014-06-03This is to fix a further problem with merging resource sections. It turnsNick Clifton2-2/+36
out that the section is supposed to be page-aligned, but the newly merged section was not being padded out to a page boundary. This meant that when the executable was stripped a badly sized .rsrc section was written out. PR ld/16807 * peXXigen.c (rsrc_process_section): Page align the new contents befgore writing out.
2014-06-03Support fusion for ELFv2 stubsAlan Modra2-6/+21
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. gdb/ * ppc64-tdep.c (ppc64_standard_linkage8): New. (ppc64_skip_trampoline_code): Recognise ELFv2 stub supporting fusion.
2014-06-03daily updateAlan Modra1-1/+1
2014-06-02daily updateAlan Modra1-1/+1
2014-06-01daily updateAlan Modra1-1/+1
2014-05-31daily updateAlan Modra1-1/+1
2014-05-30daily updateAlan Modra1-1/+1
2014-05-29daily updateAlan Modra1-1/+1
2014-05-28Fix rx "set but not used" warningsAlan Modra2-16/+16
* elf32-rx.c (rx_table_map): Delete set but not used variables.
2014-05-28addr2line: fix missing inlined frames.Tristan Gingold2-9/+25
2014-05-28 Tristan Gingold <gingold@adacore.com> * dwarf2.c (lookup_address_in_function_table): Add best_fit_len to keep the length of the best fit range. (lookup_symbol_in_function_table, info_hash_lookup_funcinfo): Likewise.
2014-05-28daily updateAlan Modra1-1/+1
2014-05-27Add new link-map-text hook and RX auto-vector support.DJ Delorie3-0/+434
* bfd/elf32-rx.c (get_symbol_value_maybe): New. (rx_elf_relocate_section): If we find a reloc against $tableentry$default$<name>, redirect it to the appropriate $tableentry$<n>$. (RX_Table_Info): New. (rx_table_find): New. Check all tables and SEC_KEEP all sections with table parts in them. (rx_check_directives): New. (rx_table_map_2): New. (rx_table_map): New. (rx_additional_link_map_text): New. Called to dump tables to the map file. * bfd/elf32-rx.h: New. * ld/ldemul.h (extra_map_file_text): New field. (ldemul_extra_map_file_text): Declare. * ld/ldemul.c (ldemul_extra_map_file_text): Define. * ld/ldlang.c (lang_map): Call it. * ld/emultempl/rxelf.em: Add extra_map_file_text hook. * ld/emultempl/aix.em: Add NULL extra_map_file_text hook. * ld/emultempl/armcoff.em: Likewise. * ld/emultempl/beos.em: Likewise. * ld/emultempl/elf32.em: Likewise. * ld/emultempl/generic.em: Likewise. * ld/emultempl/gld960.em: Likewise. * ld/emultempl/gld960c.em: Likewise. * ld/emultempl/linux.em: Likewise. * ld/emultempl/lnk960.em: Likewise. * ld/emultempl/m68kcoff.em: Likewise. * ld/emultempl/pe.em: Likewise. * ld/emultempl/pep.em: Likewise. * ld/emultempl/sunos.em: Likewise. * ld/emultempl/ticoff.em: Likewise. * ld/emultempl/vanilla.em: Likewise.
2014-05-27daily updateAlan Modra1-1/+1
2014-05-26daily updateAlan Modra1-1/+1
2014-05-25daily updateAlan Modra1-1/+1
2014-05-24daily updateAlan Modra1-1/+1
2014-05-23daily updateAlan Modra1-1/+1
2014-05-22daily updateAlan Modra1-1/+1
2014-05-21daily updateAlan Modra1-1/+1
2014-05-20* elf32-msp430.c (msp430_elf_relax_adjust_locals): Avoid overflow.DJ Delorie2-4/+9
2014-05-20Rewrite ppc32 backend .sdata and .sdata2 handlingAlan Modra3-107/+133
1) _SDA_BASE_ and _SDA2_BASE_ and defined automatically, in a similar manner to the way _GLOBAL_OFFSET_TABLE_ is handled. It's a little more complicated to remove the symbols because _SDA_BASE_ needs to be there if either .sdata or .sbss is present, and similarly for _SDA2_BASE. 2) The linker created .sdata and .sdata2 sections used for R_PPC_EMB_SDAI16 and R_PPC_EMB_SDA2I16 pointers are created early. Nowadays we strip unneeded sections from the output, so it isn't necessary to delay creating the sections. 3) The output section for targets of various SDA relocs is now checked as per the ABI(s). We previously allowed .sdata.foo and similar, most likely because at some stage we were checking input sections. Also, the patch fixes a long-standing bug in size_input_sections that affects the values of symbols defined in stripped input sections. PR 16952 bfd/ * elf32-ppc.c (ppc_elf_create_linker_section): Move earlier. Remove redundant setting of htab->elf.dynobj. Don't align. Define .sdata symbols using _bfd_elf_define_linkage_sym. (ppc_elf_create_glink): Call ppc_elf_create_linker_section. (create_sdata_sym): Delete. (elf_allocate_pointer_linker_section): Rename from elf_create_pointer_linker_section. Align section. (ppc_elf_check_relocs): Don't call ppc_elf_creat_linker_section directly here, or create_sdata_sym. Set ref_regular on _SDA_BASE_ and _SDA2_BASE_. (ppc_elf_size_dynamic_sections): Remove ATTRIBUTE_UNUSED on param. Remove unnecessary tests on _SDA_BASE_ sym. (maybe_strip_sdasym, ppc_elf_maybe_strip_sdata_syms): New functions. (ppc_elf_relocate_section): Tighten SDA reloc symbol section checks. * elf32-ppc.h (ppc_elf_set_sdata_syms): Delete. (ppc_elf_maybe_strip_sdata_syms): Declare. ld/ * emulparams/elf32ppccommon.sh (_SDA_BASE_, _SDA2_BASE_): Delete. * emultempl/ppc32elf.em (ppc_before_allocation): Call ppc_elf_maybe_strip_sdata_syms. * ldlang.c (size_input_section): Correct output_offset value for excluded input sections.
2014-05-20daily updateAlan Modra1-1/+1
2014-05-19daily updateAlan Modra1-1/+1
2014-05-18daily updateAlan Modra1-1/+1
2014-05-17 * config.bfd: Move QNX target_cflags from arm-*-netbsd* to arm-*-nto*.Ryan Mansfield2-2/+6
2014-05-17daily updateAlan Modra1-1/+1
2014-05-16This fixes a few issues with pe/coff build-ids that were discovered since theJon Turney2-4/+91
original patches were posted: pe/coff: Display GUID build-id in the conventional way pe/coff: Don't interpret debug directory in section with no contents pe/coff: Keep .build-id with --only-keep-debug pe/coff: Don't break .build-id with objcopy/strip * peXXigen.c (pe_print_debugdata): Don't interpret debug directory in a section with no contents. (is_vma_in_section, find_section_by_vma): New functions. (_bfd_XX_bfd_copy_private_bfd_data_common): Recalculate file offsets in the debug directory. (_bfd_XXi_slurp_codeview_record, _bfd_XXi_write_codeview_record): Byte-swap GUID from little-endian to big-endian order for consistent and conventional display. * objcopy.c (is_nondebug_keep_contents_section): New function. (setup_section): Use it.
2014-05-16This adds support for marking RL78 binaries as either supporting 32-bitKaushik Phata2-0/+22
or 64-bit doubles. It also makes the linker complain if the user attempts to link together binaries with different sized doubles. * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Complain if 64-bit doubles objects mix with 32-bit doubles objects. (rl78_elf_print_private_bfd_data): Describe 64-bit doubles flag. * readelf.c (get_machine_flags): Handle RL78 64-bit doubles flag. * config/tc-rl78.c (enum options): Add OPTION_32BIT_DOUBLES and OPTION_64BIT_DOUBLES. (md_longopts): Add -m32bit-doubles and -m64bit-doubles. (md_parse_option): Parse -m32bit-doubles and -m64bit-doubles. (md_show_usage): Show all of the RL78 options. (rl78_float_cons): New static functions. (md_pseudo_table): Update handler for "double".
2014-05-16daily updateAlan Modra1-1/+1
2014-05-15daily updateAlan Modra1-1/+1
2014-05-14daily updateAlan Modra1-1/+1
2014-05-13daily updateAlan Modra1-1/+1
2014-05-12daily updateAlan Modra1-1/+1
2014-05-11daily updateAlan Modra1-1/+1
2014-05-10daily updateAlan Modra1-1/+1
2014-05-09daily updateAlan Modra1-1/+1
2014-05-08Add bfd/ChangeLog entry missing in commit.Hans-Peter Nilsson1-0/+4
* mmo.c: Update URLs in documentation comments.
2014-05-08daily updateAlan Modra1-1/+1
2014-05-08mmo.c: Update URLs in documentation comments.Hans-Peter Nilsson1-5/+5
2014-05-08Use signed data type for R_XTENSA_DIFF* relocation offsets.Volodymyr Arbatov2-15/+24
R_XTENSA_DIFF relocation offsets are in fact signed. Treat them as such. Add testcase that examines ld behaviour on R_XTENSA_DIFF relocation changing sign during relaxation. 2014-05-02 Volodymyr Arbatov <arbatov@cadence.com> David Weatherford <weath@cadence.com> Max Filippov <jcmvbkbc@gmail.com> bfd/ * elf32-xtensa.c (relax_section): treat R_XTENSA_DIFF* relocations as signed. gas/ * config/tc-xtensa.c (md_apply_fix): mark BFD_RELOC_XTENSA_DIFF* fixups as signed. ld/testsuite/ * ld-xtensa/diff_overflow.exp, * ld-xtensa/diff_overflow1.s, * ld-xtensa/diff_overflow2.s: Add test for DIFF* relocation signedness and overflow checking.
2014-05-07Add proper arm config for *-*-freebsd*.Andreas Tobler2-2/+6
2014-05-07Add MIPS r3 and r5 support.Andrew Bennett6-0/+33
This patch firstly adds support for mips32r3 mips32r5, mips64r3 and mips64r5. Secondly it adds support for the eretnc instruction. ChangeLog: bfd/ * aoutx.h (NAME (aout, machine_type)): Add mips32r3, mips64r3, mips32r5 and mips64r5. * archures.c (bfd_architecture): Likewise. * bfd-in2.h (bfd_architecture): Likewise. * cpu-mips.c (arch_info_struct): Likewise. * elfxx-mips.c (mips_set_isa_flags): Likewise. gas/ * tc-mips.c (ISA_SUPPORTS_MIPS16E): Add mips32r3, mips32r5, mips64r3 and mips64r5. (ISA_HAS_64BIT_FPRS): Likewise. (ISA_HAS_ROR): Likewise. (ISA_HAS_ODD_SINGLE_FPR): Likewise. (ISA_HAS_MXHC1): Likewise. (hilo_interlocks): Likewise. (md_longopts): Likewise. (ISA_HAS_64BIT_REGS): Add mips64r3 and mips64r5. (ISA_HAS_DROR): Likewise. (options): Add OPTION_MIPS32R3, OPTION_MIPS32R5, OPTION_MIPS64R3, and OPTION_MIPS64R5. (mips_isa_rev): Add support for mips32r3, mips32r5, mips64r3 and mips64r5. (md_parse_option): Likewise. (s_mipsset): Likewise. (mips_cpu_info_table): Add entries for mips32r3, mips32r5, mips64r3 and mips64r5. Also change p5600 entry to be mips32r5. * configure.in: Add support for mips32r3, mips32r5, mips64r3 and mips64r5. * configure: Regenerate. * doc/c-mips.texi: Document the -mips32r3, -mips32r5, -mips64r3 and -mips64r5 command line options. * doc/as.texinfo: Likewise. gas/testsuite/ * gas/mips/mips.exp: Add MIPS32r5 tests. Also add the mips32r3, mips32r5, mips64r3 and mips64r5 isas to the testsuite. * gas/mips/r5.s: New test. * gas/mips/r5.d: Likewise. include/opcode/ * mips.h (INSN_ISA_MASK): Updated. (INSN_ISA32R3): New define. (INSN_ISA32R5): New define. (INSN_ISA64R3): New define. (INSN_ISA64R5): New define. (INSN_ISA64, INSN_ISA64R2, INSN_ISA3_32, INSN_ISA3_32R2, INSN_ISA4_32 INSN_ISA4_32R2, INSN_ISA5_32R2): Renumbered. (mips_isa_table): Add entries for mips32r3, mips32r5, mips64r3 and mips64r5. (INSN_UPTO32R3): New define. (INSN_UPTO32R5): New define. (INSN_UPTO64R3): New define. (INSN_UPTO64R5): New define. (ISA_MIPS32R3): New define. (ISA_MIPS32R5): New define. (ISA_MIPS64R3): New define. (ISA_MIPS64R5): New define. (CPU_MIPS32R3): New define. (CPU_MIPS32R5): New define. (CPU_MIPS64R3): New define. (CPU_MIPS64R5): New define. opcodes/ * mips-opc.c (mips_builtin_opcodes): Add MIPS32r5 eretnc instruction. (I34): New define. (I36): New define. (I66): New define. (I68): New define. * mips-dis.c (mips_arch_choices): Add mips32r3, mips32r5, mips64r3 and mips64r5. (parse_mips_dis_option): Update MSA and virtualization support to allow mips64r3 and mips64r5.
2014-05-07daily updateAlan Modra1-1/+1
2014-05-06bfd/Richard Sandiford3-168/+77
* elfxx-mips.h (elfxx-mips.h): Declare. * elfxx-mips.c (mips_elf_merge_obj_attributes): Use it to report Tag_GNU_MIPS_ABI_FP mismatches. (_bfd_mips_fp_abi_string): New function.