aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2008-09-19Add plugin functionality for link-time optimization (LTO).Cary Coutant30-81/+2923
include/: * plugin-api.h: New file. gold/: * configure.ac (plugins): Add --enable-plugins option. * configure: Regenerate. * config.in: Regenerate. * Makefile.am (LIBDL): New variable. (CCFILES): Add plugin.cc. (HFILES): Add plugin.h. (ldadd_var): Add LIBDL. * Makefile.in: Regenerate. * archive.cc: Include "plugin.h". (Archive::setup): Don't preread archive symbols when using a plugin. (Archive::get_file_and_offset): Add memsize parameter. Change callers. (Archive::get_elf_object_for_member): Call plugin hooks for claiming files. (Archive::include_member): Add symbols from plugin objects. * archive.h (Archive::get_file_and_offset): Add memsize parameter. * descriptors.cc (Descriptors::open): Check for file descriptors abandoned by plugins. (Descriptors::claim_for_plugin): New function. * descriptors.h (Descriptors::claim_for_plugin): New function. (Open_descriptor::is_claimed): New field. (claim_descriptor_for_plugin): New function. * fileread.cc (File_read::claim_for_plugin): New function. * fileread.h (File_read::claim_for_plugin): New function. (File_read::descriptor): New function. * gold.cc: Include "plugin.h". (queue_initial_tasks): Add task to call plugin hooks for generating new object files. * main.cc: Include "plugin.h". (main): Load plugin libraries. * object.h (Pluginobj): Declare. (Object::pluginobj): New function. (Object::do_pluginobj): New function. (Object::set_target): New function. * options.cc: Include "plugin.h". (General_options::parse_plugin): New function. (General_options::General_options): Initialize plugins_ field. (General_options::add_plugin): New function. * options.h (Plugin_manager): Declare. (General_options): Add --plugin option. (General_options::has_plugins): New function. (General_options::plugins): New function. (General_options::add_plugin): New function. (General_options::plugins_): New field. * plugin.cc: New file. * plugin.h: New file. * readsyms.cc: Include "plugin.h". (Read_symbols::do_read_symbols): Check for archive before checking for ELF file. Call plugin hooks to claim files. * resolve.cc (Symbol_table::resolve): Record when symbol is referenced from a real object file; force override when processing replacement files. * symtab.cc (Symbol::init_fields): Initialize in_real_elf_ field. (Symbol::init_base_object): Likewise. (Symbol::init_base_output_data): Likewise. (Symbol::init_base_output_segment): Likewise. (Symbol::init_base_constant): Likewise. (Symbol::init_base_undefined): Likewise. (Symbol::output_section): Assert that object is not a plugin. (Symbol_table::add_from_pluginobj): New function. (Symbol_table::sized_finalize_symbol): Treat symbols from plugins as undefined. (Symbol_table::sized_write_globals): Likewise. (Symbol_table::add_from_pluginobj): Instantiate template. * symtab.h (Sized_pluginobj): Declare. (Symbol::in_real_elf): New function. (Symbol::set_in_real_elf): New function. (Symbol::in_real_elf_): New field. (Symbol_table::add_from_pluginobj): New function. * testsuite/Makefile.am (AM_CFLAGS): New variable. (LIBDL): New variable. (LDADD): Add LIBDL. (check_PROGRAMS): Add plugin_test_1 and plugin_test_2. (check_SCRIPTS): Add plugin_test_1.sh and plugin_test_2.sh. (check_DATA): Add plugin_test_1.err and plugin_test_2.err. (MOSTLYCLEANFILES): Likewise. * testsuite/Makefile.in: Regenerate. * testsuite/plugin_test.c: New file. * testsuite/plugin_test_1.sh: New file. * testsuite/plugin_test_2.sh: New file.
2008-09-192008-09-19 Andrew Stubbs <ams@codesourcery.com>Andrew Stubbs2-1/+5
* MAINTAINERS: Update my email address.
2008-09-192008-09-19 Andrew Stubbs <ams@codesourcery.com>Andrew Stubbs2-0/+22
* frame.c (get_frame_register_bytes): Detect bad debug info.
2008-09-19 * write.c (TC_FORCE_RELOCATION_SUB_LOCAL): Heed md_register_arithmetic.Alan Modra9-25/+45
(TC_VALIDATE_FIX_SUB): Likewise. * config/tc-frv.h (TC_FORCE_RELOCATION_SUB_LOCAL): Likewise. * config/tc-hppa.h (TC_FORCE_RELOCATION_SUB_LOCAL): Likewise. * config/tc-mn10300.h (TC_VALIDATE_FIX_SUB): Likewise. * config/tc-sh.h (TC_VALIDATE_FIX_SUB): Likewise. (TC_FORCE_RELOCATION_SUB_LOCAL): Likewise. * config/tc-sh64.h (TC_VALIDATE_FIX_SUB): Likewise. * config/tc-xtensa.h (TC_VALIDATE_FIX_SUB): Likewise. * doc/internals.texi (TC_FORCE_RELOCATION_SUB_ABS, TC_FORCE_RELOCATION_SUB_LOCAL, TC_VALIDATE_FIX_SUB): Show new param.
2008-09-19 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Handle vxworksAlan Modra2-10/+24
_GLOBAL_OFFSET_TABLE_ in .got.plt section. Add BFD_ASSERTs.
2008-09-19 * write.c (md_register_arithmetic): Define.Alan Modra3-10/+30
(fixup_segment): Adjust TC_FORCE_RELOCATION_SUB_ABS invocation. Modify error message when registers involved. (TC_FORCE_RELOCATION_SUB_ABS): Heed md_register_arithmetic. * config/tc-sh.h (TC_FORCE_RELOCATION_SUB_ABS): Likewise.
2008-09-19daily updateAlan Modra1-1/+1
2008-09-19*** empty log message ***gdbadmin1-1/+1
2008-09-18 * elf32-xtensa.c (elf_xtensa_check_relocs): Check for negative refcount.Bob Wilson2-3/+17
2008-09-18daily updateAlan Modra1-1/+1
2008-09-18*** empty log message ***gdbadmin1-1/+1
2008-09-17 Fix a crash on uninitialized ECS->EVENT_THREAD for a newly found thread.Jan Kratochvil2-8/+18
* infrun.c (wait_for_inferior): Move this ECS->EVENT_THREAD initialization ... (fetch_inferior_event): ... and this ECS->EVENT_THREAD initialization ... (handle_inferior_event): ... here after the add_thread call together with the local adjust_pc_after_break and reinit_frame_cache calls.
2008-09-17bfd/Jan Kratochvil8-4/+156
PR 6893 - Do not consider FDEs for discarded sections as invalid. * elf-eh-frame.c (_bfd_elf_parse_eh_frame): New REQUIRE_CLEARED_RELOCS. Consider FDEs with cleared relocations as valid and ignorable. ld/testsuite/ * ld-elf/eh-group.exp, ld-elf/eh-group1.s, ld-elf/eh-group2.s: New test. binutils/ Suppress warnings on NONE relocations to discarded sections. * readelf.c (is_none_reloc): New function. (debug_apply_relocations): Ignore is_none_reloc() relocations.
2008-09-17 Fix testcases compilation failures due to unused variables.Jan Kratochvil3-17/+34
* ld-elfcomm/common1b.c (dummy1): Mark the variable for GCC as USED. * ld-shared/main.c (main): Move the P variable only to the places where it is used.
2008-09-17daily updateAlan Modra1-1/+1
2008-09-17*** empty log message ***gdbadmin1-1/+1
2008-09-16 * breakpoint.c (bpstat_stop_status): Clear breakpoint_at forDavid Daney2-3/+14
all hardware bpstats.
2008-09-16 * gstdint.h: Delete.Joel Brobecker2-33/+4
2008-09-16 * target-reloc.h (relocate_section): Check whether a symbol isIan Lance Taylor9-8/+20
defined by the ABI before reporting an undefined symbol error. * target.h (Target::is_defined_by_abi): Make parameter const. (Target::do_is_defined_by_abi): Likewise. * i386.cc (Target_i386::do_is_defined_by_abi): Likewise. * powerpc.cc (Target_powerpc::do_is_defined_by_abi): Likewise. * sparc.cc (Target_sparc::do_is_defined_by_abi): Likewise. * x86_64.cc (Target_x86_64::do_is_defined_by_abi): Likewise. * testsuite/Makefile.am (tls_test_shared.so): Add -Wl,-z,defs. * testsuite/Makefile.in: Rebuild.
2008-09-16 * fileread.cc (make_view): Add casts to avoid warning.Ian Lance Taylor2-1/+7
2008-09-16bfd/H.J. Lu6-12/+72
2008-09-16 H.J. Lu <hongjiu.lu@intel.com> PR ld/6877 * elflink.c (_bfd_elf_merge_symbol): Allow a common symbol to override the function in a shared library. ld/testsuite/ 2008-09-16 H.J. Lu <hongjiu.lu@intel.com> PR ld/6877 * ld-elf/comm1.c: New. * ld-elf/func1.c: Likewise. * ld-elf/shared.exp: Add tests for libfunc1.so and comm1.
2008-09-16 PR 6844Alan Modra2-62/+57
* elf32-ppc.c (SYM_VAL): Define. Use throughout to find symbol vma. (ppc_elf_relocate_section): Correct GOT offset calculation. (ppc_elf_finish_dynamic_symbol): Use PPC_HA and PPC_LO. (ppc_elf_finish_dynamic_sections): Likewise. Error if htab->elf.hgot symbol is not defined in htab->got section.
2008-09-16* i386.cc (Target_i386::define_tls_base_symbol): Update comments.Alexandre Oliva3-4/+9
* x86_64.cc (Target_x86_64::define_tls_base_symbol): Likewise.
2008-09-16* options.h (General_options::output_is_executable): New.Alexandre Oliva4-2/+32
(General_options::output_is_pie): New. * i386.cc (Target_i386::define_tls_base_symbol): Use SEGMENT_START for shared libraries. * x86_64.cc (Target_x86_64::define_tls_base_symbol): Likewise.
2008-09-16*** empty log message ***gdbadmin1-1/+1
2008-09-16daily updateAlan Modra1-1/+1
2008-09-15 PR 6888Alan Modra2-11/+37
* elf32-ppc.c (ppc_elf_relocate_section): Handle NULL symbol section on R_PPC_TOC16, R_PPC_SDAREL16, R_PPC_EMB_SDA2REL, R_PPC_EMB_SDA21, R_PPC_EMB_RELSDA, R_PPC_SECTOFF* relocs.
2008-09-15* infcall.c (generic_push_dummy_code): Remove.Mark Kettenis2-45/+10
(push_dummy_code): Unconditionally call gdbarch_push_dummy_code.
2008-09-15 * dwarf2read.c (struct abbrev_info): Make members name, form 16 bits.Doug Evans2-4/+9
(struct attribute): Ditto.
2008-09-15 * gas/all/gas.exp: Don't run redef tests on a bunch of targets.Alan Modra3-11/+29
* gas/elf/elf.exp: Likewise.
2008-09-15 * write.c (install_reloc): Correct EMIT_SECTION_SYMBOLS test.Alan Modra2-2/+6
2008-09-15 * config/tc-frv.c (md_apply_fix): Use abs_section_sym forAlan Modra3-4/+21
relocs with no symbol. * config/tc-mmix.c (md_assemble): Mark fake symbol on BFD_RELOC_MMIX_BASE_PLUS_OFFSET as OK for use by relocs. (mmix_md_end): Likewise mark mmix reg contents section symbol.
2008-09-15 * hppa-linux-tdep.c (hppa_linux_sigtramp_frame_unwind_cache): RecordDave Anglin2-2/+8
HPPA_IPSW_REGNUM and HPPA_SAR_REGNUM values.
2008-09-15 * hppa-linux-tdep.c (hppa_dwarf_reg_to_regnum): Remove surroundingDave Anglin3-19/+22
"#if 0" "#endif". Fix mapping of DWARF DBX registers to GDB registers. Correct arguments and improve comments. (hppa_linux_init_abi): Call set_gdbarch_dwarf2_reg_to_regnum. Delete disabled code. * hppa-tdep.c (hppa64_dwarf_reg_to_regnum): Fix check for floating point DBX register, change error to warning, and improve comments.
2008-09-15 * dwarf2read.c (struct die_info): Make members tag, num_attrs 16 bits.Doug Evans2-4/+15
2008-09-15*** empty log message ***gdbadmin1-1/+1
2008-09-15daily updateAlan Modra1-1/+1
2008-09-14 * hppa-linux-tdep.c (hppa_linux_supply_fpregset): Correct iteration.Dave Anglin2-2/+6
2008-09-14Add new tests for z80Arnold Metselaar18-0/+1581
2008-09-14Fix bugs in the disassembly of some ld-instructionsArnold Metselaar2-1/+10
2008-09-14 * defs.h (GCC_GENERATED_STDINT_H): Define.Joel Brobecker2-0/+18
2008-09-14Fix Opcode generation of ld a,(bc) and ld a,(de) on target z80Arnold Metselaar2-1/+6
2008-09-14*** empty log message ***gdbadmin1-1/+1
2008-09-14daily updateAlan Modra1-1/+1
2008-09-13 * varobj.c (varobj_set_display_format): Use xfree.Tom Tromey7-14/+20
* tracepoint.c (stringify_collection_list): Use xfree. * remote-fileio.c (remote_fileio_reset): Use xfree. * mipsread.c (read_alphacoff_dynamic_symtab): Use xfree. * dfp.c (decimal_from_floating): Use xfree, xstrprintf. Don't use asprintf. * cp-support.c (mangled_name_to_comp): Use xfree.
2008-09-13 * ada-lang.c (remove_extra_symbols): Remove stub symbols ifJoel Brobecker2-142/+127
the associated complete symbol is also in the list. (ada_add_local_symbols, ada_add_non_local_symbols): New functions, extracted out from ada_lookup_symbol_list. (ada_lookup_symbol_list): Use them. Remove the search through the minimal symbols.
2008-09-13 * dwarf2read.c (add_partial_subprogram): New procedure.Joel Brobecker2-18/+69
(scan_partial_symbols): Use it. (load_partial_dies): Read in children of subprogram and lexical blocks for Ada compilation units.
2008-09-13 * gdb.mi/mi-nonstop.exp: Do not check thread state while aDaniel Jacobowitz4-20/+42
stop is pending. Avoid ".*" when two stops are pending. * lib/gdb.exp (fullname_syntax_POSIX, fullname_syntax_UNC) (fullname_syntax_DOS_CASE, fullname_syntax_DOS): Do not match newlines in fullnames. * lib/mi-support.exp (mi_run_cmd): Do not require an anchor. (mi_expect_stop): Update comments. Only anchor in sync mode. Do not match newlines. (mi_send_resuming_command_raw): Always return status. (mi_get_stop_line): Do not match more than one line by accident. Only anchor in sync mode. (mi_run_inline_test): If -exec-next fails, give up.
2008-09-13 * symfile.c (build_id_verify): Free 'found'.Tom Tromey2-1/+9
(find_separate_debug_file): Use xfree, not free.
2008-09-13*** empty log message ***gdbadmin1-1/+1