aboutsummaryrefslogtreecommitdiff
path: root/gold/target.h
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/target.h
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/target.h')
-rw-r--r--gold/target.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/gold/target.h b/gold/target.h
index 79111ce..fd6766e 100644
--- a/gold/target.h
+++ b/gold/target.h
@@ -167,6 +167,12 @@ class Target
is_defined_by_abi(const Symbol* sym) const
{ return this->do_is_defined_by_abi(sym); }
+ // Adjust the output file header before it is written out. VIEW
+ // points to the header in external form. LEN is the length.
+ void
+ adjust_elf_header(unsigned char* view, int len) const
+ { return this->do_adjust_elf_header(view, len); }
+
protected:
// This struct holds the constant information for a child class. We
// use a struct to avoid the overhead of virtual function calls for
@@ -225,6 +231,14 @@ class Target
do_is_defined_by_abi(const Symbol*) const
{ return false; }
+ // Adjust the output file header before it is written out. VIEW
+ // points to the header in external form. LEN is the length, and
+ // will be one of the values of elfcpp::Elf_sizes<size>::ehdr_size.
+ // By default, we do nothing.
+ virtual void
+ do_adjust_elf_header(unsigned char*, int) const
+ { }
+
private:
Target(const Target&);
Target& operator=(const Target&);