[GOLD] Symbol flag for PowerPC64 localentry:0 tracking
[deliverable/binutils-gdb.git] / gold / target.h
index c0f24eea795e8a658d2074fc8129d82bca9bea05..cf6d902310f9f5e22d2826fda37c87b0996ddb28 100644 (file)
@@ -1,6 +1,6 @@
 // target.h -- target support for gold   -*- C++ -*-
 
-// Copyright (C) 2006-2016 Free Software Foundation, Inc.
+// Copyright (C) 2006-2017 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -119,9 +119,19 @@ class Target
   { return this->pti_->dynamic_linker; }
 
   // Return the default address to use for the text segment.
+  // If a -z max-page-size argument has set the ABI page size
+  // to a value larger than the default starting address,
+  // bump the starting address up to the page size, to avoid
+  // misaligning the text segment in the file.
   uint64_t
   default_text_segment_address() const
-  { return this->pti_->default_text_segment_address; }
+  {
+    uint64_t addr = this->pti_->default_text_segment_address;
+    uint64_t pagesize = this->abi_pagesize();
+    if (addr < pagesize)
+      addr = pagesize;
+    return addr;
+  }
 
   // Return the ABI specified page size.
   uint64_t
@@ -326,8 +336,10 @@ class Target
   // without -fsplit-stack.  SYM is known to be defined in an object
   // compiled without -fsplit-stack.
   bool
-  is_call_to_non_split(const Symbol* sym, const unsigned char* preloc) const
-  { return this->do_is_call_to_non_split(sym, preloc); }
+  is_call_to_non_split(const Symbol* sym, const unsigned char* preloc,
+                      const unsigned char* view,
+                      section_size_type view_size) const
+  { return this->do_is_call_to_non_split(sym, preloc, view, view_size); }
 
   // A function starts at OFFSET in section SHNDX in OBJECT.  That
   // function was compiled with -fsplit-stack, but it refers to a
@@ -661,7 +673,8 @@ class Target
   // default implementation is that any function not defined by the
   // ABI is a call to a non-split function.
   virtual bool
-  do_is_call_to_non_split(const Symbol* sym, const unsigned char*) const;
+  do_is_call_to_non_split(const Symbol* sym, const unsigned char*,
+                         const unsigned char*, section_size_type) const;
 
   // Virtual function which may be overridden by the child class.
   virtual void
@@ -831,7 +844,7 @@ class Sized_target : public Target
   // symbol table.  This will only be called if has_make_symbol()
   // returns true.
   virtual Sized_symbol<size>*
-  make_symbol() const
+  make_symbol(const char*, elfcpp::STT, Object*, unsigned int, uint64_t)
   { gold_unreachable(); }
 
   // Resolve a symbol for the target.  This should be overridden by a
@@ -839,7 +852,7 @@ class Sized_target : public Target
   // pre-existing symbol.  SYM is the new symbol, seen in OBJECT.
   // VERSION is the version of SYM.  This will only be called if
   // has_resolve() returns true.
-  virtual void
+  virtual bool
   resolve(Symbol*, const elfcpp::Sym<size, big_endian>&, Object*,
          const char*)
   { gold_unreachable(); }
This page took 0.025332 seconds and 4 git commands to generate.