return true;
const Symbol_table* symtab = this->symtab_;
- const Sized_symbol<size>* psa;
- psa = symtab->get_sized_symbol SELECT_SIZE_NAME(size) (pa
- SELECT_SIZE(size));
- const Sized_symbol<size>* psb;
- psb = symtab->get_sized_symbol SELECT_SIZE_NAME(size) (pb
- SELECT_SIZE(size));
+ const Sized_symbol<size>* psa = symtab->get_sized_symbol<size>(pa);
+ const Sized_symbol<size>* psb = symtab->get_sized_symbol<size>(pb);
typename Sized_symbol<size>::Size_type sa = psa->symsize();
typename Sized_symbol<size>::Size_type sb = psb->symsize();
else
{
any = true;
- Sized_symbol<size>* ssym;
- ssym = this->get_sized_symbol SELECT_SIZE_NAME(size) (
- sym
- SELECT_SIZE(size));
+ Sized_symbol<size>* ssym = this->get_sized_symbol<size>(sym);
if (ssym->value() > addralign)
addralign = ssym->value();
}
Symbol* sym = *p;
if (sym == NULL)
break;
-
- Sized_symbol<size>* ssym;
- ssym = this->get_sized_symbol SELECT_SIZE_NAME(size) (sym
- SELECT_SIZE(size));
-
+ Sized_symbol<size>* ssym = this->get_sized_symbol<size>(sym);
off = align_address(off, ssym->value());
-
ssym->allocate_common(poc, off);
-
off += ssym->symsize();
}
/* Define to 1 if you have the `mallinfo' function. */
#undef HAVE_MALLINFO
-/* Whether the C++ compiler can call a template member with no arguments */
-#undef HAVE_MEMBER_TEMPLATE_SPECIFICATIONS
-
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
done
-echo "$as_me:$LINENO: checking template member calls" >&5
-echo $ECHO_N "checking template member calls... $ECHO_C" >&6
-if test "${gold_cv_c_membertemplates+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-
-class c { public: template<int i> void fn(); };
-template<int i> void foo(c cv) { cv.fn<i>(); }
-template void foo<1>(c cv);
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_cxx_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- gold_cv_c_membertemplates=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-gold_cv_c_membertemplates=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $gold_cv_c_membertemplates" >&5
-echo "${ECHO_T}$gold_cv_c_membertemplates" >&6
-
-if test "$gold_cv_c_membertemplates" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MEMBER_TEMPLATE_SPECIFICATIONS
-_ACEOF
-
-fi
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
AC_CHECK_HEADERS(ext/hash_map ext/hash_set)
AC_CHECK_FUNCS(mallinfo)
-dnl Test whether the compiler can specify a member templates to call.
-AC_CACHE_CHECK([template member calls], [gold_cv_c_membertemplates],
-[AC_COMPILE_IFELSE([
-class c { public: template<int i> void fn(); };
-template<int i> void foo(c cv) { cv.fn<i>(); }
-template void foo<1>(c cv);],
-[gold_cv_c_membertemplates=yes], [gold_cv_c_membertemplates=no])])
-
-if test "$gold_cv_c_membertemplates" = "yes"; then
- AC_DEFINE(HAVE_MEMBER_TEMPLATE_SPECIFICATIONS, [],
- [Whether the C++ compiler can call a template member with no arguments])
-fi
-
AC_LANG_POP(C++)
AM_MAINTAINER_MODE
template<int size, bool big_endian>
unsigned char*
-Verdef::write(const Stringpool* dynpool, bool is_last, unsigned char* pb
- ACCEPT_SIZE_ENDIAN) const
+Verdef::write(const Stringpool* dynpool, bool is_last, unsigned char* pb) const
{
const int verdef_size = elfcpp::Elf_sizes<size>::verdef_size;
const int verdaux_size = elfcpp::Elf_sizes<size>::verdaux_size;
template<int size, bool big_endian>
unsigned char*
Verneed::write(const Stringpool* dynpool, bool is_last,
- unsigned char* pb ACCEPT_SIZE_ENDIAN) const
+ unsigned char* pb) const
{
const int verneed_size = elfcpp::Elf_sizes<size>::verneed_size;
const int vernaux_size = elfcpp::Elf_sizes<size>::vernaux_size;
unsigned int local_symcount,
const std::vector<Symbol*>& syms,
unsigned char** pp,
- unsigned int* psize
- ACCEPT_SIZE_ENDIAN) const
+ unsigned int* psize) const
{
gold_assert(this->is_finalized_);
void
Versions::def_section_contents(const Stringpool* dynpool,
unsigned char** pp, unsigned int* psize,
- unsigned int* pentries
- ACCEPT_SIZE_ENDIAN) const
+ unsigned int* pentries) const
{
gold_assert(this->is_finalized_);
gold_assert(!this->defs_.empty());
for (p = this->defs_.begin(), i = 0;
p != this->defs_.end();
++p, ++i)
- pb = (*p)->write SELECT_SIZE_ENDIAN_NAME(size, big_endian)(
- dynpool, i + 1 >= this->defs_.size(), pb
- SELECT_SIZE_ENDIAN(size, big_endian));
+ pb = (*p)->write<size, big_endian>(dynpool,
+ i + 1 >= this->defs_.size(),
+ pb);
gold_assert(static_cast<unsigned int>(pb - pbuf) == sz);
void
Versions::need_section_contents(const Stringpool* dynpool,
unsigned char** pp, unsigned int *psize,
- unsigned int *pentries
- ACCEPT_SIZE_ENDIAN) const
+ unsigned int *pentries) const
{
gold_assert(this->is_finalized_);
gold_assert(!this->needs_.empty());
for (p = this->needs_.begin(), i = 0;
p != this->needs_.end();
++p, ++i)
- pb = (*p)->write SELECT_SIZE_ENDIAN_NAME(size, big_endian)(
- dynpool, i + 1 >= this->needs_.size(), pb
- SELECT_SIZE_ENDIAN(size, big_endian));
+ pb = (*p)->write<size, big_endian>(dynpool,
+ i + 1 >= this->needs_.size(),
+ pb);
gold_assert(static_cast<unsigned int>(pb - pbuf) == sz);
unsigned int,
const std::vector<Symbol*>&,
unsigned char**,
- unsigned int*
- ACCEPT_SIZE_ENDIAN_EXPLICIT(32, false)) const;
+ unsigned int*) const;
#endif
#ifdef HAVE_TARGET_32_BIG
unsigned int,
const std::vector<Symbol*>&,
unsigned char**,
- unsigned int*
- ACCEPT_SIZE_ENDIAN_EXPLICIT(32, true)) const;
+ unsigned int*) const;
#endif
#ifdef HAVE_TARGET_64_LITTLE
unsigned int,
const std::vector<Symbol*>&,
unsigned char**,
- unsigned int*
- ACCEPT_SIZE_ENDIAN_EXPLICIT(64, false)) const;
+ unsigned int*) const;
#endif
#ifdef HAVE_TARGET_64_BIG
unsigned int,
const std::vector<Symbol*>&,
unsigned char**,
- unsigned int*
- ACCEPT_SIZE_ENDIAN_EXPLICIT(64, true)) const;
+ unsigned int*) const;
#endif
#ifdef HAVE_TARGET_32_LITTLE
const Stringpool*,
unsigned char**,
unsigned int*,
- unsigned int*
- ACCEPT_SIZE_ENDIAN_EXPLICIT(32, false)) const;
+ unsigned int*) const;
#endif
#ifdef HAVE_TARGET_32_BIG
const Stringpool*,
unsigned char**,
unsigned int*,
- unsigned int*
- ACCEPT_SIZE_ENDIAN_EXPLICIT(32, true)) const;
+ unsigned int*) const;
#endif
#ifdef HAVE_TARGET_64_LITTLE
const Stringpool*,
unsigned char**,
unsigned int*,
- unsigned int*
- ACCEPT_SIZE_ENDIAN_EXPLICIT(64, false)) const;
+ unsigned int*) const;
#endif
#ifdef HAVE_TARGET_64_BIG
const Stringpool*,
unsigned char**,
unsigned int*,
- unsigned int*
- ACCEPT_SIZE_ENDIAN_EXPLICIT(64, true)) const;
+ unsigned int*) const;
#endif
#ifdef HAVE_TARGET_32_LITTLE
const Stringpool*,
unsigned char**,
unsigned int*,
- unsigned int*
- ACCEPT_SIZE_ENDIAN_EXPLICIT(32, false)) const;
+ unsigned int*) const;
#endif
#ifdef HAVE_TARGET_32_BIG
const Stringpool*,
unsigned char**,
unsigned int*,
- unsigned int*
- ACCEPT_SIZE_ENDIAN_EXPLICIT(32, true)) const;
+ unsigned int*) const;
#endif
#ifdef HAVE_TARGET_64_LITTLE
const Stringpool*,
unsigned char**,
unsigned int*,
- unsigned int*
- ACCEPT_SIZE_ENDIAN_EXPLICIT(64, false)) const;
+ unsigned int*) const;
#endif
#ifdef HAVE_TARGET_64_BIG
const Stringpool*,
unsigned char**,
unsigned int*,
- unsigned int*
- ACCEPT_SIZE_ENDIAN_EXPLICIT(64, true)) const;
+ unsigned int*) const;
#endif
} // End namespace gold.
// Write contents to buffer.
template<int size, bool big_endian>
unsigned char*
- write(const Stringpool*, bool is_last, unsigned char*
- ACCEPT_SIZE_ENDIAN) const;
+ write(const Stringpool*, bool is_last, unsigned char*) const;
private:
Verdef(const Verdef&);
// Write contents to buffer.
template<int size, bool big_endian>
unsigned char*
- write(const Stringpool*, bool is_last, unsigned char*
- ACCEPT_SIZE_ENDIAN) const;
+ write(const Stringpool*, bool is_last, unsigned char*) const;
private:
Verneed(const Verneed&);
symbol_section_contents(const Symbol_table*, const Stringpool*,
unsigned int local_symcount,
const std::vector<Symbol*>& syms,
- unsigned char**, unsigned int*
- ACCEPT_SIZE_ENDIAN) const;
+ unsigned char**, unsigned int*) const;
// Build an allocated buffer holding the contents of the version
// definition section (.gnu.version_d).
template<int size, bool big_endian>
void
def_section_contents(const Stringpool*, unsigned char**,
- unsigned int* psize, unsigned int* pentries
- ACCEPT_SIZE_ENDIAN) const;
+ unsigned int* psize, unsigned int* pentries) const;
// Build an allocated buffer holding the contents of the version
// reference section (.gnu.version_r).
template<int size, bool big_endian>
void
need_section_contents(const Stringpool*, unsigned char**,
- unsigned int* psize, unsigned int* pentries
- ACCEPT_SIZE_ENDIAN) const;
+ unsigned int* psize, unsigned int* pentries) const;
const Version_script_info&
version_script() const
namespace gold
{
-// This is a hack to work around a problem with older versions of g++.
-// The problem is that they don't support calling a member template by
-// specifying the template parameters. It works to pass in an
-// argument for argument dependent lookup.
-
-// To use this, the member template method declaration should put
-// ACCEPT_SIZE or ACCEPT_SIZE_ENDIAN after the last parameter. If the
-// method takes no parameters, use ACCEPT_SIZE_ONLY or
-// ACCEPT_SIZE_ENDIAN_ONLY.
-
-// When calling the method, instead of using fn<size>, use fn
-// SELECT_SIZE_NAME or SELECT_SIZE_ENDIAN_NAME. And after the last
-// argument, put SELECT_SIZE(size) or SELECT_SIZE_ENDIAN(size,
-// big_endian). If there is only one argment, use the _ONLY variants.
-
-#ifdef HAVE_MEMBER_TEMPLATE_SPECIFICATIONS
-
-#define SELECT_SIZE_NAME(size) <size>
-#define SELECT_SIZE(size)
-#define SELECT_SIZE_ONLY(size)
-#define ACCEPT_SIZE
-#define ACCEPT_SIZE_ONLY
-#define ACCEPT_SIZE_EXPLICIT(size)
-
-#define SELECT_SIZE_ENDIAN_NAME(size, big_endian) <size, big_endian>
-#define SELECT_SIZE_ENDIAN(size, big_endian)
-#define SELECT_SIZE_ENDIAN_ONLY(size, big_endian)
-#define ACCEPT_SIZE_ENDIAN
-#define ACCEPT_SIZE_ENDIAN_ONLY
-#define ACCEPT_SIZE_ENDIAN_EXPLICIT(size, big_endian)
-
-#else // !defined(HAVE_MEMBER_TEMPLATE_SPECIFICATIONS)
-
-template<int size>
-class Select_size { };
-template<int size, bool big_endian>
-class Select_size_endian { };
-
-#define SELECT_SIZE_NAME(size)
-#define SELECT_SIZE(size) , Select_size<size>()
-#define SELECT_SIZE_ONLY(size) Select_size<size>()
-#define ACCEPT_SIZE , Select_size<size>
-#define ACCEPT_SIZE_ONLY Select_size<size>
-#define ACCEPT_SIZE_EXPLICIT(size) , Select_size<size>
-
-#define SELECT_SIZE_ENDIAN_NAME(size, big_endian)
-#define SELECT_SIZE_ENDIAN(size, big_endian) \
- , Select_size_endian<size, big_endian>()
-#define SELECT_SIZE_ENDIAN_ONLY(size, big_endian) \
- Select_size_endian<size, big_endian>()
-#define ACCEPT_SIZE_ENDIAN , Select_size_endian<size, big_endian>
-#define ACCEPT_SIZE_ENDIAN_ONLY Select_size_endian<size, big_endian>
-#define ACCEPT_SIZE_ENDIAN_EXPLICIT(size, big_endian) \
- , Select_size_endian<size, big_endian>
-
-#endif // !defined(HAVE_MEMBER_TEMPLATE_SPECIFICATIONS)
// General declarations.
Symbol* gsym,
const elfcpp::Rel<32, false>& rel)
{
- Sized_symbol<32>* ssym;
- ssym = symtab->get_sized_symbol SELECT_SIZE_NAME(32) (gsym
- SELECT_SIZE(32));
+ Sized_symbol<32>* ssym = symtab->get_sized_symbol<32>(gsym);
if (!Copy_relocs<32, false>::need_copy_reloc(options, object,
data_shndx, ssym))
{
#ifdef HAVE_TARGET_32_LITTLE
case Parameters::TARGET_32_LITTLE:
- this->sized_create_version_sections
- SELECT_SIZE_ENDIAN_NAME(32, false)(
- versions, symtab, local_symcount, dynamic_symbols, dynstr
- SELECT_SIZE_ENDIAN(32, false));
+ this->sized_create_version_sections<32, false>(versions, symtab,
+ local_symcount,
+ dynamic_symbols, dynstr);
break;
#endif
#ifdef HAVE_TARGET_32_BIG
case Parameters::TARGET_32_BIG:
- this->sized_create_version_sections
- SELECT_SIZE_ENDIAN_NAME(32, true)(
- versions, symtab, local_symcount, dynamic_symbols, dynstr
- SELECT_SIZE_ENDIAN(32, true));
+ this->sized_create_version_sections<32, true>(versions, symtab,
+ local_symcount,
+ dynamic_symbols, dynstr);
break;
#endif
#ifdef HAVE_TARGET_64_LITTLE
case Parameters::TARGET_64_LITTLE:
- this->sized_create_version_sections
- SELECT_SIZE_ENDIAN_NAME(64, false)(
- versions, symtab, local_symcount, dynamic_symbols, dynstr
- SELECT_SIZE_ENDIAN(64, false));
+ this->sized_create_version_sections<64, false>(versions, symtab,
+ local_symcount,
+ dynamic_symbols, dynstr);
break;
#endif
#ifdef HAVE_TARGET_64_BIG
case Parameters::TARGET_64_BIG:
- this->sized_create_version_sections
- SELECT_SIZE_ENDIAN_NAME(64, true)(
- versions, symtab, local_symcount, dynamic_symbols, dynstr
- SELECT_SIZE_ENDIAN(64, true));
+ this->sized_create_version_sections<64, true>(versions, symtab,
+ local_symcount,
+ dynamic_symbols, dynstr);
break;
#endif
default:
const Symbol_table* symtab,
unsigned int local_symcount,
const std::vector<Symbol*>& dynamic_symbols,
- const Output_section* dynstr
- ACCEPT_SIZE_ENDIAN)
+ const Output_section* dynstr)
{
Output_section* vsec = this->choose_output_section(NULL, ".gnu.version",
elfcpp::SHT_GNU_versym,
unsigned char* vbuf;
unsigned int vsize;
- versions->symbol_section_contents SELECT_SIZE_ENDIAN_NAME(size, big_endian)(
- symtab, &this->dynpool_, local_symcount, dynamic_symbols, &vbuf, &vsize
- SELECT_SIZE_ENDIAN(size, big_endian));
+ versions->symbol_section_contents<size, big_endian>(symtab, &this->dynpool_,
+ local_symcount,
+ dynamic_symbols,
+ &vbuf, &vsize);
Output_section_data* vdata = new Output_data_const_buffer(vbuf, vsize, 2);
unsigned char* vdbuf;
unsigned int vdsize;
unsigned int vdentries;
- versions->def_section_contents SELECT_SIZE_ENDIAN_NAME(size, big_endian)(
- &this->dynpool_, &vdbuf, &vdsize, &vdentries
- SELECT_SIZE_ENDIAN(size, big_endian));
+ versions->def_section_contents<size, big_endian>(&this->dynpool_, &vdbuf,
+ &vdsize, &vdentries);
Output_section_data* vddata = new Output_data_const_buffer(vdbuf,
vdsize,
unsigned char* vnbuf;
unsigned int vnsize;
unsigned int vnentries;
- versions->need_section_contents SELECT_SIZE_ENDIAN_NAME(size, big_endian)
- (&this->dynpool_, &vnbuf, &vnsize, &vnentries
- SELECT_SIZE_ENDIAN(size, big_endian));
+ versions->need_section_contents<size, big_endian>(&this->dynpool_,
+ &vnbuf, &vnsize,
+ &vnentries);
Output_section_data* vndata = new Output_data_const_buffer(vnbuf,
vnsize,
const Symbol_table*,
unsigned int local_symcount,
const std::vector<Symbol*>& dynamic_symbols,
- const Output_section* dynstr
- ACCEPT_SIZE_ENDIAN);
+ const Output_section* dynstr);
// Return whether to include this section in the link.
template<int size, bool big_endian>
// appropriate checked type.
template<int size, bool big_endian>
Sized_target<size, big_endian>*
- sized_target(ACCEPT_SIZE_ENDIAN_ONLY) const;
+ sized_target() const;
// Get the number of sections.
unsigned int
template<int size, bool big_endian>
inline Sized_target<size, big_endian>*
-Object::sized_target(ACCEPT_SIZE_ENDIAN_ONLY) const
+Object::sized_target() const
{
gold_assert(this->target_->get_size() == size);
gold_assert(this->target_->is_big_endian() ? big_endian : !big_endian);
// Return the appropriate Sized_target structure.
Sized_target<size, big_endian>*
sized_target()
- {
- return this->Object::sized_target
- SELECT_SIZE_ENDIAN_NAME(size, big_endian) (
- SELECT_SIZE_ENDIAN_ONLY(size, big_endian));
- }
+ { return this->Object::sized_target<size, big_endian>(); }
// Return the value of the local symbol symndx.
Address
void
Output_data_dynamic::Dynamic_entry::write(
unsigned char* pov,
- const Stringpool* pool
- ACCEPT_SIZE_ENDIAN) const
+ const Stringpool* pool) const
{
typename elfcpp::Elf_types<size>::Elf_WXword val;
switch (this->classification_)
p != this->entries_.end();
++p)
{
- p->write SELECT_SIZE_ENDIAN_NAME(size, big_endian)(
- pov, this->pool_ SELECT_SIZE_ENDIAN(size, big_endian));
+ p->write<size, big_endian>(pov, this->pool_);
pov += dyn_size;
}
Output_segment::write_section_headers(const Layout* layout,
const Stringpool* secnamepool,
unsigned char* v,
- unsigned int *pshndx
- ACCEPT_SIZE_ENDIAN) const
+ unsigned int *pshndx) const
{
// Every section that is attached to a segment must be attached to a
// PT_LOAD segment, so we only write out section headers for PT_LOAD
if (this->type_ != elfcpp::PT_LOAD)
return v;
- v = this->write_section_headers_list
- SELECT_SIZE_ENDIAN_NAME(size, big_endian) (
- layout, secnamepool, &this->output_data_, v, pshndx
- SELECT_SIZE_ENDIAN(size, big_endian));
- v = this->write_section_headers_list
- SELECT_SIZE_ENDIAN_NAME(size, big_endian) (
- layout, secnamepool, &this->output_bss_, v, pshndx
- SELECT_SIZE_ENDIAN(size, big_endian));
+ v = this->write_section_headers_list<size, big_endian>(layout, secnamepool,
+ &this->output_data_,
+ v, pshndx);
+ v = this->write_section_headers_list<size, big_endian>(layout, secnamepool,
+ &this->output_bss_,
+ v, pshndx);
return v;
}
const Stringpool* secnamepool,
const Output_data_list* pdl,
unsigned char* v,
- unsigned int* pshndx
- ACCEPT_SIZE_ENDIAN) const
+ unsigned int* pshndx) const
{
const int shdr_size = elfcpp::Elf_sizes<size>::shdr_size;
for (Output_data_list::const_iterator p = pdl->begin();
// Write the dynamic entry to an output view.
template<int size, bool big_endian>
void
- write(unsigned char* pov, const Stringpool* ACCEPT_SIZE_ENDIAN) const;
+ write(unsigned char* pov, const Stringpool*) const;
private:
enum Classification
template<int size, bool big_endian>
unsigned char*
write_section_headers(const Layout*, const Stringpool*, unsigned char* v,
- unsigned int* pshndx ACCEPT_SIZE_ENDIAN) const;
+ unsigned int* pshndx) const;
private:
Output_segment(const Output_segment&);
unsigned char*
write_section_headers_list(const Layout*, const Stringpool*,
const Output_data_list*, unsigned char* v,
- unsigned int* pshdx ACCEPT_SIZE_ENDIAN) const;
+ unsigned int* pshdx) const;
// The list of output data with contents attached to this segment.
Output_data_list output_data_;
{
Symbol* sym = this->weak_aliases_[tosym];
gold_assert(sym != NULL);
- Sized_symbol<size>* ssym;
- ssym = this->get_sized_symbol SELECT_SIZE_NAME(size) (sym
- SELECT_SIZE(size));
+ Sized_symbol<size>* ssym = this->get_sized_symbol<size>(sym);
do
{
ssym->override(fromsym, object, version);
sym = this->weak_aliases_[ssym];
gold_assert(sym != NULL);
- ssym = this->get_sized_symbol SELECT_SIZE_NAME(size) (
- sym SELECT_SIZE(size));
+ ssym = this->get_sized_symbol<size>(sym);
}
while (ssym != tosym);
}
if (object->target()->has_resolve())
{
Sized_target<size, big_endian>* sized_target;
- sized_target = object->sized_target
- SELECT_SIZE_ENDIAN_NAME(size, big_endian) (
- SELECT_SIZE_ENDIAN_ONLY(size, big_endian));
+ sized_target = object->sized_target<size, big_endian>();
sized_target->resolve(to, sym, object, version);
return;
}
{
Symbol* sym = this->weak_aliases_[tosym];
gold_assert(sym != NULL);
- Sized_symbol<size>* ssym;
- ssym = this->get_sized_symbol SELECT_SIZE_NAME(size) (sym
- SELECT_SIZE(size));
+ Sized_symbol<size>* ssym = this->get_sized_symbol<size>(sym);
do
{
ssym->override_with_special(fromsym);
sym = this->weak_aliases_[ssym];
gold_assert(sym != NULL);
- ssym = this->get_sized_symbol SELECT_SIZE_NAME(size) (
- sym SELECT_SIZE(size));
+ ssym = this->get_sized_symbol<size>(sym);
}
while (ssym != tosym);
}
template<int size, bool big_endian>
void
Symbol_table::resolve(Sized_symbol<size>* to, const Sized_symbol<size>* from,
- const char* version ACCEPT_SIZE_ENDIAN)
+ const char* version)
{
unsigned char buf[elfcpp::Elf_sizes<size>::sym_size];
elfcpp::Sym_write<size, big_endian> esym(buf);
if (!ins.second)
{
// We already have an entry for NAME/VERSION.
- ret = this->get_sized_symbol SELECT_SIZE_NAME(size) (ins.first->second
- SELECT_SIZE(size));
+ ret = this->get_sized_symbol<size>(ins.first->second);
gold_assert(ret != NULL);
was_undefined = ret->is_undefined();
// object.
const Sized_symbol<size>* sym2;
- sym2 = this->get_sized_symbol SELECT_SIZE_NAME(size) (
- insdef.first->second
- SELECT_SIZE(size));
- Symbol_table::resolve SELECT_SIZE_ENDIAN_NAME(size, big_endian) (
- ret, sym2, version SELECT_SIZE_ENDIAN(size, big_endian));
+ sym2 = this->get_sized_symbol<size>(insdef.first->second);
+ Symbol_table::resolve<size, big_endian>(ret, sym2, version);
this->make_forwarder(insdef.first->second, ret);
insdef.first->second = ret;
}
{
// We already have an entry for NAME/NULL. If we override
// it, then change it to NAME/VERSION.
- ret = this->get_sized_symbol SELECT_SIZE_NAME(size) (
- insdef.first->second
- SELECT_SIZE(size));
+ ret = this->get_sized_symbol<size>(insdef.first->second);
this->resolve(ret, sym, orig_sym, object, version);
ins.first->second = ret;
}
else
{
Sized_target<size, big_endian>* target =
- object->sized_target SELECT_SIZE_ENDIAN_NAME(size, big_endian) (
- SELECT_SIZE_ENDIAN_ONLY(size, big_endian));
+ object->sized_target<size, big_endian>();
if (!target->has_make_symbol())
ret = new Sized_symbol<size>();
else
Sized_symbol<size>*
Symbol_table::define_special_symbol(const char** pname, const char** pversion,
bool only_if_ref,
- Sized_symbol<size>** poldsym
- ACCEPT_SIZE_ENDIAN)
+ Sized_symbol<size>** poldsym)
{
Symbol* oldsym;
Sized_symbol<size>* sym;
else
gold_assert(oldsym != NULL);
- *poldsym = this->get_sized_symbol SELECT_SIZE_NAME(size) (oldsym
- SELECT_SIZE(size));
+ *poldsym = this->get_sized_symbol<size>(oldsym);
return sym;
}
if (parameters->target().is_big_endian())
{
#if defined(HAVE_TARGET_32_BIG) || defined(HAVE_TARGET_64_BIG)
- sym = this->define_special_symbol SELECT_SIZE_ENDIAN_NAME(size, true) (
- &name, &version, only_if_ref, &oldsym
- SELECT_SIZE_ENDIAN(size, true));
+ sym = this->define_special_symbol<size, true>(&name, &version,
+ only_if_ref, &oldsym);
#else
gold_unreachable();
#endif
else
{
#if defined(HAVE_TARGET_32_LITTLE) || defined(HAVE_TARGET_64_LITTLE)
- sym = this->define_special_symbol SELECT_SIZE_ENDIAN_NAME(size, false) (
- &name, &version, only_if_ref, &oldsym
- SELECT_SIZE_ENDIAN(size, false));
+ sym = this->define_special_symbol<size, false>(&name, &version,
+ only_if_ref, &oldsym);
#else
gold_unreachable();
#endif
if (parameters->target().is_big_endian())
{
#if defined(HAVE_TARGET_32_BIG) || defined(HAVE_TARGET_64_BIG)
- sym = this->define_special_symbol SELECT_SIZE_ENDIAN_NAME(size, true) (
- &name, &version, only_if_ref, &oldsym
- SELECT_SIZE_ENDIAN(size, true));
+ sym = this->define_special_symbol<size, true>(&name, &version,
+ only_if_ref, &oldsym);
#else
gold_unreachable();
#endif
else
{
#if defined(HAVE_TARGET_32_LITTLE) || defined(HAVE_TARGET_64_LITTLE)
- sym = this->define_special_symbol SELECT_SIZE_ENDIAN_NAME(size, false) (
- &name, &version, only_if_ref, &oldsym
- SELECT_SIZE_ENDIAN(size, false));
+ sym = this->define_special_symbol<size, false>(&name, &version,
+ only_if_ref, &oldsym);
#else
gold_unreachable();
#endif
if (parameters->target().is_big_endian())
{
#if defined(HAVE_TARGET_32_BIG) || defined(HAVE_TARGET_64_BIG)
- sym = this->define_special_symbol SELECT_SIZE_ENDIAN_NAME(size, true) (
- &name, &version, only_if_ref, &oldsym
- SELECT_SIZE_ENDIAN(size, true));
+ sym = this->define_special_symbol<size, true>(&name, &version,
+ only_if_ref, &oldsym);
#else
gold_unreachable();
#endif
else
{
#if defined(HAVE_TARGET_32_LITTLE) || defined(HAVE_TARGET_64_LITTLE)
- sym = this->define_special_symbol SELECT_SIZE_ENDIAN_NAME(size, false) (
- &name, &version, only_if_ref, &oldsym
- SELECT_SIZE_ENDIAN(size, false));
+ sym = this->define_special_symbol<size, false>(&name, &version,
+ only_if_ref, &oldsym);
#else
gold_unreachable();
#endif
sym_index -= first_global_index;
gold_assert(sym_index < output_count);
unsigned char* ps = psyms + (sym_index * sym_size);
- this->sized_write_symbol SELECT_SIZE_ENDIAN_NAME(size, big_endian) (
- sym, sym_value, shndx, sympool, ps
- SELECT_SIZE_ENDIAN(size, big_endian));
+ this->sized_write_symbol<size, big_endian>(sym, sym_value, shndx,
+ sympool, ps);
}
if (dynsym_index != -1U)
dynsym_index -= first_dynamic_global_index;
gold_assert(dynsym_index < dynamic_count);
unsigned char* pd = dynamic_view + (dynsym_index * sym_size);
- this->sized_write_symbol SELECT_SIZE_ENDIAN_NAME(size, big_endian) (
- sym, dynsym_value, shndx, dynpool, pd
- SELECT_SIZE_ENDIAN(size, big_endian));
+ this->sized_write_symbol<size, big_endian>(sym, dynsym_value, shndx,
+ dynpool, pd);
}
}
typename elfcpp::Elf_types<size>::Elf_Addr value,
unsigned int shndx,
const Stringpool* pool,
- unsigned char* p
- ACCEPT_SIZE_ENDIAN) const
+ unsigned char* p) const
{
elfcpp::Sym_write<size, big_endian> osym(p);
osym.put_st_name(pool->get_offset(sym->name()));
// Return the sized version of a symbol in this table.
template<int size>
Sized_symbol<size>*
- get_sized_symbol(Symbol* ACCEPT_SIZE) const;
+ get_sized_symbol(Symbol*) const;
template<int size>
const Sized_symbol<size>*
- get_sized_symbol(const Symbol* ACCEPT_SIZE) const;
+ get_sized_symbol(const Symbol*) const;
// Return the count of undefined symbols seen.
int
template<int size, bool big_endian>
void
resolve(Sized_symbol<size>* to, const Sized_symbol<size>* from,
- const char* version ACCEPT_SIZE_ENDIAN);
+ const char* version);
// Record that a symbol is forced to be local by a version script.
void
template<int size, bool big_endian>
Sized_symbol<size>*
define_special_symbol(const char** pname, const char** pversion,
- bool only_if_ref, Sized_symbol<size>** poldsym
- ACCEPT_SIZE_ENDIAN);
+ bool only_if_ref, Sized_symbol<size>** poldsym);
// Define a symbol in an Output_data, sized version.
template<int size>
sized_write_symbol(Sized_symbol<size>*,
typename elfcpp::Elf_types<size>::Elf_Addr value,
unsigned int shndx,
- const Stringpool*, unsigned char* p
- ACCEPT_SIZE_ENDIAN) const;
+ const Stringpool*, unsigned char* p) const;
// Possibly warn about an undefined symbol from a dynamic object.
void
template<int size>
Sized_symbol<size>*
-Symbol_table::get_sized_symbol(Symbol* sym ACCEPT_SIZE) const
+Symbol_table::get_sized_symbol(Symbol* sym) const
{
gold_assert(size == parameters->target().get_size());
return static_cast<Sized_symbol<size>*>(sym);
template<int size>
const Sized_symbol<size>*
-Symbol_table::get_sized_symbol(const Symbol* sym ACCEPT_SIZE) const
+Symbol_table::get_sized_symbol(const Symbol* sym) const
{
gold_assert(size == parameters->target().get_size());
return static_cast<const Sized_symbol<size>*>(sym);
Symbol* gsym,
const elfcpp::Rela<64, false>& rela)
{
- Sized_symbol<64>* ssym;
- ssym = symtab->get_sized_symbol SELECT_SIZE_NAME(64) (gsym
- SELECT_SIZE(64));
+ Sized_symbol<64>* ssym = symtab->get_sized_symbol<64>(gsym);
if (!Copy_relocs<64, false>::need_copy_reloc(options, object,
data_shndx, ssym))