From 36959681867a70c8f48055ffb22b6f037596b762 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 24 Mar 2009 00:31:29 +0000 Subject: 2009-03-23 Ian Lance Taylor * freebsd.h: New file. * i386.cc: Include "freebsd.h". (Target_i386): Derive from Target_freebsd rather than Sized_target. (Target_selector_i386): Derive from Target_selector_freebsd rather than Target_selector. * x86_64.cc: Include "freebsd.h". (Target_x86_64): Derive from Target_freebsd rather than Sized_target. (Target_selector_x86_64): Derive from Target_selector_freebsd rather than Target_selector. * target.h (class Target): Add adjust_elf_header and do_adjust_elf_header. * output.cc (Output_file_header:: do_sized_write): Call target adjust_elf_header routine. * configure.tgt: Set targ_osabi. * configure.ac: Define GOLD_DEFAULT_OSABI. * parameters.cc (Parameters::default_target): Pass GOLD_DEFAULT_OSABI to select_target. * target-select.h (class Target_selector): Make instantiate_target protected rather than private. * Makefile.am (HFILES): Add freebsd.h. * configure, Makefile.in, config.in: Rebuild. --- gold/i386.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gold/i386.cc') diff --git a/gold/i386.cc b/gold/i386.cc index 3beacaa..ba01106 100644 --- a/gold/i386.cc +++ b/gold/i386.cc @@ -37,6 +37,7 @@ #include "target-reloc.h" #include "target-select.h" #include "tls.h" +#include "freebsd.h" namespace { @@ -50,13 +51,13 @@ class Output_data_plt_i386; // http://people.redhat.com/drepper/tls.pdf // http://www.lsd.ic.unicamp.br/~oliva/writeups/TLS/RFC-TLSDESC-x86.txt -class Target_i386 : public Sized_target<32, false> +class Target_i386 : public Target_freebsd<32, false> { public: typedef Output_data_reloc Reloc_section; Target_i386() - : Sized_target<32, false>(&i386_info), + : Target_freebsd<32, false>(&i386_info), got_(NULL), plt_(NULL), got_plt_(NULL), rel_dyn_(NULL), copy_relocs_(elfcpp::R_386_COPY), dynbss_(NULL), got_mod_index_offset_(-1U), tls_base_symbol_defined_(false) @@ -2659,11 +2660,12 @@ Target_i386::do_code_fill(section_size_type length) const // The selector for i386 object files. -class Target_selector_i386 : public Target_selector +class Target_selector_i386 : public Target_selector_freebsd { public: Target_selector_i386() - : Target_selector(elfcpp::EM_386, 32, false, "elf32-i386") + : Target_selector_freebsd(elfcpp::EM_386, 32, false, + "elf32-i386", "elf32-i386-freebsd") { } Target* -- cgit v1.1