X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;ds=inline;f=gold%2Fsymtab.h;h=104429a5af13b8fe6c4b1ebb8a623b8c43ddb205;hb=refs%2Fheads%2Fgdb-11-branch-vfork-fixes-2022-01-17;hp=edf1c1729c46a4bd19cddf6b55450085c6bddded;hpb=dc8d2d90da3f191ae0461900ab98e3b29cc2b280;p=deliverable%2Fbinutils-gdb.git diff --git a/gold/symtab.h b/gold/symtab.h index edf1c1729c..104429a5af 100644 --- a/gold/symtab.h +++ b/gold/symtab.h @@ -1,6 +1,6 @@ // symtab.h -- the gold symbol table -*- C++ -*- -// Copyright (C) 2006-2017 Free Software Foundation, Inc. +// Copyright (C) 2006-2021 Free Software Foundation, Inc. // Written by Ian Lance Taylor . // This file is part of gold. @@ -344,6 +344,11 @@ class Symbol set_in_dyn() { this->in_dyn_ = true; } + // Return whether this symbol is defined in a dynamic object. + bool + from_dyn() const + { return this->source_ == FROM_OBJECT && this->object()->is_dynamic(); } + // Return whether this symbol has been seen in a real ELF object. // (IN_REG will return TRUE if the symbol has been seen in either // a real ELF object or an object claimed by a plugin.) @@ -909,7 +914,7 @@ class Symbol // Instances of this class should always be created at a specific // size. Symbol() - { memset(this, 0, sizeof *this); } + { memset(static_cast(this), 0, sizeof *this); } // Initialize the general fields. void @@ -1575,6 +1580,10 @@ class Symbol_table saw_undefined() const { return this->saw_undefined_; } + void + set_has_gnu_output() + { this->has_gnu_output_ = true; } + // Allocate the common symbols void allocate_commons(Layout*, Mapfile*); @@ -1976,6 +1985,8 @@ class Symbol_table // The number of global dynamic symbols (including forced-local symbols), // or 0 if none. unsigned int dynamic_count_; + // Set if a STT_GNU_IFUNC or STB_GNU_UNIQUE symbol will be output. + bool has_gnu_output_; // The symbol hash table. Symbol_table_type table_; // A pool of symbol names. This is used for all global symbols.