aboutsummaryrefslogtreecommitdiff
path: root/gold/x86_64.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2009-03-24 00:31:29 +0000
committerIan Lance Taylor <ian@airs.com>2009-03-24 00:31:29 +0000
commit36959681867a70c8f48055ffb22b6f037596b762 (patch)
tree46b20dfcf1d79a1ac3f5e12d2e03a0cde21e912e /gold/x86_64.cc
parentd739bf00691a4e5a8c002dc7eb5d49bb4ad95d24 (diff)
downloadgdb-36959681867a70c8f48055ffb22b6f037596b762.zip
gdb-36959681867a70c8f48055ffb22b6f037596b762.tar.gz
gdb-36959681867a70c8f48055ffb22b6f037596b762.tar.bz2
2009-03-23 Ian Lance Taylor <iant@google.com>
* 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.
Diffstat (limited to 'gold/x86_64.cc')
-rw-r--r--gold/x86_64.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/gold/x86_64.cc b/gold/x86_64.cc
index 85d69c3..6612325 100644
--- a/gold/x86_64.cc
+++ b/gold/x86_64.cc
@@ -37,6 +37,7 @@
#include "target-reloc.h"
#include "target-select.h"
#include "tls.h"
+#include "freebsd.h"
namespace
{
@@ -52,7 +53,7 @@ class Output_data_plt_x86_64;
// http://people.redhat.com/drepper/tls.pdf
// http://www.lsd.ic.unicamp.br/~oliva/writeups/TLS/RFC-TLSDESC-x86.txt
-class Target_x86_64 : public Sized_target<64, false>
+class Target_x86_64 : public Target_freebsd<64, false>
{
public:
// In the x86_64 ABI (p 68), it says "The AMD64 ABI architectures
@@ -60,7 +61,7 @@ class Target_x86_64 : public Sized_target<64, false>
typedef Output_data_reloc<elfcpp::SHT_RELA, true, 64, false> Reloc_section;
Target_x86_64()
- : Sized_target<64, false>(&x86_64_info),
+ : Target_freebsd<64, false>(&x86_64_info),
got_(NULL), plt_(NULL), got_plt_(NULL), rela_dyn_(NULL),
copy_relocs_(elfcpp::R_X86_64_COPY), dynbss_(NULL),
got_mod_index_offset_(-1U), tls_base_symbol_defined_(false)
@@ -2648,16 +2649,18 @@ Target_x86_64::do_code_fill(section_size_type length) const
// The selector for x86_64 object files.
-class Target_selector_x86_64 : public Target_selector
+class Target_selector_x86_64 : public Target_selector_freebsd
{
public:
Target_selector_x86_64()
- : Target_selector(elfcpp::EM_X86_64, 64, false, "elf64-x86-64")
+ : Target_selector_freebsd(elfcpp::EM_X86_64, 64, false, "elf64-x86-64",
+ "elf64-x86-64-freebsd")
{ }
Target*
do_instantiate_target()
{ return new Target_x86_64(); }
+
};
Target_selector_x86_64 target_selector_x86_64;