OpenCores
URL https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk

Subversion Repositories open8_urisc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /open8_urisc
    from Rev 158 to Rev 159
    Reverse comparison

Rev 158 → Rev 159

/trunk/gnu/binutils/gold/options.cc
1,6 → 1,6
// options.c -- handle command line options for gold
 
// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
170,6 → 170,15
printf(" %s", *p);
printf("\n");
 
printf(_("%s: supported emulations:"), gold::program_name);
supported_names.clear();
gold::supported_emulation_names(&supported_names);
for (std::vector<const char*>::const_iterator p = supported_names.begin();
p != supported_names.end();
++p)
printf(" %s", *p);
printf("\n");
 
// REPORT_BUGS_TO is defined in bfd/bfdver.h.
const char* report = REPORT_BUGS_TO;
if (*report != '\0')
226,6 → 235,17
}
 
void
parse_percent(const char* option_name, const char* arg, double* retval)
{
char* endptr;
*retval = strtod(arg, &endptr) / 100.0;
if (*endptr != '\0')
gold_fatal(_("%s: invalid option value "
"(expected a floating point number): %s"),
option_name, arg);
}
 
void
parse_string(const char* option_name, const char* arg, const char** retval)
{
if (*arg == '\0')
300,6 → 320,7
{
gold::print_version(true);
this->printed_version_ = true;
 
printf(_(" Supported targets:\n"));
std::vector<const char*> supported_names;
gold::supported_target_names(&supported_names);
307,6 → 328,14
p != supported_names.end();
++p)
printf(" %s\n", *p);
 
printf(_(" Supported emulations:\n"));
supported_names.clear();
gold::supported_emulation_names(&supported_names);
for (std::vector<const char*>::const_iterator p = supported_names.begin();
p != supported_names.end();
++p)
printf(" %s\n", *p);
}
 
void
369,6 → 398,14
}
 
void
General_options::parse_incremental_startup_unchanged(const char*, const char*,
Command_line*)
{
this->implicit_incremental_ = true;
this->incremental_startup_disposition_ = INCREMENTAL_UNCHANGED;
}
 
void
General_options::parse_library(const char*, const char* arg,
Command_line* cmdline)
{
881,7 → 918,8
plugins_(NULL),
dynamic_list_(),
incremental_mode_(INCREMENTAL_OFF),
incremental_disposition_(INCREMENTAL_CHECK),
incremental_disposition_(INCREMENTAL_STARTUP),
incremental_startup_disposition_(INCREMENTAL_CHECK),
implicit_incremental_(false),
excluded_libs_(),
symbols_to_retain_(),
1130,6 → 1168,14
}
}
 
// -Bgroup implies --unresolved-symbols=report-all.
if (this->Bgroup() && !this->user_set_unresolved_symbols())
this->set_unresolved_symbols("report-all");
 
// -shared implies --allow-shlib-undefined. Currently
// ---allow-shlib-undefined controls warnings issued based on the
// -symbol table. --unresolved-symbols controls warnings issued
// -based on relocations.
if (this->shared() && !this->user_set_allow_shlib_undefined())
this->set_allow_shlib_undefined(true);
 
1148,6 → 1194,14
if (this->pie() && this->relocatable())
gold_fatal(_("-pie and -r are incompatible"));
 
if (!this->shared())
{
if (this->filter() != NULL)
gold_fatal(_("-F/--filter may not used without -shared"));
if (this->any_auxiliary())
gold_fatal(_("-f/--auxiliary may not be used without -shared"));
}
 
// TODO: implement support for -retain-symbols-file with -r, if needed.
if (this->relocatable() && this->retain_symbols_file())
gold_fatal(_("-retain-symbols-file does not yet work with -r"));
/trunk/gnu/binutils/gold/options.h
1,6 → 1,6
// options.h -- handle command line options for gold -*- C++ -*-
 
// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
63,6 → 63,11
 
enum Incremental_disposition
{
// Startup files that appear before the first disposition option.
// These will default to INCREMENTAL_CHECK unless the
// --incremental-startup-unchanged option is given.
// (For files added implicitly by gcc before any user options.)
INCREMENTAL_STARTUP,
// Determine the status from the timestamp (default).
INCREMENTAL_CHECK,
// Assume the file changed from the previous build.
98,6 → 103,9
parse_double(const char* option_name, const char* arg, double* retval);
 
extern void
parse_percent(const char* option_name, const char* arg, double* retval);
 
extern void
parse_string(const char* option_name, const char* arg, const char** retval);
 
extern void
372,6 → 380,12
#default_value__, helpstring__, helparg__, false, \
double, double, options::parse_double)
 
#define DEFINE_percent(varname__, dashes__, shortname__, default_value__, \
helpstring__, helparg__) \
DEFINE_var(varname__, dashes__, shortname__, default_value__ / 100.0, \
#default_value__, helpstring__, helparg__, false, \
double, double, options::parse_percent)
 
#define DEFINE_string(varname__, dashes__, shortname__, default_value__, \
helpstring__, helparg__) \
DEFINE_var(varname__, dashes__, shortname__, default_value__, \
629,6 → 643,9
DEFINE_bool_alias(dn, Bdynamic, options::ONE_DASH, '\0',
N_("alias for -Bstatic"), NULL, true);
 
DEFINE_bool(Bgroup, options::ONE_DASH, '\0', false,
N_("Use group name lookup rules for shared library"), NULL);
 
DEFINE_bool(Bsymbolic, options::ONE_DASH, '\0', false,
N_("Bind defined symbols locally"), NULL);
 
663,6 → 680,10
N_("Output cross reference table"),
N_("Do not output cross reference table"));
 
DEFINE_bool(ctors_in_init_array, options::TWO_DASHES, '\0', true,
N_("Use DT_INIT_ARRAY for all constructors (default)"),
N_("Handle constructors as directed by compiler"));
 
DEFINE_bool(define_common, options::TWO_DASHES, 'd', false,
N_("Define common symbols"),
N_("Do not define common symbols"));
721,16 → 742,24
DEFINE_special(EB, options::ONE_DASH, '\0',
N_("Link big-endian objects."), NULL);
 
DEFINE_special(EL, options::ONE_DASH, '\0',
N_("Link little-endian objects."), NULL);
 
DEFINE_bool(eh_frame_hdr, options::TWO_DASHES, '\0', false,
N_("Create exception frame header"), NULL);
 
DEFINE_special(EL, options::ONE_DASH, '\0',
N_("Link little-endian objects."), NULL);
 
DEFINE_bool(enum_size_warning, options::TWO_DASHES, '\0', true, NULL,
N_("(ARM only) Do not warn about objects with incompatible "
"enum sizes"));
 
DEFINE_set(auxiliary, options::TWO_DASHES, 'f',
N_("Auxiliary filter for shared object symbol table"),
N_("SHLIB"));
 
DEFINE_string(filter, options::TWO_DASHES, 'F', NULL,
N_("Filter for shared object symbol table"),
N_("SHLIB"));
 
DEFINE_bool(fatal_warnings, options::TWO_DASHES, '\0', false,
N_("Treat warnings as errors"),
N_("Do not treat warnings as errors"));
801,6 → 830,14
DEFINE_special(incremental_unknown, options::TWO_DASHES, '\0',
N_("Use timestamps to check files (default)"), NULL);
 
DEFINE_special(incremental_startup_unchanged, options::TWO_DASHES, '\0',
N_("Assume startup files unchanged "
"(files preceding this option)"), NULL);
 
DEFINE_percent(incremental_patch, options::TWO_DASHES, '\0', 10,
N_("Amount of extra space to allocate for patches"),
N_("PERCENT"));
 
DEFINE_string(init, options::ONE_DASH, '\0', "_init",
N_("Call SYMBOL at load-time"), N_("SYMBOL"));
 
816,6 → 853,10
N_("Keep files mapped across passes (default)"),
N_("Release mapped files after each pass"));
 
DEFINE_bool(ld_generated_unwind_info, options::TWO_DASHES, '\0', true,
N_("Generate unwind information for PLT (default)"),
N_("Do not generate unwind information for PLT"));
 
DEFINE_special(library, options::TWO_DASHES, 'l',
N_("Search for library LIBNAME"), N_("LIBNAME"));
 
831,7 → 872,7
NULL);
 
DEFINE_string(m, options::EXACTLY_ONE_DASH, 'm', "",
N_("Ignored for compatibility"), N_("EMULATION"));
N_("Set GNU linker emulation; obsolete"), N_("EMULATION"));
 
DEFINE_bool(print_map, options::TWO_DASHES, 'M', false,
N_("Write map file on standard output"), NULL);
886,6 → 927,9
DEFINE_bool(preread_archive_symbols, options::TWO_DASHES, '\0', false,
N_("Preread archive symbols when multi-threaded"), NULL);
 
DEFINE_bool(print_output_format, options::TWO_DASHES, '\0', false,
N_("Print default output format"), NULL);
 
DEFINE_string(print_symbol_counts, options::TWO_DASHES, '\0', NULL,
N_("Print symbols defined and used for each input"),
N_("FILENAME"));
1031,6 → 1075,13
DEFINE_set(undefined, options::TWO_DASHES, 'u',
N_("Create undefined reference to SYMBOL"), N_("SYMBOL"));
 
DEFINE_enum(unresolved_symbols, options::TWO_DASHES, '\0', NULL,
N_("How to handle unresolved symbols"),
("ignore-all,report-all,ignore-in-object-files,"
"ignore-in-shared-libs"),
{"ignore-all", "report-all", "ignore-in-object-files",
"ignore-in-shared-libs"});
 
DEFINE_bool(verbose, options::TWO_DASHES, '\0', false,
N_("Synonym for --debug=files"), NULL);
 
1162,7 → 1213,7
N_("Don't mark variables read-only after relocation"));
DEFINE_bool(text, options::DASH_Z, '\0', false,
N_("Do not permit relocations in read-only segments"),
NULL);
N_("Permit relocations in read-only segments (default)"));
DEFINE_bool_alias(textoff, text, options::DASH_Z, '\0',
N_("Permit relocations in read-only segments (default)"),
NULL, true);
1313,6 → 1364,12
incremental_disposition() const
{ return this->incremental_disposition_; }
 
// The disposition to use for startup files (those that precede the
// first --incremental-changed, etc. option).
Incremental_disposition
incremental_startup_disposition() const
{ return this->incremental_startup_disposition_; }
 
// Return true if S is the name of a library excluded from automatic
// symbol export.
bool
1430,9 → 1487,12
// --incremental-unchanged or --incremental-unknown option. The
// value may change as we proceed parsing the command line flags.
Incremental_disposition incremental_disposition_;
// The disposition to use for startup files (those marked
// INCREMENTAL_STARTUP).
Incremental_disposition incremental_startup_disposition_;
// Whether we have seen one of the options that require incremental
// build (--incremental-changed, --incremental-unchanged or
// --incremental-unknown)
// build (--incremental-changed, --incremental-unchanged,
// --incremental-unknown, or --incremental-startup-unchanged).
bool implicit_incremental_;
// Libraries excluded from automatic export, via --exclude-libs.
Unordered_set<std::string> excluded_libs_;
/trunk/gnu/binutils/gold/target-select.cc
1,6 → 1,6
// target-select.cc -- select a target for an object file
 
// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
22,9 → 22,12
 
#include "gold.h"
 
#include <cstdio>
#include <cstring>
 
#include "elfcpp.h"
#include "options.h"
#include "parameters.h"
#include "target-select.h"
 
namespace
52,9 → 55,10
// fast.
 
Target_selector::Target_selector(int machine, int size, bool is_big_endian,
const char* bfd_name)
const char* bfd_name, const char* emulation)
: machine_(machine), size_(size), is_big_endian_(is_big_endian),
bfd_name_(bfd_name), instantiated_target_(NULL), set_target_once_(this)
bfd_name_(bfd_name), emulation_(emulation), instantiated_target_(NULL),
set_target_once_(this)
{
this->next_ = target_selectors;
target_selectors = this;
79,6 → 83,18
this->instantiated_target_ = this->do_instantiate_target();
}
 
// If we instantiated TARGET, return the corresponding BFD name.
 
const char*
Target_selector::do_target_bfd_name(const Target* target)
{
if (!this->is_our_target(target))
return NULL;
const char* my_bfd_name = this->bfd_name();
gold_assert(my_bfd_name != NULL);
return my_bfd_name;
}
 
// Find the target for an ELF file.
 
Target*
104,7 → 120,7
// --oformat option.
 
Target*
select_target_by_name(const char* name)
select_target_by_bfd_name(const char* name)
{
for (Target_selector* p = target_selectors; p != NULL; p = p->next())
{
111,7 → 127,7
const char* pname = p->bfd_name();
if (pname == NULL || strcmp(pname, name) == 0)
{
Target* ret = p->recognize_by_name(name);
Target* ret = p->recognize_by_bfd_name(name);
if (ret != NULL)
return ret;
}
119,6 → 135,25
return NULL;
}
 
// Find a target using a GNU linker emulation. This is used to
// support the -m option.
 
Target*
select_target_by_emulation(const char* name)
{
for (Target_selector* p = target_selectors; p != NULL; p = p->next())
{
const char* pname = p->emulation();
if (pname == NULL || strcmp(pname, name) == 0)
{
Target* ret = p->recognize_by_emulation(name);
if (ret != NULL)
return ret;
}
}
return NULL;
}
 
// Push all the supported BFD names onto a vector.
 
void
125,7 → 160,58
supported_target_names(std::vector<const char*>* names)
{
for (Target_selector* p = target_selectors; p != NULL; p = p->next())
p->supported_names(names);
p->supported_bfd_names(names);
}
 
// Push all the supported emulations onto a vector.
 
void
supported_emulation_names(std::vector<const char*>* names)
{
for (Target_selector* p = target_selectors; p != NULL; p = p->next())
p->supported_emulations(names);
}
 
// Implement the --print-output-format option.
 
void
print_output_format()
{
if (!parameters->target_valid())
{
// This case arises when --print-output-format is used with no
// input files. We need to come up with the right string to
// print based on the other options. If the user specified the
// format using a --oformat option, use that. That saves each
// target from having to remember the name that was used to
// select it. In other cases, we will just have to ask the
// target.
if (parameters->options().user_set_oformat())
{
const char* bfd_name = parameters->options().oformat();
Target* target = select_target_by_bfd_name(bfd_name);
if (target != NULL)
printf("%s\n", bfd_name);
else
gold_error(_("unrecognized output format %s"), bfd_name);
return;
}
 
parameters_force_valid_target();
}
 
const Target* target = &parameters->target();
for (Target_selector* p = target_selectors; p != NULL; p = p->next())
{
const char* bfd_name = p->target_bfd_name(target);
if (bfd_name != NULL)
{
printf("%s\n", bfd_name);
return;
}
}
 
gold_unreachable();
}
 
} // End namespace gold.
/trunk/gnu/binutils/gold/reloc.cc
659,7 → 659,7
// section data to the output file. The second one applies
// relocations.
 
this->write_sections(pshdrs, of, &views);
this->write_sections(layout, pshdrs, of, &views);
 
// To speed up relocations, we set up hash tables for fast lookup of
// input offsets to output addresses.
678,6 → 678,8
{
if (views[i].view != NULL)
{
if (views[i].is_ctors_reverse_view)
this->reverse_words(views[i].view, views[i].view_size);
if (!views[i].is_postprocessing_view)
{
if (views[i].is_input_output_view)
712,7 → 714,8
 
template<int size, bool big_endian>
void
Sized_relobj_file<size, big_endian>::write_sections(const unsigned char* pshdrs,
Sized_relobj_file<size, big_endian>::write_sections(const Layout* layout,
const unsigned char* pshdrs,
Output_file* of,
Views* pviews)
{
761,6 → 764,7
pvs->address = posd->address();
pvs->is_input_output_view = false;
pvs->is_postprocessing_view = false;
pvs->is_ctors_reverse_view = false;
 
continue;
}
875,6 → 879,12
pvs->view_size = view_size;
pvs->is_input_output_view = output_offset == invalid_address;
pvs->is_postprocessing_view = os->requires_postprocessing();
pvs->is_ctors_reverse_view =
(!parameters->options().relocatable()
&& view_size > size / 8
&& (strcmp(os->name(), ".init_array") == 0
|| strcmp(os->name(), ".fini_array") == 0)
&& layout->is_ctors_in_init_array(this, i));
}
 
// Actually read the data.
1483,6 → 1493,26
}
}
 
// Reverse the words in a section. Used for .ctors sections mapped to
// .init_array sections. See ctors_sections_in_init_array in
// layout.cc.
 
template<int size, bool big_endian>
void
Sized_relobj_file<size, big_endian>::reverse_words(unsigned char* view,
section_size_type view_size)
{
typedef typename elfcpp::Swap<size, big_endian>::Valtype Valtype;
Valtype* vview = reinterpret_cast<Valtype*>(view);
section_size_type vview_size = view_size / (size / 8);
for (section_size_type i = 0; i < vview_size / 2; ++i)
{
Valtype tmp = vview[i];
vview[i] = vview[vview_size - 1 - i];
vview[vview_size - 1 - i] = tmp;
}
}
 
// Class Merged_symbol_value.
 
template<int size>
/trunk/gnu/binutils/gold/target-select.h
1,6 → 1,6
// target-select.h -- select a target for an object file -*- C++ -*-
 
// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
65,9 → 65,10
// or 64), and endianness. The machine number can be EM_NONE to
// test for any machine number. BFD_NAME is the name of the target
// used by the GNU linker, for backward compatibility; it may be
// NULL.
// NULL. EMULATION is the name of the emulation used by the GNU
// linker; it is similar to BFD_NAME.
Target_selector(int machine, int size, bool is_big_endian,
const char* bfd_name);
const char* bfd_name, const char* emulation);
 
virtual ~Target_selector()
{ }
81,15 → 82,27
// If NAME matches the target, return a pointer to a target
// structure.
Target*
recognize_by_name(const char* name)
{ return this->do_recognize_by_name(name); }
recognize_by_bfd_name(const char* name)
{ return this->do_recognize_by_bfd_name(name); }
 
// Push all supported names onto the vector. This is only used for
// help output.
// Push all supported BFD names onto the vector. This is only used
// for help output.
void
supported_names(std::vector<const char*>* names)
{ this->do_supported_names(names); }
supported_bfd_names(std::vector<const char*>* names)
{ this->do_supported_bfd_names(names); }
 
// If NAME matches the target emulation, return a pointer to a
// target structure.
Target*
recognize_by_emulation(const char* name)
{ return this->do_recognize_by_emulation(name); }
 
// Push all supported emulations onto the vector. This is only used
// for help output.
void
supported_emulations(std::vector<const char*>* names)
{ this->do_supported_emulations(names); }
 
// Return the next Target_selector in the linked list.
Target_selector*
next() const
114,12 → 127,26
{ return this->is_big_endian_; }
 
// Return the BFD name. This may return NULL, in which case the
// do_recognize_by_name hook will be responsible for matching the
// BFD name.
// do_recognize_by_bfd_name hook will be responsible for matching
// the BFD name.
const char*
bfd_name() const
{ return this->bfd_name_; }
 
// Return the emulation. This may return NULL, in which case the
// do_recognize_by_emulation hook will be responsible for matching
// the emulation.
const char*
emulation() const
{ return this->emulation_; }
 
// The reverse mapping, for --print-output-format: if we
// instantiated TARGET, return our BFD_NAME. If we did not
// instantiate it, return NULL.
const char*
target_bfd_name(const Target* target)
{ return this->do_target_bfd_name(target); }
 
protected:
// Return an instance of the real target. This must be implemented
// by the child class.
141,7 → 168,7
// child class may implement a different version of this to
// recognize more than one name.
virtual Target*
do_recognize_by_name(const char*)
do_recognize_by_bfd_name(const char*)
{ return this->instantiate_target(); }
 
// Return a list of supported BFD names. The child class may
148,16 → 175,43
// implement a different version of this to handle more than one
// name.
virtual void
do_supported_names(std::vector<const char*>* names)
do_supported_bfd_names(std::vector<const char*>* names)
{
gold_assert(this->bfd_name_ != NULL);
names->push_back(this->bfd_name_);
}
 
// Recognize a target by emulation. When this is called we already
// know that the name matches (or that the emulation_ field is
// NULL). The child class may implement a different version of this
// to recognize more than one emulation.
virtual Target*
do_recognize_by_emulation(const char*)
{ return this->instantiate_target(); }
 
// Return a list of supported emulations. The child class may
// implement a different version of this to handle more than one
// emulation.
virtual void
do_supported_emulations(std::vector<const char*>* emulations)
{
gold_assert(this->emulation_ != NULL);
emulations->push_back(this->emulation_);
}
 
// Map from target to BFD name.
virtual const char*
do_target_bfd_name(const Target*);
 
// Instantiate the target and return it.
Target*
instantiate_target();
 
// Return whether TARGET is the target we instantiated.
bool
is_our_target(const Target* target)
{ return target == this->instantiated_target_; }
 
private:
// Set the target.
void
173,6 → 227,8
const bool is_big_endian_;
// BFD name of target, for compatibility.
const char* const bfd_name_;
// GNU linker emulation for this target, for compatibility.
const char* const emulation_;
// Next entry in list built at global constructor time.
Target_selector* next_;
// The singleton Target structure--this points to an instance of the
191,8 → 247,13
// Select a target using a BFD name.
 
extern Target*
select_target_by_name(const char* name);
select_target_by_bfd_name(const char* name);
 
// Select a target using a GNU linker emulation.
 
extern Target*
select_target_by_emulation(const char* name);
 
// Fill in a vector with the list of supported targets. This returns
// a list of BFD names.
 
199,6 → 260,16
extern void
supported_target_names(std::vector<const char*>*);
 
// Fill in a vector with the list of supported emulations.
 
extern void
supported_emulation_names(std::vector<const char*>*);
 
// Print the output format, for the --print-output-format option.
 
extern void
print_output_format();
 
} // End namespace gold.
 
#endif // !defined(GOLD_TARGET_SELECT_H)
/trunk/gnu/binutils/gold/ehframe.cc
1,6 → 1,6
// ehframe.cc -- handle exception frame sections for gold
 
// Copyright 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
266,7 → 266,7
gold_unreachable();
}
 
switch (fde_encoding & 0xf0)
switch (fde_encoding & 0x70)
{
case 0:
break;
275,6 → 275,10
pc += eh_frame_address + fde_offset + 8;
break;
 
case elfcpp::DW_EH_PE_datarel:
pc += parameters->target().ehframe_datarel_base();
break;
 
default:
// If other cases arise, then we have to handle them, or we have
// to reject them by returning false in Eh_frame::read_cie.
281,6 → 285,8
gold_unreachable();
}
 
gold_assert((fde_encoding & elfcpp::DW_EH_PE_indirect) == 0);
 
return pc;
}
 
321,14 → 327,16
 
// Write the FDE to OVIEW starting at OFFSET. CIE_OFFSET is the
// offset of the CIE in OVIEW. FDE_ENCODING is the encoding, from the
// CIE. ADDRALIGN is the required alignment. Record the FDE pc for
// EH_FRAME_HDR. Return the new offset.
// CIE. ADDRALIGN is the required alignment. ADDRESS is the virtual
// address of OVIEW. Record the FDE pc for EH_FRAME_HDR. Return the
// new offset.
 
template<int size, bool big_endian>
section_offset_type
Fde::write(unsigned char* oview, section_offset_type offset,
unsigned int addralign, section_offset_type cie_offset,
unsigned char fde_encoding, Eh_frame_hdr* eh_frame_hdr)
uint64_t address, unsigned int addralign,
section_offset_type cie_offset, unsigned char fde_encoding,
Eh_frame_hdr* eh_frame_hdr)
{
gold_assert((offset & (addralign - 1)) == 0);
 
355,6 → 363,24
// will later be applied to the FDE data.
memcpy(oview + offset + 8, this->contents_.data(), length);
 
// If this FDE is associated with a PLT, fill in the PLT's address
// and size.
if (this->object_ == NULL)
{
gold_assert(memcmp(oview + offset + 8, "\0\0\0\0\0\0\0\0", 8) == 0);
Output_data* plt = this->u_.from_linker.plt;
uint64_t poffset = plt->address() - (address + offset + 8);
int32_t spoffset = static_cast<int32_t>(poffset);
off_t psize = plt->data_size();
uint32_t upsize = static_cast<uint32_t>(psize);
if (static_cast<uint64_t>(static_cast<int64_t>(spoffset)) != poffset
|| static_cast<off_t>(upsize) != psize)
gold_warning(_("overflow in PLT unwind data; "
"unwinding through PLT may fail"));
elfcpp::Swap<32, big_endian>::writeval(oview + offset + 8, spoffset);
elfcpp::Swap<32, big_endian>::writeval(oview + offset + 12, upsize);
}
 
if (aligned_full_length > length + 8)
memset(oview + offset + length + 8, 0, aligned_full_length - (length + 8));
 
389,8 → 415,12
// Add 4 for length and 4 for zero CIE identifier tag.
length += 8;
 
merge_map->add_mapping(this->object_, this->shndx_, this->input_offset_,
length, output_offset);
if (this->object_ != NULL)
{
// Add a mapping so that relocations are applied correctly.
merge_map->add_mapping(this->object_, this->shndx_, this->input_offset_,
length, output_offset);
}
 
length = align_address(length, addralign);
 
415,7 → 445,8
template<int size, bool big_endian>
section_offset_type
Cie::write(unsigned char* oview, section_offset_type offset,
unsigned int addralign, Eh_frame_hdr* eh_frame_hdr)
uint64_t address, unsigned int addralign,
Eh_frame_hdr* eh_frame_hdr)
{
gold_assert((offset & (addralign - 1)) == 0);
 
448,7 → 479,7
for (std::vector<Fde*>::const_iterator p = this->fdes_.begin();
p != this->fdes_.end();
++p)
offset = (*p)->write<size, big_endian>(oview, offset, addralign,
offset = (*p)->write<size, big_endian>(oview, offset, address, addralign,
cie_offset, fde_encoding,
eh_frame_hdr);
 
994,6 → 1025,29
return true;
}
 
// Add unwind information for a PLT.
 
void
Eh_frame::add_ehframe_for_plt(Output_data* plt, const unsigned char* cie_data,
size_t cie_length, const unsigned char* fde_data,
size_t fde_length)
{
Cie cie(NULL, 0, 0, elfcpp::DW_EH_PE_pcrel | elfcpp::DW_EH_PE_sdata4, "",
cie_data, cie_length);
Cie_offsets::iterator find_cie = this->cie_offsets_.find(&cie);
Cie* pcie;
if (find_cie != this->cie_offsets_.end())
pcie = *find_cie;
else
{
pcie = new Cie(cie);
this->cie_offsets_.insert(pcie);
}
 
Fde* fde = new Fde(plt, fde_data, fde_length);
pcie->add_fde(fde);
}
 
// Return the number of FDEs.
 
unsigned int
1113,6 → 1167,7
void
Eh_frame::do_sized_write(unsigned char* oview)
{
uint64_t address = this->address();
unsigned int addralign = this->addralign();
section_offset_type o = 0;
for (Unmergeable_cie_offsets::iterator p =
1119,12 → 1174,12
this->unmergeable_cie_offsets_.begin();
p != this->unmergeable_cie_offsets_.end();
++p)
o = (*p)->write<size, big_endian>(oview, o, addralign,
o = (*p)->write<size, big_endian>(oview, o, address, addralign,
this->eh_frame_hdr_);
for (Cie_offsets::iterator p = this->cie_offsets_.begin();
p != this->cie_offsets_.end();
++p)
o = (*p)->write<size, big_endian>(oview, o, addralign,
o = (*p)->write<size, big_endian>(oview, o, address, addralign,
this->eh_frame_hdr_);
}
 
/trunk/gnu/binutils/gold/ehframe.h
1,6 → 1,6
// ehframe.h -- handle exception frame sections for gold -*- C++ -*-
 
// Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
45,10 → 45,6
// time and when a shared object is loaded, and the time required to
// deregister the exception handlers when a shared object is unloaded.
 
// FIXME: gcc supports using storing a sorted lookup table for the
// FDEs in the PT_GNU_EH_FRAME segment, but we do not yet generate
// that.
 
class Eh_frame_hdr : public Output_section_data
{
public:
170,10 → 166,19
public:
Fde(Relobj* object, unsigned int shndx, section_offset_type input_offset,
const unsigned char* contents, size_t length)
: object_(object), shndx_(shndx), input_offset_(input_offset),
: object_(object),
contents_(reinterpret_cast<const char*>(contents), length)
{ }
{
this->u_.from_object.shndx = shndx;
this->u_.from_object.input_offset = input_offset;
}
 
// Create an FDE associated with a PLT.
Fde(Output_data* plt, const unsigned char* contents, size_t length)
: object_(NULL),
contents_(reinterpret_cast<const char*>(contents), length)
{ this->u_.from_linker.plt = plt; }
 
// Return the length of this FDE. Add 4 for the length and 4 for
// the offset to the CIE.
size_t
180,32 → 185,52
length() const
{ return this->contents_.length() + 8; }
 
// Add a mapping for this FDE to MERGE_MAP.
// Add a mapping for this FDE to MERGE_MAP, so that relocations
// against the FDE are applied to right part of the output file.
void
add_mapping(section_offset_type output_offset, Merge_map* merge_map) const
{
merge_map->add_mapping(this->object_, this->shndx_,
this->input_offset_, this->length(),
output_offset);
if (this->object_ != NULL)
merge_map->add_mapping(this->object_, this->u_.from_object.shndx,
this->u_.from_object.input_offset, this->length(),
output_offset);
}
 
// Write the FDE to OVIEW starting at OFFSET. FDE_ENCODING is the
// encoding, from the CIE. Round up the bytes to ADDRALIGN if
// necessary. Record the FDE in EH_FRAME_HDR. Return the new
// offset.
// necessary. ADDRESS is the virtual address of OVIEW. Record the
// FDE in EH_FRAME_HDR. Return the new offset.
template<int size, bool big_endian>
section_offset_type
write(unsigned char* oview, section_offset_type offset,
unsigned int addralign, section_offset_type cie_offset,
unsigned char fde_encoding, Eh_frame_hdr* eh_frame_hdr);
uint64_t address, unsigned int addralign,
section_offset_type cie_offset, unsigned char fde_encoding,
Eh_frame_hdr* eh_frame_hdr);
 
private:
// The object in which this FDE was seen.
// The object in which this FDE was seen. This will be NULL for a
// linker generated FDE.
Relobj* object_;
// Input section index for this FDE.
unsigned int shndx_;
// Offset within the input section for this FDE.
section_offset_type input_offset_;
union
{
// These fields are used if the FDE is from an input object (the
// object_ field is not NULL).
struct
{
// Input section index for this FDE.
unsigned int shndx;
// Offset within the input section for this FDE.
section_offset_type input_offset;
} from_object;
// This field is used if the FDE is generated by the linker (the
// object_ field is NULL).
struct
{
// The only linker generated FDEs are for PLT sections, and this
// points to the PLT section.
Output_data* plt;
} from_linker;
} u_;
// FDE data.
std::string contents_;
};
261,10 → 286,11
 
// Write the CIE to OVIEW starting at OFFSET. EH_FRAME_HDR is the
// exception frame header for FDE recording. Round up the bytes to
// ADDRALIGN. Return the new offset.
// ADDRALIGN. ADDRESS is the virtual address of OVIEW. Return the
// new offset.
template<int size, bool big_endian>
section_offset_type
write(unsigned char* oview, section_offset_type offset,
write(unsigned char* oview, section_offset_type offset, uint64_t address,
unsigned int addralign, Eh_frame_hdr* eh_frame_hdr);
 
friend bool operator<(const Cie&, const Cie&);
274,11 → 300,14
// The class is not assignable.
Cie& operator=(const Cie&);
 
// The object in which this CIE was first seen.
// The object in which this CIE was first seen. This will be NULL
// for a linker generated CIE.
Relobj* object_;
// Input section index for this CIE.
// Input section index for this CIE. This will be 0 for a linker
// generated CIE.
unsigned int shndx_;
// Offset within the input section for this CIE.
// Offset within the input section for this CIE. This will be 0 for
// a linker generated CIE.
section_offset_type input_offset_;
// The encoding of the FDE. This is a DW_EH_PE code.
unsigned char fde_encoding_;
324,6 → 353,15
unsigned int shndx, unsigned int reloc_shndx,
unsigned int reloc_type);
 
// Add a CIE and an FDE for a PLT section, to permit unwinding
// through a PLT. The FDE data should start with 8 bytes of zero,
// which will be replaced by a 4 byte PC relative reference to the
// address of PLT and a 4 byte size of PLT.
void
add_ehframe_for_plt(Output_data* plt, const unsigned char* cie_data,
size_t cie_length, const unsigned char* fde_data,
size_t fde_length);
 
// Return the number of FDEs.
unsigned int
fde_count() const;
/trunk/gnu/binutils/gold/powerpc.cc
1,6 → 1,6
// powerpc.cc -- powerpc target support for gold.
 
// Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
// Copyright 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by David S. Miller <davem@davemloft.net>
// and David Edelsohn <edelsohn@gnu.org>
 
383,6 → 383,7
false, // has_resolve
false, // has_code_fill
true, // is_default_stack_executable
false, // can_icf_inline_merge_sections
'\0', // wrap_char
"/usr/lib/ld.so.1", // dynamic_linker
0x10000000, // default_text_segment_address
406,6 → 407,7
false, // has_resolve
false, // has_code_fill
true, // is_default_stack_executable
false, // can_icf_inline_merge_sections
'\0', // wrap_char
"/usr/lib/ld.so.1", // dynamic_linker
0x10000000, // default_text_segment_address
429,6 → 431,7
false, // has_resolve
false, // has_code_fill
true, // is_default_stack_executable
false, // can_icf_inline_merge_sections
'\0', // wrap_char
"/usr/lib/ld.so.1", // dynamic_linker
0x10000000, // default_text_segment_address
452,6 → 455,7
false, // has_resolve
false, // has_code_fill
true, // is_default_stack_executable
false, // can_icf_inline_merge_sections
'\0', // wrap_char
"/usr/lib/ld.so.1", // dynamic_linker
0x10000000, // default_text_segment_address
2120,9 → 2124,12
public:
Target_selector_powerpc()
: Target_selector(elfcpp::EM_NONE, size, big_endian,
(size == 64 ?
(big_endian ? "elf64-powerpc" : "elf64-powerpcle") :
(big_endian ? "elf32-powerpc" : "elf32-powerpcle")))
(size == 64
? (big_endian ? "elf64-powerpc" : "elf64-powerpcle")
: (big_endian ? "elf32-powerpc" : "elf32-powerpcle")),
(size == 64
? (big_endian ? "elf64ppc" : "elf64lppc")
: (big_endian ? "elf32ppc" : "elf32lppc")))
{ }
 
Target* do_recognize(int machine, int, int)
/trunk/gnu/binutils/gold/configure.ac
261,6 → 261,18
AM_CONDITIONAL(NATIVE_OR_CROSS_LINKER,
test "x$target_alias" = "x" -o "x$host_alias" = "x$target_alias" -o "x$host_alias" = "x$build_alias")
 
dnl Test for whether static linking is supported. Some systems do not
dnl install static libraries. This only affects the set of tests that
dnl we run.
AC_CACHE_CHECK([whether static linking works], [gold_cv_lib_static],
[LDFLAGS_hold=$LDFLAGS
LDFLAGS="$LDFLAGS -static"
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[void f() { }]])],
[gold_cv_lib_static=yes], [gold_cv_lib_static=no])
LDFLAGS=$LDFLAGS_hold])
AM_CONDITIONAL(HAVE_STATIC, test "$gold_cv_lib_static" = "yes")
 
dnl Some architectures do not support taking pointers of functions
dnl defined in shared libraries except in -fPIC mode. We need to
dnl tell the unittest framework if we're compiling for one of those
346,14 → 358,6
 
AM_CONDITIONAL(TLS_DESCRIPTORS, test "$gold_cv_lib_glibc29" = "yes")
 
dnl Check whether the compiler supports constructor priorities in
dnl attributes, which were added in gcc 4.3.
AC_CACHE_CHECK([for constructor priorities], [gold_cv_c_conprio],
[AC_COMPILE_IFELSE([void f() __attribute__ ((constructor (1)));],
[gold_cv_c_conprio=yes], [gold_cv_c_conprio=no])])
 
AM_CONDITIONAL(CONSTRUCTOR_PRIORITY, test "$gold_cv_c_conprio" = "yes")
 
dnl Test for the -frandom-seed option.
AC_CACHE_CHECK([for -frandom-seed support], [gold_cv_c_random_seed],
[save_CFLAGS="$CFLAGS"
/trunk/gnu/binutils/gold/arm.cc
1,6 → 1,6
// arm.cc -- arm target support for gold.
 
// Copyright 2009, 2010 Free Software Foundation, Inc.
// Copyright 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Doug Kwan <dougkwan@google.com> based on the i386 code
// by Ian Lance Taylor <iant@google.com>.
// This file also contains borrowed and adapted code from
2182,23 → 2182,6
fix_cortex_a8_(false), cortex_a8_relocs_info_()
{ }
 
// Virtual function which is set to return true by a target if
// it can use relocation types to determine if a function's
// pointer is taken.
virtual bool
can_check_for_function_pointers() const
{ return true; }
 
// Whether a section called SECTION_NAME may have function pointers to
// sections not eligible for safe ICF folding.
virtual bool
section_may_have_icf_unsafe_pointers(const char* section_name) const
{
return (!is_prefix_of(".ARM.exidx", section_name)
&& !is_prefix_of(".ARM.extab", section_name)
&& Target::section_may_have_icf_unsafe_pointers(section_name));
}
// Whether we can use BLX.
bool
may_use_blx() const
2553,6 → 2536,23
arm_reloc_property_table = new Arm_reloc_property_table();
}
 
// Virtual function which is set to return true by a target if
// it can use relocation types to determine if a function's
// pointer is taken.
virtual bool
do_can_check_for_function_pointers() const
{ return true; }
 
// Whether a section called SECTION_NAME may have function pointers to
// sections not eligible for safe ICF folding.
virtual bool
do_section_may_have_icf_unsafe_pointers(const char* section_name) const
{
return (!is_prefix_of(".ARM.exidx", section_name)
&& !is_prefix_of(".ARM.extab", section_name)
&& Target::do_section_may_have_icf_unsafe_pointers(section_name));
}
private:
// The class which scans relocations.
class Scan
2946,6 → 2946,7
false, // has_resolve
false, // has_code_fill
true, // is_default_stack_executable
false, // can_icf_inline_merge_sections
'\0', // wrap_char
"/usr/lib/libc.so.1", // dynamic_linker
0x8000, // default_text_segment_address
3214,11 → 3215,10
const Symbol_value<32>* psymval)
{
typedef typename elfcpp::Swap<8, big_endian>::Valtype Valtype;
typedef typename elfcpp::Swap<32, big_endian>::Valtype Reltype;
Valtype* wv = reinterpret_cast<Valtype*>(view);
Valtype val = elfcpp::Swap<8, big_endian>::readval(wv);
Reltype addend = utils::sign_extend<8>(val);
Reltype x = psymval->value(object, addend);
int32_t addend = utils::sign_extend<8>(val);
Arm_address x = psymval->value(object, addend);
val = utils::bit_select(val, x, 0xffU);
elfcpp::Swap<8, big_endian>::writeval(wv, val);
 
3276,15 → 3276,17
const Sized_relobj_file<32, big_endian>* object,
const Symbol_value<32>* psymval)
{
typedef typename elfcpp::Swap<16, big_endian>::Valtype Valtype;
typedef typename elfcpp::Swap_unaligned<16, big_endian>::Valtype Valtype;
typedef typename elfcpp::Swap<32, big_endian>::Valtype Reltype;
Valtype* wv = reinterpret_cast<Valtype*>(view);
Valtype val = elfcpp::Swap<16, big_endian>::readval(wv);
Reltype addend = utils::sign_extend<16>(val);
Reltype x = psymval->value(object, addend);
Valtype val = elfcpp::Swap_unaligned<16, big_endian>::readval(view);
int32_t addend = utils::sign_extend<16>(val);
Arm_address x = psymval->value(object, addend);
val = utils::bit_select(val, x, 0xffffU);
elfcpp::Swap<16, big_endian>::writeval(wv, val);
return (utils::has_signed_unsigned_overflow<16>(x)
elfcpp::Swap_unaligned<16, big_endian>::writeval(view, val);
 
// R_ARM_ABS16 permits signed or unsigned results.
int signed_x = static_cast<int32_t>(x);
return ((signed_x < -32768 || signed_x > 65536)
? This::STATUS_OVERFLOW
: This::STATUS_OKAY);
}
3296,11 → 3298,10
const Symbol_value<32>* psymval,
Arm_address thumb_bit)
{
typedef typename elfcpp::Swap<32, big_endian>::Valtype Valtype;
Valtype* wv = reinterpret_cast<Valtype*>(view);
Valtype addend = elfcpp::Swap<32, big_endian>::readval(wv);
typedef typename elfcpp::Swap_unaligned<32, big_endian>::Valtype Valtype;
Valtype addend = elfcpp::Swap_unaligned<32, big_endian>::readval(view);
Valtype x = psymval->value(object, addend) | thumb_bit;
elfcpp::Swap<32, big_endian>::writeval(wv, x);
elfcpp::Swap_unaligned<32, big_endian>::writeval(view, x);
return This::STATUS_OKAY;
}
 
3312,11 → 3313,10
Arm_address address,
Arm_address thumb_bit)
{
typedef typename elfcpp::Swap<32, big_endian>::Valtype Valtype;
Valtype* wv = reinterpret_cast<Valtype*>(view);
Valtype addend = elfcpp::Swap<32, big_endian>::readval(wv);
typedef typename elfcpp::Swap_unaligned<32, big_endian>::Valtype Valtype;
Valtype addend = elfcpp::Swap_unaligned<32, big_endian>::readval(view);
Valtype x = (psymval->value(object, addend) | thumb_bit) - address;
elfcpp::Swap<32, big_endian>::writeval(wv, x);
elfcpp::Swap_unaligned<32, big_endian>::writeval(view, x);
return This::STATUS_OKAY;
}
 
3356,13 → 3356,14
Arm_address address)
{
typedef typename elfcpp::Swap<16, big_endian>::Valtype Valtype;
typedef typename elfcpp::Swap<16, big_endian>::Valtype Reltype;
Valtype* wv = reinterpret_cast<Valtype*>(view);
Valtype val = elfcpp::Swap<16, big_endian>::readval(wv);
Reltype addend = utils::sign_extend<8>((val & 0x00ff) << 1);
Reltype x = (psymval->value(object, addend) - address);
elfcpp::Swap<16, big_endian>::writeval(wv, (val & 0xff00) | ((x & 0x01fe) >> 1));
return (utils::has_overflow<8>(x)
int32_t addend = utils::sign_extend<8>((val & 0x00ff) << 1);
int32_t x = (psymval->value(object, addend) - address);
elfcpp::Swap<16, big_endian>::writeval(wv, ((val & 0xff00)
| ((x & 0x01fe) >> 1)));
// We do a 9-bit overflow check because x is right-shifted by 1 bit.
return (utils::has_overflow<9>(x)
? This::STATUS_OVERFLOW
: This::STATUS_OKAY);
}
3375,13 → 3376,14
Arm_address address)
{
typedef typename elfcpp::Swap<16, big_endian>::Valtype Valtype;
typedef typename elfcpp::Swap<16, big_endian>::Valtype Reltype;
Valtype* wv = reinterpret_cast<Valtype*>(view);
Valtype val = elfcpp::Swap<16, big_endian>::readval(wv);
Reltype addend = utils::sign_extend<11>((val & 0x07ff) << 1);
Reltype x = (psymval->value(object, addend) - address);
elfcpp::Swap<16, big_endian>::writeval(wv, (val & 0xf800) | ((x & 0x0ffe) >> 1));
return (utils::has_overflow<11>(x)
int32_t addend = utils::sign_extend<11>((val & 0x07ff) << 1);
int32_t x = (psymval->value(object, addend) - address);
elfcpp::Swap<16, big_endian>::writeval(wv, ((val & 0xf800)
| ((x & 0x0ffe) >> 1)));
// We do a 12-bit overflow check because x is right-shifted by 1 bit.
return (utils::has_overflow<12>(x)
? This::STATUS_OVERFLOW
: This::STATUS_OKAY);
}
3432,13 → 3434,12
Arm_address address,
Arm_address thumb_bit)
{
typedef typename elfcpp::Swap<32, big_endian>::Valtype Valtype;
Valtype* wv = reinterpret_cast<Valtype*>(view);
Valtype val = elfcpp::Swap<32, big_endian>::readval(wv);
typedef typename elfcpp::Swap_unaligned<32, big_endian>::Valtype Valtype;
Valtype val = elfcpp::Swap_unaligned<32, big_endian>::readval(view);
Valtype addend = utils::sign_extend<31>(val);
Valtype x = (psymval->value(object, addend) | thumb_bit) - address;
val = utils::bit_select(val, x, 0x7fffffffU);
elfcpp::Swap<32, big_endian>::writeval(wv, val);
elfcpp::Swap_unaligned<32, big_endian>::writeval(view, val);
return (utils::has_overflow<31>(x) ?
This::STATUS_OVERFLOW : This::STATUS_OKAY);
}
5218,8 → 5219,7
const section_size_type oview_size = 8;
unsigned char* const oview = of->get_output_view(offset, oview_size);
typedef typename elfcpp::Swap<32, big_endian>::Valtype Valtype;
Valtype* wv = reinterpret_cast<Valtype*>(oview);
typedef typename elfcpp::Swap_unaligned<32, big_endian>::Valtype Valtype;
 
Output_section* os = this->relobj_->output_section(this->shndx_);
gold_assert(os != NULL);
5260,8 → 5260,10
uint32_t prel31_offset = output_address - this->address();
if (utils::has_overflow<31>(offset))
gold_error(_("PREL31 overflow in EXIDX_CANTUNWIND entry"));
elfcpp::Swap<32, big_endian>::writeval(wv, prel31_offset & 0x7fffffffU);
elfcpp::Swap<32, big_endian>::writeval(wv + 1, elfcpp::EXIDX_CANTUNWIND);
elfcpp::Swap_unaligned<32, big_endian>::writeval(oview,
prel31_offset & 0x7fffffffU);
elfcpp::Swap_unaligned<32, big_endian>::writeval(oview + 4,
elfcpp::EXIDX_CANTUNWIND);
 
of->write_output_view(this->offset(), oview_size, oview);
}
5803,8 → 5805,7
{
// We only care about plain or relaxed input sections. We also
// ignore any merged sections.
if ((p->is_input_section() || p->is_relaxed_input_section())
&& p->data_size() != 0)
if (p->is_input_section() || p->is_relaxed_input_section())
list->push_back(Text_section_list::value_type(p->relobj(),
p->shndx()));
}
11902,7 → 11903,8
public:
Target_selector_arm()
: Target_selector(elfcpp::EM_ARM, 32, big_endian,
(big_endian ? "elf32-bigarm" : "elf32-littlearm"))
(big_endian ? "elf32-bigarm" : "elf32-littlearm"),
(big_endian ? "armelfb" : "armelf"))
{ }
 
Target*
/trunk/gnu/binutils/gold/workqueue-threads.cc
174,7 → 174,7
// Return whether the current thread should be cancelled.
 
bool
Workqueue_threader_threadpool::should_cancel_thread()
Workqueue_threader_threadpool::should_cancel_thread(int thread_number)
{
// Fast exit without taking a lock.
if (!this->check_thread_count_)
182,12 → 182,13
 
{
Hold_lock hl(this->lock_);
if (this->threads_ > this->desired_thread_count_)
if (thread_number > this->desired_thread_count_)
{
--this->threads_;
if (this->threads_ <= this->desired_thread_count_)
this->check_thread_count_ = 0;
return true;
}
this->check_thread_count_ = 0;
}
 
return false;
/trunk/gnu/binutils/gold/main.cc
1,6 → 1,6
// main.cc -- gold main function.
 
// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
33,6 → 33,7
 
#include "script.h"
#include "options.h"
#include "target-select.h"
#include "parameters.h"
#include "errors.h"
#include "mapfile.h"
195,10 → 196,6
if (parameters->options().relocatable())
command_line.script_options().version_script_info()->clear();
 
// Load plugin libraries.
if (command_line.options().has_plugins())
command_line.options().plugins()->load_plugins();
 
// The work queue.
Workqueue workqueue(command_line.options());
 
234,6 → 231,10
if (parameters->options().section_ordering_file())
layout.read_layout_from_file();
 
// Load plugin libraries.
if (command_line.options().has_plugins())
command_line.options().plugins()->load_plugins(&layout);
 
// Get the search path from the -L options.
Dirsearch search_path;
search_path.initialize(&workqueue, &command_line.options().library_path());
246,6 → 247,9
// Run the main task processing loop.
workqueue.process(0);
 
if (command_line.options().print_output_format())
print_output_format();
 
if (command_line.options().stats())
{
Timer::TimeStats elapsed = timer.get_elapsed_time();
/trunk/gnu/binutils/gold/gold.cc
1,6 → 1,6
// gold.cc -- main linker functions
 
// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
30,6 → 30,7
#include "libiberty.h"
 
#include "options.h"
#include "target-select.h"
#include "debug.h"
#include "workqueue.h"
#include "dirsearch.h"
175,7 → 176,15
{
if (cmdline.begin() == cmdline.end())
{
bool is_ok = false;
if (options.printed_version())
is_ok = true;
if (options.print_output_format())
{
print_output_format();
is_ok = true;
}
if (is_ok)
gold_exit(GOLD_OK);
gold_fatal(_("no input files"));
}
/trunk/gnu/binutils/gold/target.cc
1,6 → 1,6
// target.cc
// target.cc -- target support for gold.
 
// Copyright 2009, 2010 Free Software Foundation, Inc.
// Copyright 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Doug Kwan <dougkwan@google.com>.
 
// This file is part of gold.
72,7 → 72,10
const elfcpp::Ehdr<size, big_endian>& ehdr)
{
int et = ehdr.get_e_type();
if (et == elfcpp::ET_REL)
// ET_EXEC files are valid input for --just-symbols/-R,
// and we treat them as relocatable objects.
if (et == elfcpp::ET_REL
|| (et == elfcpp::ET_EXEC && input_file->just_symbols()))
{
Sized_relobj_file<size, big_endian>* obj =
new Sized_relobj_file<size, big_endian>(name, input_file, offset, ehdr);
200,4 → 203,49
}
}
 
// Class Sized_target.
 
// Set the EI_OSABI field of the ELF header if requested.
 
template<int size, bool big_endian>
void
Sized_target<size, big_endian>::do_adjust_elf_header(unsigned char* view,
int len) const
{
elfcpp::ELFOSABI osabi = this->osabi();
if (osabi != elfcpp::ELFOSABI_NONE)
{
gold_assert(len == elfcpp::Elf_sizes<size>::ehdr_size);
 
elfcpp::Ehdr<size, false> ehdr(view);
unsigned char e_ident[elfcpp::EI_NIDENT];
memcpy(e_ident, ehdr.get_e_ident(), elfcpp::EI_NIDENT);
 
e_ident[elfcpp::EI_OSABI] = osabi;
 
elfcpp::Ehdr_write<size, false> oehdr(view);
oehdr.put_e_ident(e_ident);
}
}
 
#ifdef HAVE_TARGET_32_LITTLE
template
class Sized_target<32, false>;
#endif
 
#ifdef HAVE_TARGET_32_BIG
template
class Sized_target<32, true>;
#endif
 
#ifdef HAVE_TARGET_64_LITTLE
template
class Sized_target<64, false>;
#endif
 
#ifdef HAVE_TARGET_64_BIG
template
class Sized_target<64, true>;
#endif
 
} // End namespace gold.
/trunk/gnu/binutils/gold/dynobj.h
599,7 → 599,8
 
// Handle a symbol SYM defined with version VERSION.
void
add_def(const Symbol* sym, const char* version, Stringpool::Key);
add_def(Stringpool*, const Symbol* sym, const char* version,
Stringpool::Key);
 
// Add a reference to version NAME in file FILENAME.
void
/trunk/gnu/binutils/gold/target-reloc.h
1,6 → 1,6
// target-reloc.h -- target specific relocation support -*- C++ -*-
 
// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
169,6 → 169,57
v, sym->name());
}
 
// Return true if we are should issue an error saying that SYM is an
// undefined symbol. This is called if there is a relocation against
// SYM.
 
inline bool
issue_undefined_symbol_error(const Symbol* sym)
{
// We only report global symbols.
if (sym == NULL)
return false;
 
// We only report undefined symbols.
if (!sym->is_undefined() && !sym->is_placeholder())
return false;
 
// We don't report weak symbols.
if (sym->binding() == elfcpp::STB_WEAK)
return false;
 
// We don't report symbols defined in discarded sections.
if (sym->is_defined_in_discarded_section())
return false;
 
// If the target defines this symbol, don't report it here.
if (parameters->target().is_defined_by_abi(sym))
return false;
 
// See if we've been told to ignore whether this symbol is
// undefined.
const char* const u = parameters->options().unresolved_symbols();
if (u != NULL)
{
if (strcmp(u, "ignore-all") == 0)
return false;
if (strcmp(u, "report-all") == 0)
return true;
if (strcmp(u, "ignore-in-object-files") == 0 && !sym->in_dyn())
return false;
if (strcmp(u, "ignore-in-shared-libs") == 0 && !sym->in_reg())
return false;
}
 
// When creating a shared library, only report unresolved symbols if
// -z defs was used.
if (parameters->options().shared() && !parameters->options().defs())
return false;
 
// Otherwise issue a warning.
return true;
}
 
// This function implements the generic part of relocation processing.
// The template parameter Relocate must be a class type which provides
// a single function, relocate(), which implements the machine
344,13 → 395,7
continue;
}
 
if (sym != NULL
&& (sym->is_undefined() || sym->is_placeholder())
&& sym->binding() != elfcpp::STB_WEAK
&& !is_defined_in_discarded_section
&& !target->is_defined_by_abi(sym)
&& (!parameters->options().shared() // -shared
|| parameters->options().defs())) // -z defs
if (issue_undefined_symbol_error(sym))
gold_undefined_symbol_at_location(sym, relinfo, i, offset);
else if (sym != NULL
&& sym->visibility() != elfcpp::STV_DEFAULT
/trunk/gnu/binutils/gold/merge.cc
1,6 → 1,6
// merge.cc -- handle section merging for gold
 
// Copyright 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
242,6 → 242,7
section_offset_type offset, section_size_type length,
section_offset_type output_offset)
{
gold_assert(object != NULL);
Object_merge_map* object_merge_map = object->merge_map();
if (object_merge_map == NULL)
{
/trunk/gnu/binutils/gold/incremental.cc
1,6 → 1,6
// inremental.cc -- incremental linking support for gold
 
// Copyright 2009, 2010 Free Software Foundation, Inc.
// Copyright 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Mikolaj Zalewski <mikolajz@google.com>.
 
// This file is part of gold.
309,7 → 309,7
break;
case INCREMENTAL_INPUT_SCRIPT:
{
Script_info* script = new Script_info(input_file.filename());
Script_info* script = new Script_info(input_file.filename(), i);
this->script_map_[i] = script;
unsigned int object_count = input_file.get_object_count();
for (unsigned int j = 0; j < object_count; j++)
393,6 → 393,12
 
if (incremental_inputs->command_line() != inputs.command_line())
{
gold_debug(DEBUG_INCREMENTAL,
"old command line: %s",
inputs.command_line());
gold_debug(DEBUG_INCREMENTAL,
"new command line: %s",
incremental_inputs->command_line().c_str());
explain_no_incremental(_("command line changed"));
return false;
}
442,10 → 448,24
{
Input_entry_reader input_file = this->inputs_reader_.input_file(n);
Incremental_disposition disp = INCREMENTAL_CHECK;
 
// For files named in scripts, find the file that was actually named
// on the command line, so that we can get the incremental disposition
// flag.
Script_info* script = this->get_script_info(n);
if (script != NULL)
n = script->input_file_index();
 
const Input_argument* input_argument = this->get_input_argument(n);
if (input_argument != NULL)
disp = input_argument->file().options().incremental_disposition();
 
// For files at the beginning of the command line (i.e., those added
// implicitly by gcc), check whether the --incremental-startup-unchanged
// option was used.
if (disp == INCREMENTAL_STARTUP)
disp = parameters->options().incremental_startup_disposition();
 
if (disp != INCREMENTAL_CHECK)
return disp == INCREMENTAL_CHANGED;
 
654,7 → 674,7
gold_debug(DEBUG_INCREMENTAL,
"PLT entry %d: %s",
i, sym->name());
target->register_global_plt_entry(i, sym);
target->register_global_plt_entry(symtab, layout, i, sym);
}
}
}
924,10 → 944,13
|| strcmp(argv[i], "--incremental-changed") == 0
|| strcmp(argv[i], "--incremental-unchanged") == 0
|| strcmp(argv[i], "--incremental-unknown") == 0
|| strcmp(argv[i], "--incremental-startup-unchanged") == 0
|| is_prefix_of("--incremental-base=", argv[i])
|| is_prefix_of("--incremental-patch=", argv[i])
|| is_prefix_of("--debug=", argv[i]))
continue;
if (strcmp(argv[i], "--incremental-base") == 0
|| strcmp(argv[i], "--incremental-patch") == 0
|| strcmp(argv[i], "--debug") == 0)
{
// When these options are used without the '=', skip the
1646,10 → 1669,16
if (sym->symtab_index() == -1U)
continue;
unsigned int flags = 0;
if (sym->source() == Symbol::FROM_OBJECT
&& sym->object() == obj
&& sym->is_defined())
// If the symbol has hidden or internal visibility, we
// mark it as defined in the shared object so we don't
// try to resolve it during an incremental update.
if (sym->visibility() == elfcpp::STV_HIDDEN
|| sym->visibility() == elfcpp::STV_INTERNAL)
flags = INCREMENTAL_SHLIB_SYM_DEF;
else if (sym->source() == Symbol::FROM_OBJECT
&& sym->object() == obj
&& sym->is_defined())
flags = INCREMENTAL_SHLIB_SYM_DEF;
else if (sym->is_copied_from_dynobj()
&& this->symtab_->get_copy_source(sym) == dynobj)
flags = INCREMENTAL_SHLIB_SYM_COPY;
/trunk/gnu/binutils/gold/stringpool.h
1,6 → 1,6
// stringpool.h -- a string pool for gold -*- C++ -*-
 
// Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
219,6 → 219,11
const Stringpool_char*
add(const Stringpool_char* s, bool copy, Key* pkey);
 
// Add the string S to the pool.
const Stringpool_char*
add(const std::basic_string<Stringpool_char>& s, bool copy, Key* pkey)
{ return this->add_with_length(s.data(), s.size(), copy, pkey); }
 
// Add string S of length LEN characters to the pool. If COPY is
// true, S need not be null terminated.
const Stringpool_char*
/trunk/gnu/binutils/gold/parameters.cc
1,6 → 1,6
// parameters.cc -- general parameters for a link using gold
 
// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
248,6 → 248,14
return this->incremental_mode_ != General_options::INCREMENTAL_OFF;
}
 
// Return true if we are doing a full incremental link.
 
bool
Parameters::incremental_full() const
{
return this->incremental_mode_ == General_options::INCREMENTAL_FULL;
}
 
// Return true if we are doing an incremental update.
 
bool
299,7 → 307,8
gold_assert(parameters->options_valid());
if (parameters->options().user_set_oformat())
{
Target* target = select_target_by_name(parameters->options().oformat());
const char* bfd_name = parameters->options().oformat();
Target* target = select_target_by_bfd_name(bfd_name);
if (target != NULL)
{
set_parameters_target(target);
306,10 → 315,22
return;
}
 
gold_error(_("unrecognized output format %s"),
parameters->options().oformat());
gold_error(_("unrecognized output format %s"), bfd_name);
}
 
if (parameters->options().user_set_m())
{
const char* emulation = parameters->options().m();
Target* target = select_target_by_emulation(emulation);
if (target != NULL)
{
set_parameters_target(target);
return;
}
 
gold_error(_("unrecognized emulation %s"), emulation);
}
 
// The GOLD_DEFAULT_xx macros are defined by the configure script.
bool is_big_endian;
General_options::Endianness endianness = parameters->options().endianness();
325,7 → 346,13
is_big_endian,
elfcpp::GOLD_DEFAULT_OSABI,
0);
gold_assert(target != NULL);
 
if (target == NULL)
{
gold_assert(is_big_endian != GOLD_DEFAULT_BIG_ENDIAN);
gold_fatal(_("no supported target for -EB/-EL option"));
}
 
set_parameters_target(target);
}
 
/trunk/gnu/binutils/gold/ChangeLog
1,3 → 1,903
2011-08-26 Cary Coutant <ccoutant@google.com>
 
* layout.cc (Free_list::allocate): Provide guarantee of minimum
remaining hole size when allocating.
(Layout::make_output_section): Set fill methods for debug sections.
* layout.h (Free_list::Free_list_node): Move from private to
public.
(Free_list::set_min_hole_size): New function.
(Free_list::begin, Free_list::end): New functions.
(Free_list::min_hole_): New data member.
* output.cc: Include dwarf.h.
(Output_fill_debug_info::do_minimum_hole_size): New function.
(Output_fill_debug_info::do_write): New function.
(Output_fill_debug_line::do_minimum_hole_size): New function.
(Output_fill_debug_line::do_write): New function.
(Output_section::Output_section): Initialize new data member.
(Output_section::set_final_data_size): Ensure patch space is larger
than minimum hole size.
(Output_section::do_write): Fill holes in debug sections.
* output.h (Output_fill): New class.
(Output_fill_debug_info): New class.
(Output_fill_debug_line): New class.
(Output_section::set_free_space_fill): New function.
(Output_section::free_space_fill_): New data member.
* testsuite/Makefile.am (incremental_test_3): Add
--incremental-patch option.
(incremental_test_4): Likewise.
(incremental_test_5): Likewise.
(incremental_test_6): Likewise.
(incremental_copy_test): Likewise.
(incremental_common_test_1): Likewise.
* testsuite/Makefile.in: Regenerate.
 
2011-08-26 Nick Clifton <nickc@redhat.com>
 
* po/es.po: Updated Spanish translation.
 
2011-08-01 Cary Coutant <ccoutant@google.com>
 
* gold/testsuite/Makefile.am (justsyms_exec): New testcase.
* gold/testsuite/Makefile.in: Regenerate.
* gold/testsuite/justsyms_exec.c: New source file.
* gold/testsuite/justsyms_lib.c: New source file.
 
2011-08-01 Cary Coutant <ccoutant@google.com>
 
* layout.cc (Layout::set_segment_offsets): Don't realign text
segment if -Ttext was specified.
* object.cc (Sized_relobj_file::Sized_relobj_file): Store the ELF
file type.
* object.h (Sized_relobj_file::e_type): New function.
(Sized_relobj_file::e_type_): New data member.
* symtab.cc (Symbol_table::add_from_relobj): Don't add section
base address for ET_EXEC files.
* target.cc (Target::do_make_elf_object_implementation): Allow
ET_EXEC files with --just-symbols option.
 
2011-07-28 Cary Coutant <ccoutant@google.com>
 
* workqueue-internal.h (Workqueue_threader::should_cancel_thread):
Add thread_number parameter.
(Workqueue_threader_threadpool::should_cancel_thread): Likewise.
* workqueue-threads.cc
(Workqueue_threader_threadpool::should_cancel_thread): Cancel
current thread if its thread number is greater than desired thread
count.
* workqueue.cc (Workqueue_threader_single::should_cancel_thread):
Add thread_number parameter.
(Workqueue::should_cancel_thread): Likewise.
(Workqueue::find_runnable_or_wait): Pass thread_number to
should_cancel_thread.
* workqueue.h (Workqueue::should_cancel_thread): Add thread_number
parameter.
 
2011-07-22 Sriraman Tallam <tmsriram@google.com>
 
* symtab.cc (Symbol_table::add_from_relobj): Mark symbol as referenced
only after checking if it cannot be forced local.
* symtab.h (is_externally_visible): Check if the symbol is not forced
local.
 
2011-07-15 Ian Lance Taylor <iant@google.com>
 
* options.h (class General_options): Add --print-output-format.
Move -EL next to -EB, for better --help output.
* target-select.cc: Include <cstdio>, "options.h", and
"parameters.h".
(Target_selector::do_target_bfd_name): New function.
(print_output_format): New function.
* target-select.h (class Target_selector): Update declarations.
(Target_selector::target_bfd_name): New function.
(print_output_format): Declare.
* main.cc: Include "target-select.h".
(main): Handle --print-output-format.
* gold.cc: Include "target-select.h".
(queue_initial_tasks): Handle --print-output-format when there are
no input files.
* parameters.cc (parameters_force_valid_target): Give a better
error message if -EB/-EL does not match target.
* freebsd.h (Target_selector_freebsd::do_target_bfd_name): New
function.
 
2011-07-15 Ian Lance Taylor <iant@google.com>
 
* i386.cc (class Output_data_plt_i386): Add layout_ field.
(Output_data_plt_i386::Output_data_plt_i386): Initialize layout_.
(Output_data_plt_i386::do_write): Write address of .dynamic
section to first entry in .got.plt section.
* x86_64.cc (class Output_data_plt_x86_64): Add layout_ field.
(Output_data_plt_x86_64::Output_data_plt_x86_64) [both versions]:
Initialize layout_.
(Output_data_plt_x86_64::do_write): Write address of .dynamic
section to first entry in .got.plt section.
* layout.h (Layout::dynamic_section): New function.
 
2011-07-13 Sriraman Tallam <tmsriram@google.com>
 
* archive.cc (Archive::get_elf_object_for_member): Add extra parameter
to claim_file call.
* layout.cc (Layout::Layout): Initialize section_ordering_specified_,
input_section_position_, and input_section_glob_.
(read_layout_from_file): Call function section_ordering_specified.
* layout.h (is_section_ordering_specified): New function.
(section_ordering_specified): New function.
(section_ordering_specified_): New boolean member.
* main.cc(main): Call load_plugins after layout object is defined.
* output.cc (Output_section::add_input_section): Use
function section_ordering_specified to check if section ordering is
needed.
* output.cc (Output_section::add_relaxed_input_section): Use
function section_ordering_specified to check if section ordering is
needed.
(Output_section::update_section_layout): New function.
(Output_section::sort_attached_input_sections): Check if input section
must be reordered.
* output.h (Output_section::update_section_layout): New function.
* plugin.cc (get_section_count): New function.
(get_section_type): New function.
(get_section_name): New function.
(get_section_contents): New function.
(update_section_order): New function.
(allow_section_ordering): New function.
(Plugin::load): Add the new interfaces to the transfer vector.
(Plugin_manager::load_plugins): New parameter.
(Plugin_manager::all_symbols_read): New parameter.
(Plugin_manager::claim_file): New parameter. Save the elf object for
unclaimed objects.
(Plugin_manager::get_elf_object): New function.
(Plugin_manager::get_view): Change to directly use the bool to check
if get_view is called from claim_file_hook.
* plugin.h (input_objects): New function
(Plugin__manager::load_plugins): New parameter.
(Plugin_manager::claim_file): New parameter.
(Plugin_manager::get_elf_object): New function.
(Plugin_manager::in_claim_file_handler): New function.
(Plugin_manager::in_claim_file_handler_): New member.
(layout): New function.
* readsyms.cc (Read_symbols::do_read_symbols): Call the claim_file
handler with an extra parameter. Make the elf object before calling
claim_file handler.
* testsuite/plugin_test.c (get_section_count): New function pointer.
(get_section_type): New function pointer.
(get_section_name): New function pointer.
(get_section_contents): New function pointer.
(update_section_order): New function pointer.
(allow_section_ordering): New function pointer.
(onload): Check if the new interfaces exist.
 
2011-07-13 Ian Lance Taylor <iant@google.com>
 
* i386.cc (Target_i386::got_section): If -z now, make .got.plt a
relro section.
* x86_64.cc (Target_x86_64::got_section): Likewise.
* testsuite/Makefile.am (check_PROGRAMS): Add relro_now_test.
(relro_now_test_SOURCES): New variable.
(relro_now_test_DEPENDENCIES): New variable.
(relro_now_test_LDFLAGS): New variable.
(relro_now_test_LDADD): New variable.
(relro_now_test.so): New target.
* testsuite/Makefile.in: Rebuild.
 
2011-07-12 Ian Lance Taylor <iant@google.com>
 
PR gold/12980
* i386.cc (Target_i386::Scan::global): For a GOT reloc, use a
GLOB_DAT relocation rather than a RELATIVE relocation for a
protected symbol when creating a shared library.
* x86_64.cc (Target_x86_64::Scan::global): Likewise.
* testsuite/protected_1.cc (f2, get_f2_addr): New functions.
* testsuite/protected_main_1.cc (main): Test that protected
function has same address.
 
2011-07-11 Ian Lance Taylor <iant@google.com>
 
PR gold/12979
* options.h (class General_options): Add -Bgroup.
* options.cc (General_options::finalize): If -Bgroup is set,
default to --unresolved-symbols=report-all.
* layout.cc (Layout::finish_dynamic_section): Implement -Bgroup.
* target-reloc.h (issue_undefined_symbol_error): Handle
--unresolved-symbols=report-all.
 
2011-07-08 Ian Lance Taylor <iant@google.com>
 
PR gold/11985
* layout.cc (Layout::create_initial_dynamic_sections): Don't crash
if linker script discards key sections.
(Layout::create_dynamic_symtab): Likewise.
(Layout::assign_local_dynsym_offsets): Likewise.
(Layout::sized_create_version_sections): Likewise.
(Layout::create_interp): Likewise.
(Layout::finish_dynamic_section): Likewise.
(Layout::set_dynamic_symbol_size): Likewise.
 
2011-07-08 Ian Lance Taylor <iant@google.com>
 
PR gold/12386
* options.h (class General_options): Add --unresolved-symbols.
* target-reloc.h (issue_undefined_symbol_error): Check
--unresolved-symbols. Add comments.
 
2011-07-08 Ian Lance Taylor <iant@google.com>
 
* testsuite/odr_violation2.cc (Ordering::operator()): Make
expression more complex.
 
2011-07-08 Ian Lance Taylor <iant@google.com>
 
PR gold/11317
* target-reloc.h (issue_undefined_symbol_error): New inline
function, broken out of relocate_section.
(relocate_section): Call issue_undefined_symbol_error.
* i386.cc (Target_i386::Relocate::relocate_tls): Don't crash if
there is no TLS segment if we are about to issue an undefined
symbol error.
* x86_64.cc (Target_x86_64::relocate_tls): Likewise.
 
2011-07-08 Ian Lance Taylor <iant@google.com>
 
PR gold/12279
* resolve.cc (Symbol_table::should_override): Add fromtype
parameter. Change all callers. Give error when linking together
TLS and non-TLS symbol.
(Symbol_table::should_override_with_special): Add fromtype
parameter. Change all callers.
* i386.cc (Target_i386::Relocate::relocate_tls): Don't crash if
there is no TLS segment if we have reported some errors.
* x86_64.cc (Target_x86_64::relocate_tls): Likewise.
 
2011-07-08 Ian Lance Taylor <iant@google.com>
 
PR gold/12372
* target.h (Target::plt_address_for_global): New function.
(Target::plt_address_for_local): New function.
(Target::plt_section_for_global): Remove.
(Target::plt_section_for_local): Remove.
(Target::do_plt_address_for_global): New virtual function.
(Target::do_plt_address_for_local): New virtual function.
(Target::do_plt_section_for_global): Remove.
(Target::do_plt_section_for_local): Remove.
(Target::register_global_plt_entry): Add Symbol_table and Layout
parameters.
* output.cc (Output_data_got::Got_entry::write): Use
plt_address_for_global and plt_address_for_local.
* layout.cc (Layout::add_target_dynamic_tags): Use size and
address of output section.
* i386.cc (class Output_data_plt_i386): Add irelative_rel_,
got_irelative_, and irelative_count_ fields. Update
declarations.
(Output_data_plt_i386::has_irelative_section): New function.
(Output_data_plt_i386::entry_count): Add irelative_count_.
(Output_data_plt_i386::set_final_data_size): Likewise.
(class Target_i386): Add got_irelative_ and rel_irelative_
fields. Update declarations.
(Target_i386::Target_i386): Initialize new fields.
(Target_i386::do_plt_address_for_global): New function replacing
do_plt_section_for_global.
(Target_i386::do_plt_address_for_local): New function replacing
do_plt_section_for_local.
(Target_i386::got_section): Create got_irelative_.
(Target_i386::rel_irelative_section): New function.
(Output_data_plt_i386::Output_data_plt_i386): Initialize new
fields. Don't define __rel_iplt_{start,end}.
(Output_data_plt_i386::add_entry): Add symtab and layout
parameters. Change all callers. Use different PLT and GOT for
IFUNC symbols.
(Output_data_plt_i386::add_local_ifunc_entry): Add symtab and
layout parameters. Change all callers. Use different PLT and
GOT.
(Output_data_plt_i386::rel_tls_desc): Fix formatting.
(Output_data_plt_i386::rel_irelative): New function.
(Output_data_plt_i386::address_for_global): New function.
(Output_data_plt_i386::address_for_local): New function.
(Output_data_plt_i386::do_write): Write out IRELATIVE area. Use
IRELATIVE GOT when changing IFUNC GOT entries.
(Target_i386::Scan::global): Use IRELATIVE GOT for IRELATIVE
reloc.
(Target_i386::do_finalize_sections): Create the __rel_iplt symbols
if we didn't create an IRELATIVE GOT.
(Target_i386::Relocate::relocate): Use plt_address_for_global and
plt_address_for_local.
(Target_i386::do_dynsym_value): Use plt_address_for_global.
* x86_64.cc (class Output_data_plt_x86_64): Add irelative_rel_,
got_irelative_, and irelative_count_ fields. Update
declarations.
(Output_data_plt_x86_64::Output_data_plt_x86_64) [both versions]:
Initialize new fields. Remove symtab parameter. Change all
callers.
(Output_data_plt_x86_64::get_tlsdesc_plt_offset): Add
irelative_count_.
(Output_data_plt_x86_64::has_irelative_section): New function.
(Output_data_plt_x86_64::entry_count): Add irelative_count_.
(class Target_x86_64): Add got_irelative_ and rel_irelative_
fields. Update declarations.
(Target_x86_64::Target_x86_64): Initialize new fields.
(Target_x86_64::do_plt_address_for_global): New function replacing
do_plt_section_for_global.
(Target_x86_64::do_plt_address_for_local): New function replacing
do_plt_section_for_local.
(Target_x86_64::got_section): Create got_irelative_.
(Target_x86_64::rela_irelative_section): New function.
(Output_data_plt_x86_64::init): Remove symtab parameter. Change
all callers. Don't create __rel_iplt_{start,end}.
(Output_data_plt_x86_64::add_entry): Add symtab and layout
parameters. Change all callers. Use different PLT and GOT for
IFUNC symbols.
(Output_data_plt_x86_64::add_local_ifunc_entry): Add symtab and
layout parameters. Change all callers. Use different PLT and
GOT.
(Output_data_plt_x86_64::add_relocation): Add symtab and layout
parameters. Change all callers. Use different PLT and GOT for
IFUNC symbols.
(Output_data_plt_x86_64::rela_tlsdesc): Fix formatting.
(Output_data_plt_x86_64::rela_irelative): New function.
(Output_data_plt_x86_64::address_for_global): New function.
(Output_data_plt_x86_64::address_for_local): New function.
(Output_data_plt_x86_64::set_final_data_size): Likewise.
(Output_data_plt_x86_64::do_write): Write out IRELATIVE area.
(Target_x86_64::init_got_plt_for_update): Create got_irelative_.
(Target_x86_64::register_global_plt_entry): Add symtab and layout
parameters.
(Target_x86_64::Scan::global): Use IRELATIVE GOT for IRELATIVE
reloc.
(Target_x86_64::do_finalize_sections): Create the __rela_iplt
symbols if we didn't create an IRELATIVE GOT.
(Target_x86_64::Relocate::relocate): Use plt_address_for_global and
plt_address_for_local.
(Target_x86_64::do_dynsym_value): Use plt_address_for_global.
* testsuite/ifuncvar1.c: New test file.
* testsuite/ifuncvar2.c: New test file.
* testsuite/ifuncvar3.c: New test file.
* testsuite/Makefile.am (check_PROGRAMS): Add ifuncvar.
(ifuncvar1_pic.o, ifuncvar2_pic.o, ifuncvar.so): New targets.
(ifuncvar_SOURCES, ifuncvar_DEPENDENCIES): New variables.
(ifuncvar_LDFLAGS, ifuncvar_LDADD): New variables.
* testsuite/Makefile.in: Rebuild.
 
2011-07-07 Cary Coutant <ccoutant@google.com>
 
* testsuite/Makefile.am (two_file_test_1_v1_ndebug.o): New target.
(two_file_test_1_ndebug.o): Likewise.
(two_file_test_1b_ndebug.o): Likewise.
(two_file_test_2_ndebug.o): Likewise.
(two_file_test_main_ndebug.o): Likewise.
(incremental_test_2): Link with no-debug versions.
 
2011-07-06 Cary Coutant <ccoutant@google.com>
 
* gold/incremental.cc
(Output_section_incremental_inputs::write_info_blocks): Check for
hidden and internal symbols.
 
2011-07-06 Cary Coutant <ccoutant@google.com>
 
* incremental.cc (Sized_incremental_binary::do_file_has_changed):
Check disposition for startup file.
(Incremental_inputs::report_command_line): Ignore
--incremental-startup-unchanged option.
* options.cc (General_options::parse_incremental_startup_unchanged):
New function.
(General_options::General_options): Initialize new data member.
* options.h (Incremental_disposition): Add INCREMENTAL_STARTUP.
(General_options): Add --incremental-startup-unchanged option.
(General_options::incremental_startup_disposition): New function.
(General_options::incremental_startup_disposition_): New data member.
 
2011-07-06 Cary Coutant <ccoutant@google.com>
 
* incremental.cc (Sized_incremental_binary::setup_readers): Pass
input file index to Script_info ctor.
(Sized_incremental_binary::do_file_has_changed): Find the
command-line argument for files named in scripts.
* incremental.h (Script_info::Script_info): New ctor
with input file index.
(Script_info::input_file_index): New function.
(Script_info::input_file_index_): New data member.
(Incremental_binary::get_library): Add const.
(Incremental_binary::get_script_info): Add const.
* readsyms.cc (Read_member::is_runnable): Check for this_blocker_.
* testsuite/Makefile.am (incremental_test_5): New test case.
(incremental_test_6): New test case.
* testsuite/Makefile.in: Regenerate.
 
2011-07-06 Cary Coutant <ccoutant@google.com>
 
* incremental.cc (Sized_incremental_binary::do_check_inputs): Add
debug output when command lines differ.
 
2011-07-06 Cary Coutant <ccoutant@google.com>
 
* incremental.cc (Incremental_inputs::report_command_line): Ignore
--incremental-patch option.
* layout.cc (Free_list::allocate): Extend allocation beyond original
end if enabled.
(Layout::make_output_section): Mark sections that should get
patch space.
* options.cc (parse_percent): New function.
* options.h (parse_percent): New function.
(DEFINE_percent): New macro.
(General_options): Add --incremental-patch option.
* output.cc (Output_section::Output_section): Initialize new data
members.
(Output_section::add_input_section): Print section name when out
of patch space.
(Output_section::add_output_section_data): Likewise.
(Output_section::set_final_data_size): Add patch space when
doing --incremental-full.
(Output_section::do_reset_address_and_file_offset): Remove patch
space.
(Output_segment::set_section_list_addresses): Print debug output
only if --incremental-update.
* output.h (Output_section::set_is_patch_space_allowed): New function.
(Output_section::is_patch_space_allowed_): New data member.
(Output_section::patch_space_): New data member.
* parameters.cc (Parameters::incremental_full): New function.
* parameters.h (Parameters::incremental_full): New function
* testsuite/Makefile.am (incremental_test_2): Add test for
--incremental-patch option.
* testsuite/Makefile.in: Regenerate.
* testsuite/two_file_test_1_v1.cc (t1, t2, t3): Add comments.
(t18): Remove function body.
 
2011-07-05 Doug Kwan <dougkwan@google.com>
 
PR gold/12771
* arm.cc (Arm_relocate_functions::abs8): Use int32_t for addend and
Arm_Address type for relocation result.
(Arm_relocate_functions::abs16): Use unaligned access. Also fix
overflow check.
(Arm_relocate_functions::abs32): Use unaligned access.
(Arm_relocate_functions::rel32): Ditto.
(Arm_relocate_functions::prel31): Ditto.
(Arm_exidix_cantunwind::do_fixed_endian_write): Ditto.
* testsuite/Makefile.am: Add new test arm_unaligned_reloc for unaligned
static data relocations.
* testsuite/Makefile.in: Regnerate.
* testsuite/arm_unaligned_reloc.{s,sh}: New files.
 
2011-07-05 Ian Lance Taylor <iant@google.com>
 
PR gold/12392
* i386.cc (Target_i386::do_finalize_sections): Define __rel_iplt
symbols if necessary.
* x86_64.cc (Target_x86_64::do_finalize_sections): Likewise.
 
2011-07-05 Ian Lance Taylor <iant@google.com>
 
PR gold/12952
* resolve.cc (Symbol::override_base_with_special): Simply override
version with special symbol version, ignoring previous version.
 
2011-07-05 Ian Lance Taylor <iant@google.com>
 
* object.cc (Sized_relobj_file::include_section_group): Add
information to comment about signature location.
 
2011-07-02 Ian Lance Taylor <iant@google.com>
 
PR gold/12957
* options.h (class General_options): Add -f and -F.
* options.cc (General_options::finalize): Fatal error if -f/-F
are used without -shared.
* layout.cc (Layout::finish_dynamic_section): Implement -f/-F.
 
2011-07-02 Ian Lance Taylor <iant@google.com>
 
* dirsearch.cc (Dir_cache::read_files): Ignore ENOTDIR errors.
 
2011-07-01 Ian Lance Taylor <iant@google.com>
 
PR gold/12525
PR gold/12952
* resolve.cc (Symbol::override_base_with_special): Don't override
the version if the overriding symbol has a different name.
* dynobj.cc (Versions::add_def): Add dynpool parameter. Change
all callers. If we give an error about an undefined version,
define the base version if necessary.
* dynobj.h (class Versions): Update declaration.
* testsuite/weak_alias_test_5.cc: New file.
* testsuite/weak_alias_test.script: New file.
* testsuite/weak_alias_test_main.cc: Check that versioned_symbol
and versioned_alias have the right value, and call t2.
* testsuite/Makefile.am (weak_alias_test_DEPENDENCIES): Add
weak_alias_test_5.so.
(weak_alias_test_LDADD): Likewise.
(weak_alias_test_5_pic.o, weak_alias_test_5.so): New targets.
* testsuite/Makefile.in: Rebuild.
 
2011-07-01 Ian Lance Taylor <iant@google.com>
 
PR gold/12525
* options.h (class General_options): Support -z notext.
* testsuite/Makefile.am (two_file_shared_1_nonpic.so): Use
-Wl,-z,notext.
(two_file_shared_nonpic.so): Likewise.
(two_file_shared_mixed.so): Likewise.
(two_file_shared_mixed_1.so): Likewise.
(weak_undef_lib_nonpic.so): Likewise.
(alt/weak_undef_lib_nonpic.so): Likewise.
(tls_test_shared_nonpic.so): Likewise.
* testsuite/Makefile.in: Rebuild.
 
2011-07-01 Ian Lance Taylor <iant@google.com>
 
PR gold/12525
* configure.ac: Test whether static linking works, setting
the automake conditional HAVE_STATIC.
* testsuite/Makefile.am: Disable tests using -static if
HAVE_STATIC is not true.
* configure, testsuite/Makefile.in: Rebuild.
 
2011-07-01 Ian Lance Taylor <iant@google.com>
 
PR gold/12525
* ehframe.cc (Eh_frame_hdr::get_fde_pc): Handle DW_EH_PE_datarel.
Assert if we see DW_EH_PE_indirect.
* target.h (Target::ehframe_datarel_base): New function.
(Target::do_ehframe_datarel_base): New target function.
* i386.cc (Target_i386::do_ehframe_datarel_base): New function.
* x86_64.cc (Target_x86_64::do_ehframe_datarel_base): New
function.
 
2011-07-01 Ian Lance Taylor <iant@google.com>
 
PR gold/12571
* options.h (class General_options): Add
--ld-generated-unwind-info.
* ehframe.cc (Fde::write): Add address parameter. Change all
callers. If associated with PLT, fill in address and size.
(Cie::set_output_offset): Only add merge mapping if there is an
object.
(Cie::write): Add address parameter. Change all callers.
(Eh_frame::add_ehframe_for_plt): New function.
* ehframe.h (class Fde): Update declarations. Move shndx_ and
input_offset_ fields into union u_, with new plt field.
(Fde::Fde): Adjust for new union field.
(Fde::Fde) [Output_data version]: New constructor.
(Fde::add_mapping): Only add merge mapping if there is an object.
(class Cie): Update declarations.
(class Eh_frame): Declare add_ehframe_for_plt.
* layout.cc (Layout::layout_eh_frame): Break out code into
make_eh_frame_section, and call it.
(Layout::make_eh_frame_section): New function.
(Layout::add_eh_frame_for_plt): New function.
* layout.h (class Layout): Update declarations.
* merge.cc (Merge_map::add_mapping): Add assertion.
* i386.cc: Include "dwarf.h".
(class Output_data_plt_i386): Make first_plt_entry,
dyn_first_plt_entry, exec_plt_entry, and dyn_plt_entry const. Add
plt_eh_frame_cie_size, plt_eh_frame_fde_size, plt_eh_frame_cie,
and plt_eh_frame_fde.
(Output_data_plt_i386::Output_data_plt_i386): Align to 16-byte
boundary. Call add_eh_frame_for_plt if appropriate.
* x86_64.cc: Include "dwarf.h".
(class Output_data_plt_x86_64): Align to 16-byte boundary. Make
first_plt_entry, plt_entry and tlsdesc_plt_entry const. Add
plt_eh_frame_cie_size, plt_eh_frame_fde_size, plt_eh_frame_cie,
and plt_eh_frame_fde.
(Output_data_plt_x86_64::init): Call add_eh_frame_for_plt if
appropriate.
 
2011-06-29 Ian Lance Taylor <iant@google.com>
 
PR gold/12629
* object.cc (Sized_relobj_file::layout_section): Change shdr
parameter to be const.
(Sized_relobj_file::layout_eh_frame_section): New function, broken
out of do_layout.
(Sized_relobj_file::do_layout): Defer .eh_frame sections if
appropriate. Call layout_eh_frame_section.
(Sized_relobj_file::do_layout_deferred_sections): Handle .eh_frame
sections.
* object.h (class Sized_relobj_file): Update declarations.
 
2011-06-29 Ian Lance Taylor <iant@google.com>
 
PR gold/12652
* script.cc (Token::integer_value): Accept trailing M/m/K/k
modifier.
(Lex::gather_token): Accept trailing M/m/K/k for integers.
 
2011-06-29 Ian Lance Taylor <iant@google.com>
 
PR gold/12675
* object.cc (Sized_relobj_file::check_eh_frame_flags): Check for
SHT_X86_64_UNWIND.
* layout.cc (Layout::layout_eh_frame): Likewise.
 
2011-06-29 Ian Lance Taylor <iant@google.com>
 
PR gold/12695
* layout.cc (Layout::symtab_section_shndx): New function.
* layout.h (class Layout): Declare symtab_section_shndx.
* output.cc (Output_section::write_header): Call it.
 
2011-06-29 Ian Lance Taylor <iant@google.com>
 
PR gold/12818
* symtab.cc (Symbol::should_add_dynsym_entry): Don't add undefined
symbols which are not used in a relocation.
 
2011-06-28 Ian Lance Taylor <iant@google.com>
 
PR gold/12898
* layout.cc (Layout::segment_precedes): Don't crash if a linker
script create indistinguishable segments.
(Layout::set_segment_offsets): Use stable_sort when sorting
segments. Pass this to Compare_segments constructor.
* layout.h (class Layout): Make segment_precedes non-static.
(class Compare_segments): Change from struct to class. Add
layout_ field. Add constructor.
* script-sections.cc
(Script_sections::attach_sections_using_phdrs_clause): Rename
local orphan to is_orphan. Don't report failure to put empty
section in segment. On attachment failure, report name of
section, and attach to first PT_LOAD segment.
 
2011-06-28 Ian Lance Taylor <iant@google.com>
 
PR gold/12934
* target-select.cc (Target_selector::Target_selector): Add
emulation parameter. Change all callers.
(select_target_by_bfd_name): Rename from select_target_by_name.
Change all callers.
(select_target_by_emulation): New function.
(supported_emulation_names): New function.
* target-select.h (class Target_selector): Add emulation_ field.
Update declarations.
(Target_selector::recognize_by_bfd_name): Rename from
recognize_by_name. Change all callers.
(Target_selector::supported_bfd_names): Rename from
supported_names. Change all callers.
(Target_selector::recognize_by_emulation): New function.
(Target_selector::supported_emulations): New function.
(Target_selector::emulation): New function.
(Target_selector::do_recognize_by_bfd_name): Rename from
do_recognize_by_name. Change all callers.
(Target_selector::do_supported_bfd_names): Rename from
do_supported_names. Change all callers.
(Target_selector::do_recognize_by_emulation): New function.
(Target_selector::do_supported_emulations): New function.
(select_target_by_bfd_name): Change name in declaration.
(select_target_by_emulation): Declare.
(supported_emulation_names): Declare.
* parameters.cc (parameters_force_valid_target): Try to find
target based on emulation from -m option.
* options.h (class General_options): Change doc string for -m.
* options.cc (help): Print emulations.
(General_options::parse_V): Likewise.
* freebsd.h (Target_selector_freebsd::Target_selector_freebsd):
Add emulation parameter. Change all callers.
 
2011-06-28 Ian Lance Taylor <iant@google.com>
 
* target.h (class Target): Add osabi_ field.
(Target::osabi): New function.
(Target::set_osabi): New function.
(Target::Target): Initialize osabi_.
(Target::do_adjust_elf_header): Make pure virtual.
(Sized_target::do_adjust_elf_header): Declare.
* target.cc (Sized_target::do_adjust_elf_header): New function.
(class Sized_target): Instantiate all versions.
* freebsd.h (class Target_freebsd): Remove.
(Target_selector_freebsd::do_recognize): Call set_osabi on
Target.
(Target_selector_freebsd::do_recognize_by_name): Likewise.
(Target_selector_freebsd::set_osabi): Remove.
* i386.cc (class Target_i386): Inherit from Sized_target rather
than Target_freebsd.
* x86_64.cc (class Target_x86_64): Likewise.
 
2011-06-28 Ian Lance Taylor <iant@google.com>
 
* target.h (Target::can_check_for_function_pointers): Rewrite.
Make non-virtual.
(Target::can_icf_inline_merge_sections): Likewise.
(Target::section_may_have_icf_unsafe_poineters): Likewise.
(Target::Target_info): Add can_icf_inline_merge_sections field.
(Target::do_can_check_for_function_pointers): New virtual
function.
(Target::do_section_may_have_icf_unsafe_pointers): Likewise.
* arm.cc (Target_arm::do_can_check_for_function_pointers): Rename
from can_check_for_function_pointers, move in file.
(Target_arm::do_section_may_have_icf_unsafe_pointers): Rename from
section_may_have_icf_unsafe_poineters, move in file.
(Target_arm::arm_info): Initialize can_icf_inline_merge_sections.
* i386.cc (Target_i386::do_can_check_for_function_pointers):
Rename from can_check_for_function_pointers, move in file.
(Target_i386::can_icf_inline_merge_sections): Remove.
(Target_i386::i386_info): Initialize
can_icf_inline_merge_sections.
* powerpc.cc (Target_powerpc::powerpc_info) [all versions]:
Initialize can_icf_inline_merge_sections.
* sparc.cc (Target_sparc::sparc_info) [both version]: Likewise.
* x86_64.cc (Target_x86_64::do_can_check_for_function_pointers):
Rename from can_check_for_function_pointers, move in file.
(Target_x86_64::can_icf_inline_merge_sections): Remove.
(Target_x86_64::x86_64_info): Initialize
can_icf_inline_merge_sections.
* testsuite/testfile.cc (Target_test::test_target_info):
Likewise.
* icf.cc (get_section_contents): Correct formatting.
 
2011-06-27 Ian Lance Taylor <iant@google.com>
 
* symtab.cc (Symbol::versioned_name): New function.
(Symbol_table::add_to_final_symtab): Use versioned_name when
appropriate.
(Symbol_table::sized_write_symbol): Likewise.
* symtab.h (class Symbol): Declare versioned_name.
* stringpool.h (class Stringpool_template): Add variant of add
which takes a std::basic_string.
* testsuite/Makefile.am (check_PROGRAMS): Add ver_test_12.
(ver_test_12_SOURCES, ver_test_12_DEPENDENCIES): New variables.
(ver_test_12_LDFLAGS, ver_test_12_LDADD): New variables.
(ver_test_12.o): New target.
* testsuite/Makefile.in: Rebuild.
 
2011-06-27 Doug Kwan <dougkwan@google.com>
 
* arm.cc (Arm_relocate_functions::thm_jump8,
Arm_relocate_functions::thm_jump11): Use a wider signed
type to compute offset.
* testsuite/Makefile.am: Add new tests arm_thm_jump11 and
arm_thm_jump8.
* testsuite/Makefile.in: Regenerate.
* testsuite/arm_branch_in_range.sh: Check test results of
arm_thm_jump11 and arm_thm_jump8.
* testsuite/arm_thm_jump11.s: New test source file.
* testsuite/arm_thm_jump11.t: New linker script.
* testsuite/arm_thm_jump8.s: New test source file.
* testsuite/arm_thm_jump8.t: New linker script.
 
2011-06-24 Ian Lance Taylor <iant@google.com>
 
* layout.cc: Include "object.h".
(ctors_sections_in_init_array): New static variable.
(Layout::is_ctors_in_init_array): New function.
(Layout::layout): Add entry to ctors_sections_in_init_array if
appropriate.
* layout.h (class Layout): Declare is_ctors_in_init_array.
* reloc.cc (Sized_relobj_file::do_relocate): Call reverse_words if
is_ctors_reverse_view is set.
(Sized_relobj_file::write_sections): Add layout parameter. Change
all callers. Set is_ctors_reverse_view field of View_size.
(Sized_relobj_file::reverse_words): New function.
* object.h (Sized_relobj_file::View_size): Add
is_ctors_reverse_view field.
(class Sized_relobj_file): Update declarations.
* testsuite/initpri3.c: New test.
* testsuite/Makefile.am: (check_PROGRAMS): Add initpri3a and
initpri3b.
(initpri3a_SOURCES, initpri3a_DEPENDENCIES): New variables.
(initpri3a_LDFLAGS, initpri3a_LDADD): New variables.
(initpri3b_SOURCES, initpri3b_DEPENDENCIES): New variables.
(initpri3b_LDFLAGS, initpri3b_LDADD): New variables.
* testsuite/Makefile.in: Rebuild.
 
2011-06-24 Cary Coutant <ccoutant@google.com>
 
* testsuite/Makefile.am: Add in-tree assembler to gcctestdir.
(debug_msg_cdebug.o, odr_violation1_cdebug.o, odr_violation2_cdebug.o)
(debug_msg_cdebug.err): New targets.
* testsuite/Makefile.in: Regenerate.
* testsuite/debug_msg.sh: Check output of link with compressed debug.
Fix checks for link with shared library.
 
2011-06-24 Doug Kwan <dougkwan@google.com>
 
* arm.cc (Arm_output_section::append_text_sections_to_list): Do not
skip empty text sections.
* testsuite/arm_exidx_test.s: Test handling of an empty text section.
 
2011-06-22 Ian Lance Taylor <iant@google.com>
 
PR gold/12910
* options.h (class General_options): Add --ctors-in-init-array.
* layout.cc (Layout::get_output_section): Treat SHT_INIT_ARRAY and
friends as SHT_PROGBITS for merging sections.
(Layout::layout): Remove special handling of .init_array and
friends. Don't sort if doing relocatable link. Sort for .ctors
and .dtors if ctors_in_init_array.
(Layout::make_output_section): Force correct section types for
.init_array and friends. Don't sort if doing relocatable link,
Don't sort .ctors and .dtors if ctors_in_init_array.
(Layout::section_name_mapping): Remove .ctors. and .dtorso.
(Layout::output_section_name): Add relobj parameter. Change all
callers. Handle .ctors. and .dtors. in code rather than table.
Handle .ctors and .dtors if ctors_in_init_array.
(Layout::match_file_name): New function, moved from output.cc.
* layout.h (class Layout): Update declarations.
* output.cc: Include "layout.h".
(Input_section_sort_entry::get_priority): New function.
(Input_section_sort_entry::match_file_name): Just call
Layout::match_file_name.
(Output_section::Input_section_sort_init_fini_compare::operator()):
Handle .ctors and .dtors. Sort by explicit priority rather than
by name.
* configure.ac: Remove CONSTRUCTOR_PRIORITY test and conditional.
* testsuite/initpri2.c: New test.
* testsuite/Makefile.am: Don't test CONSTRUCTOR_PRIORITY.
(check_PROGRAMS): Add initpri2.
(initpri2_SOURCES, initpri2_DEPENDENCIES): New variables.
(initpri2_LDFLAGS, initpri2_LDADD): New variables.
* configure, testsuite/Makefile.in: Rebuild.
 
2011-06-19 Ian Lance Taylor <iant@google.com>
 
PR gold/12880
* layout.cc (Layout::attach_allocated_section_to_segment): Add a
.interp section to a PT_INTERP segment even if we have seen a
--dynamic-linker option. Don't do it if we have seen a PHDRS
clause in a linker script.
(Layout::finalize): Don't create a .interp section if we've
already create a PT_INTERP segment.
(Layout::create_interp): Always call choose_output_section (revert
patch of 2011-06-17). Don't create PT_INTERP segment.
* script-sections.cc
(Script_sections::create_note_and_tls_segments): Add a .interp
section to a PT_INTERP segment even if we have seen a
--dynamic-linker option.
 
2011-06-18 Ian Lance Taylor <iant@google.com>
 
* layout.cc (Layout::finish_dynamic_section): Don't set DT_TEXTREL
merely because a non-PT_LOAD segment has a dynamic reloc.
 
2011-06-18 Ian Lance Taylor <iant@google.com>
 
* layout.cc (Layout::finish_dynamic_section): Don't create
DT_FLAGS entry if not needed.
 
2011-06-18 Ian Lance Taylor <iant@google.com>
 
PR gold/12745
* layout.cc (Layout::layout_eh_frame): Correct handling of
writable .eh_frame section.
 
2011-06-17 Ian Lance Taylor <iant@google.com>
 
PR gold/12893
* resolve.cc (Symbol_table::resolve): Don't give an error if a
symbol is redefined with the exact same object and value.
 
2011-06-17 Ian Lance Taylor <iant@google.com>
 
PR gold/12880
* layout.h (class Layout): Add interp_segment_ field.
* layout.cc (Layout::Layout): Initialize interp_segment_ field.
(Layout::attach_allocated_section_to_segment): If making shared
library, put .interp section in PT_INTERP segment.
(Layout::finalize): Also call create_interp if -dynamic-linker
option was used.
(Layout::create_interp): Assert that there is no PT_INTERP
segment. If not using a SECTIONS clause, use make_output_section.
(Layout::make_output_segment): Set interp_segment_ if PT_INTERP.
* script-sections.cc
(Script_sections::create_note_and_tls_segments): If making shared
library, put .interp section in PT_INTERP segment.
 
2011-06-17 Ian Lance Taylor <iant@google.com>
 
* object.cc (Sized_relobj_file::do_layout): Keep warning sections
when making a shared library.
 
2011-06-17 Ian Lance Taylor <iant@google.com>
 
* x86_64.cc (Target_x86_64::Scan::check_non_pic): Add gsym
parameter. Change all callers. Don't issue warning about PC32
against locally defined symbol.
 
2011-06-16 Ian Lance Taylor <iant@google.com>
 
* symtab.cc (Warnings::issue_warning): Don't warn if relocation
occurs in same object.
 
2011-06-14 Alan Modra <amodra@gmail.com>
 
* po/POTFILES.in: Regenerate.
 
2011-06-09 Ian Lance Taylor <iant@google.com>
 
* script-sections.cc
1258,7 → 2158,7
* testsuite/Makefile.am (final_layout.stdout): Use -n option with nm.
* testsuite/Makefile.in: Regenerate.
 
2010-03-23 Rafael Ávila de Espíndola <respindola@mozilla.com>
2011-03-23 Rafael Ávila de Espíndola <respindola@mozilla.com>
 
* plugin.cc (get_view): New.
(Plugin::load): Pass get_view to the plugin.
1359,7 → 2259,7
the toolchain building binutils.
* configure: Rebuild.
 
2010-02-18 Rafael Ávila de Espíndola <respindola@mozilla.com>
2011-02-18 Rafael Ávila de Espíndola <respindola@mozilla.com>
 
* symtab.cc (Symbol::should_add_dynsym_entry) Return false for
plugin only symbols.
1378,7 → 2278,7
* reloc.cc (Sized_relobj::do_relocate): Don't call
clear_local_symbols.
 
2010-02-08 Rafael Ávila de Espíndola <respindola@mozilla.com>
2011-02-08 Rafael Ávila de Espíndola <respindola@mozilla.com>
 
* plugin.cc (is_visible_from_outside): Return true for symbols
in the -u option.
/trunk/gnu/binutils/gold/script.cc
1,6 → 1,6
// script.cc -- handle linker scripts for gold.
 
// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
146,13 → 146,7
}
 
uint64_t
integer_value() const
{
gold_assert(this->classification_ == TOKEN_INTEGER);
// Null terminate.
std::string s(this->value_, this->value_length_);
return strtoull(s.c_str(), NULL, 0);
}
integer_value() const;
 
private:
// The token classification.
171,6 → 165,35
int charpos_;
};
 
// Return the value of a TOKEN_INTEGER.
 
uint64_t
Token::integer_value() const
{
gold_assert(this->classification_ == TOKEN_INTEGER);
 
size_t len = this->value_length_;
 
uint64_t multiplier = 1;
char last = this->value_[len - 1];
if (last == 'm' || last == 'M')
{
multiplier = 1024 * 1024;
--len;
}
else if (last == 'k' || last == 'K')
{
multiplier = 1024;
--len;
}
 
char *end;
uint64_t ret = strtoull(this->value_, &end, 0);
gold_assert(static_cast<size_t>(end - this->value_) == len);
 
return ret * multiplier;
}
 
// This class handles lexing a file into a sequence of tokens.
 
class Lex
474,9 → 497,7
// For a number we accept 0x followed by hex digits, or any sequence
// of digits. The old linker accepts leading '$' for hex, and
// trailing HXBOD. Those are for MRI compatibility and we don't
// accept them. The old linker also accepts trailing MK for mega or
// kilo. FIXME: Those are mentioned in the documentation, and we
// should accept them.
// accept them.
 
// Return whether C1 C2 C3 can start a hex number.
 
703,8 → 724,15
const char** pp)
{
const char* new_match = NULL;
while ((new_match = (this->*can_continue_fn)(match)))
while ((new_match = (this->*can_continue_fn)(match)) != NULL)
match = new_match;
 
// A special case: integers may be followed by a single M or K,
// case-insensitive.
if (classification == Token::TOKEN_INTEGER
&& (*match == 'm' || *match == 'M' || *match == 'k' || *match == 'K'))
++match;
 
*pp = match;
return this->make_token(classification, start, match - start, start);
}
2804,7 → 2832,7
{
Parser_closure* closure = static_cast<Parser_closure*>(closurev);
std::string name(default_name, default_length);
Target* target = select_target_by_name(name.c_str());
Target* target = select_target_by_bfd_name(name.c_str());
if (target == NULL || !parameters->is_compatible_target(target))
{
if (closure->skip_on_incompatible_target())
/trunk/gnu/binutils/gold/testsuite/justsyms_exec.c
0,0 → 1,53
// justsyms_exec.c -- test --just-symbols for gold
 
// Copyright 2011 Free Software Foundation, Inc.
// Written by Cary Coutant <ccoutant@google.com>.
 
// This file is part of gold.
 
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
// MA 02110-1301, USA.
 
// The Linux kernel builds an executable file using a linker script, and
// then links against that object file using the -R option. This is a
// test for that usage.
 
#include <stdio.h>
 
extern int exported_func(void);
 
extern int exported_data;
 
static int errs = 0;
 
void check(void *sym, long v, const char *name);
 
void
check(void *sym, long v, const char *name)
{
if (sym != (void *)v)
{
fprintf(stderr, "&%s is %8p, expected %08lx\n", name, sym, v);
errs++;
}
}
 
int
main(void)
{
check(exported_func, 0x1000200, "exported_func");
check(&exported_data, 0x2000000, "exported_data");
return errs;
}
/trunk/gnu/binutils/gold/testsuite/protected_1.cc
31,3 → 31,28
{
return 1;
}
 
// The function f2 is used to test that the executable can see the
// same function address for a protected function in the executable
// and in the shared library. We can't use the visibility attribute
// here, becaues that may cause gcc to generate a PC relative reloc;
// we need it to get the value from the GOT. I'm not sure this is
// really useful, given that it doesn't work with the visibility
// attribute. This test exists here mainly because the glibc
// testsuite has the same test, and we want to make sure that gold
// passes the glibc testsuite.
 
extern "C" int f2();
asm(".protected f2");
 
extern "C" int
f2()
{
return 2;
}
 
int
(*get_f2_addr())()
{
return f2;
}
/trunk/gnu/binutils/gold/testsuite/arm_unaligned_reloc.sh
0,0 → 1,50
#!/bin/sh
 
# arm_unaligned_reloc.sh -- test ARM unaligned static data relocations.
 
# Copyright 2011 Free Software Foundation, Inc.
# Written by Doug Kwan <dougkwan@google.com>
 
# This file is part of gold.
 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
# MA 02110-1301, USA.
 
# This file goes with the assembler source file arm_unaligned_reloc.s,
# that is assembled and linked as a dummy executable. We want to check
# it is okay to do unaligned static data relocations.
 
check()
{
if ! grep -q -e "$2" "$1"
then
echo "Did not find pattern \"$2\" in $1:"
echo " $2"
echo ""
echo "Actual disassembly below:"
cat "$1"
exit 1
fi
}
 
check arm_unaligned_reloc.stdout "^00009000 <x>:$"
check arm_unaligned_reloc.stdout "^0000a001 <abs32>:$"
check arm_unaligned_reloc.stdout "^ a001: 00009000 .*$"
check arm_unaligned_reloc.stdout "^0000a005 <rel32>:"
check arm_unaligned_reloc.stdout "^ a005: ffffeffb .*$"
check arm_unaligned_reloc.stdout "^0000a009 <abs16>:"
check arm_unaligned_reloc.stdout "^ a009: 00009000 .*$"
 
exit 0
trunk/gnu/binutils/gold/testsuite/arm_unaligned_reloc.sh Property changes : Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/gnu/binutils/gold/testsuite/weak_alias_test_main.cc =================================================================== --- trunk/gnu/binutils/gold/testsuite/weak_alias_test_main.cc (revision 158) +++ trunk/gnu/binutils/gold/testsuite/weak_alias_test_main.cc (revision 159) @@ -39,7 +39,12 @@ extern int strong_aliased_3; extern int weak_aliased_4; +// Defined in weak_alias_test_5.cc +extern int versioned_symbol; +extern int versioned_alias; + extern bool t1(); +extern bool t2(); int main() @@ -64,4 +69,12 @@ // Make sure the symbols look right from a shared library. assert(t1()); + + // versioned_symbol comes from weak_alias_test_5.cc. + assert(versioned_symbol == 1); + // So does versioned_alias. + assert(versioned_alias == 1); + + // Make sure the versioned symbols look right from a shared library. + assert(t2()); }
/trunk/gnu/binutils/gold/testsuite/two_file_test_1_v1.cc
62,7 → 62,7
bool
t1()
{
return t1_2() == 0;
return t1_2() == 0; // Intentionally wrong.
}
 
// 2 Code in file 1 refers to global data in file 2.
70,7 → 70,7
bool
t2()
{
return v2 == 0;
return v2 == 0; // Intentionally wrong.
}
 
// 3 Code in file 1 referes to common symbol in file 2.
78,7 → 78,7
bool
t3()
{
return v3 == 0;
return v3 == 0; // Intentionally wrong.
}
 
// 4 Code in file 1 refers to offset within global data in file 2.
231,13 → 231,6
bool
t18()
{
char c = 'a';
for (int i = 0; i < T17_COUNT; ++i)
{
const char* s = f18(i);
if (s[0] != c || s[1] != '\0')
return false;
++c;
}
// Stubbed out; full implementation in two_file_test_1.cc.
return true;
}
/trunk/gnu/binutils/gold/testsuite/arm_unaligned_reloc.s
0,0 → 1,44
.syntax unified
 
.global _start
.type _start, %function
.text
_start:
bx lr
.size _start,.-_start
 
.section .data.0,"aw",%progbits
.align 12
.type x, %object
.size x, 4
x:
.word 1
 
.section .data.1,"aw",%progbits
.align 2
 
# This causes following relocations to be unaligned.
.global padding
.type padding, %object
.size padding, 1
padding:
.byte 0
 
.global abs32
.type abs32, %object
.size abs32, 4
abs32:
.word x
 
.global rel32
.type rel32, %object
.size rel32, 4
rel32:
.word x - .
 
.global abs16
.type abs16, %object
.size abs16, 2
abs16:
.short x
.short 0
/trunk/gnu/binutils/gold/testsuite/Makefile.am
80,6 → 80,12
rm -f gcctestdir/ld
(cd gcctestdir && $(LN_S) ../../ld-new ld)
 
# Some tests require the latest features of an in-tree assembler.
gcctestdir/as: $(TEST_AS)
test -d gcctestdir || mkdir -p gcctestdir
rm -f gcctestdir/as
(cd gcctestdir && $(LN_S) $(abs_top_builddir)/../gas/as-new as)
 
endif GCC
 
check_PROGRAMS += object_unittest
251,22 → 257,28
$(TEST_NM) icf_sht_rel_addend_test > icf_sht_rel_addend_test.stdout
 
check_PROGRAMS += basic_test
check_PROGRAMS += basic_static_test
check_PROGRAMS += basic_pic_test
check_PROGRAMS += basic_static_pic_test
basic_test.o: basic_test.cc
$(CXXCOMPILE) -O0 -c -o $@ $<
basic_test: basic_test.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ basic_test.o
 
if HAVE_STATIC
check_PROGRAMS += basic_static_test
basic_static_test: basic_test.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -static basic_test.o
endif
 
basic_pic_test.o: basic_test.cc
$(CXXCOMPILE) -O0 -c -fpic -o $@ $<
basic_pic_test: basic_pic_test.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ basic_pic_test.o
 
if HAVE_STATIC
check_PROGRAMS += basic_static_pic_test
basic_static_pic_test: basic_pic_test.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -static basic_pic_test.o
endif
 
check_PROGRAMS += basic_pie_test
basic_pie_test.o: basic_test.cc
275,20 → 287,20
$(CXXLINK) -Bgcctestdir/ -pie basic_pie_test.o
 
check_PROGRAMS += constructor_test
check_PROGRAMS += constructor_static_test
constructor_test_SOURCES = constructor_test.cc
constructor_test_DEPENDENCIES = gcctestdir/ld
constructor_test_LDFLAGS = -Bgcctestdir/
constructor_test_LDADD =
 
if HAVE_STATIC
check_PROGRAMS += constructor_static_test
constructor_static_test_SOURCES = $(constructor_test_SOURCES)
constructor_static_test_DEPENDENCIES = $(constructor_test_DEPENDENCIES)
constructor_static_test_LDFLAGS = $(constructor_test_LDFLAGS) -static
constructor_static_test_LDADD = $(constructor_test_LDADD)
endif
 
 
check_PROGRAMS += two_file_test
check_PROGRAMS += two_file_static_test
check_PROGRAMS += two_file_pic_test
two_file_test_SOURCES = \
two_file_test_1.cc \
300,10 → 312,13
two_file_test_LDFLAGS = -Bgcctestdir/
two_file_test_LDADD =
 
if HAVE_STATIC
check_PROGRAMS += two_file_static_test
two_file_static_test_SOURCES = $(two_file_test_SOURCES)
two_file_static_test_DEPENDENCIES = $(two_file_test_DEPENDENCIES)
two_file_static_test_LDFLAGS = $(two_file_test_LDFLAGS) -static
two_file_static_test_LDADD = $(two_file_test_LDADD)
endif
 
two_file_pic_test_SOURCES = two_file_test_main.cc
two_file_pic_test_DEPENDENCIES = \
413,15 → 428,15
check_PROGRAMS += two_file_mixed_shared_test
check_PROGRAMS += two_file_mixed_2_shared_test
two_file_shared_1_nonpic.so: two_file_test_1.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -shared two_file_test_1.o two_file_test_1b.o
$(CXXLINK) -Bgcctestdir/ -shared two_file_test_1.o two_file_test_1b.o -Wl,-z,notext
two_file_shared_2_nonpic.so: two_file_test_2.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -shared two_file_test_2.o
two_file_shared_nonpic.so: two_file_test_1.o two_file_test_1b.o two_file_test_2.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -shared two_file_test_1.o two_file_test_1b.o two_file_test_2.o
$(CXXLINK) -Bgcctestdir/ -shared two_file_test_1.o two_file_test_1b.o two_file_test_2.o -Wl,-z,notext
two_file_shared_mixed.so: two_file_test_1_pic.o two_file_test_1b_pic.o two_file_test_2.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -shared two_file_test_1_pic.o two_file_test_1b_pic.o two_file_test_2.o
$(CXXLINK) -Bgcctestdir/ -shared two_file_test_1_pic.o two_file_test_1b_pic.o two_file_test_2.o -Wl,-z,notext
two_file_shared_mixed_1.so: two_file_test_1.o two_file_test_1b_pic.o two_file_shared_2.so gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -shared two_file_test_1.o two_file_test_1b_pic.o two_file_shared_2.so
$(CXXLINK) -Bgcctestdir/ -shared two_file_test_1.o two_file_test_1b_pic.o two_file_shared_2.so -Wl,-z,notext
 
two_file_shared_1_nonpic_test_SOURCES = \
two_file_test_2.cc two_file_test_main.cc
508,7 → 523,6
$(LINK) -Bgcctestdir/ -shared common_test_3_pic.o -Wl,--version-script,$(srcdir)/ver_test_2.script
 
check_PROGRAMS += exception_test
check_PROGRAMS += exception_static_test
check_PROGRAMS += exception_shared_1_test
check_PROGRAMS += exception_shared_2_test
check_PROGRAMS += exception_same_shared_test
534,10 → 548,13
exception_test_LDFLAGS = -Bgcctestdir/
exception_test_LDADD =
 
if HAVE_STATIC
check_PROGRAMS += exception_static_test
exception_static_test_SOURCES = $(exception_test_SOURCES)
exception_static_test_DEPENDENCIES = $(exception_test_DEPENDENCIES)
exception_static_test_LDFLAGS = $(exception_test_LDFLAGS) -static
exception_static_test_LDADD = $(exception_test_LDADD)
endif
 
exception_shared_1_test_SOURCES = exception_test_2.cc exception_test_main.cc
exception_shared_1_test_DEPENDENCIES = gcctestdir/ld exception_shared_1.so
603,10 → 620,10
weak_undef_file2_nonpic.o: weak_undef_file2.cc
$(CXXCOMPILE) -c -o $@ $<
weak_undef_lib_nonpic.so: weak_undef_file1_nonpic.o
$(CXXLINK) -Bgcctestdir/ -shared weak_undef_file1_nonpic.o
$(CXXLINK) -Bgcctestdir/ -shared weak_undef_file1_nonpic.o -Wl,-z,notext
alt/weak_undef_lib_nonpic.so: weak_undef_file2_nonpic.o
test -d alt || mkdir -p alt
$(CXXLINK) -Bgcctestdir/ -shared weak_undef_file2_nonpic.o
$(CXXLINK) -Bgcctestdir/ -shared weak_undef_file2_nonpic.o -Wl,-z,notext
endif FN_PTRS_IN_SO_WITHOUT_PIC
 
 
614,11 → 631,11
weak_alias_test_SOURCES = weak_alias_test_main.cc
weak_alias_test_DEPENDENCIES = \
gcctestdir/ld weak_alias_test_1.so weak_alias_test_2.so \
weak_alias_test_3.o weak_alias_test_4.so
weak_alias_test_3.o weak_alias_test_4.so weak_alias_test_5.so
weak_alias_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
weak_alias_test_LDADD = \
weak_alias_test_1.so weak_alias_test_2.so weak_alias_test_3.o \
weak_alias_test_4.so
weak_alias_test_4.so weak_alias_test_5.so
weak_alias_test_1_pic.o: weak_alias_test_1.cc
$(CXXCOMPILE) -c -fpic -o $@ $<
weak_alias_test_1.so: weak_alias_test_1_pic.o gcctestdir/ld
633,6 → 650,11
$(CXXCOMPILE) -c -fpic -o $@ $<
weak_alias_test_4.so: weak_alias_test_4_pic.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -shared weak_alias_test_4_pic.o
weak_alias_test_5_pic.o: weak_alias_test_5.cc
$(CXXCOMPILE) -c -fpic -o $@ $<
weak_alias_test_5.so: weak_alias_test_5_pic.o $(srcdir)/weak_alias_test.script gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -shared weak_alias_test_5_pic.o \
-Wl,--version-script,$(srcdir)/weak_alias_test.script
 
check_SCRIPTS += weak_plt.sh
check_PROGRAMS += weak_plt
772,6 → 794,7
 
endif TLS_GNU2_DIALECT
 
if HAVE_STATIC
if STATIC_TLS
check_PROGRAMS += tls_static_test
check_PROGRAMS += tls_static_pic_test
786,11 → 809,12
tls_static_pic_test_LDFLAGS = $(tls_pic_test_LDFLAGS) -static
tls_static_pic_test_LDADD = $(tls_pic_test_LDADD)
endif
endif
 
if FN_PTRS_IN_SO_WITHOUT_PIC
check_PROGRAMS += tls_shared_nonpic_test
tls_test_shared_nonpic.so: tls_test.o tls_test_file2.o tls_test_c.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -shared tls_test.o tls_test_file2.o tls_test_c.o
$(CXXLINK) -Bgcctestdir/ -shared tls_test.o tls_test_file2.o tls_test_c.o -Wl,-z,notext
 
tls_shared_nonpic_test_SOURCES = tls_test_main.cc
tls_shared_nonpic_test_DEPENDENCIES = gcctestdir/ld tls_test_shared_nonpic.so
828,8 → 852,6
many_sections_r_test: many_sections_r_test.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ many_sections_r_test.o $(LIBS)
 
if CONSTRUCTOR_PRIORITY
 
check_PROGRAMS += initpri1
initpri1_SOURCES = initpri1.c
initpri1_DEPENDENCIES = gcctestdir/ld
836,9 → 858,24
initpri1_LDFLAGS = -Bgcctestdir/
initpri1_LDADD =
 
endif
check_PROGRAMS += initpri2
initpri2_SOURCES = initpri2.c
initpri2_DEPENDENCIES = gcctestdir/ld
initpri2_LDFLAGS = -Bgcctestdir/
initpri2_LDADD =
 
check_PROGRAMS += initpri3a
initpri3a_SOURCES = initpri3.c
initpri3a_DEPENDENCIES = gcctestdir/ld
initpri3a_LDFLAGS = -Bgcctestdir/
initpri3a_LDADD =
 
check_PROGRAMS += initpri3b
initpri3b_SOURCES = initpri3.c
initpri3b_DEPENDENCIES = gcctestdir/ld
initpri3b_LDFLAGS = -Bgcctestdir/ -Wl,--no-ctors-in-init-array
initpri3b_LDADD =
 
# Test --detect-odr-violations
check_SCRIPTS += debug_msg.sh
 
862,6 → 899,29
exit 1; \
fi
 
 
if HAVE_ZLIB
 
# Check that --detect-odr-violations works with compressed debug sections.
check_DATA += debug_msg_cdebug.err
MOSTLYCLEANFILES += debug_msg_cdebug.err
debug_msg_cdebug.o: debug_msg.cc gcctestdir/as
$(CXXCOMPILE) -Bgcctestdir/ -O0 -g -Wa,--compress-debug-sections -c -w -o $@ $(srcdir)/debug_msg.cc
odr_violation1_cdebug.o: odr_violation1.cc gcctestdir/as
$(CXXCOMPILE) -Bgcctestdir/ -O0 -g -Wa,--compress-debug-sections -c -w -o $@ $(srcdir)/odr_violation1.cc
odr_violation2_cdebug.o: odr_violation2.cc gcctestdir/as
$(CXXCOMPILE) -Bgcctestdir/ -O2 -g -Wa,--compress-debug-sections -c -w -o $@ $(srcdir)/odr_violation2.cc
debug_msg_cdebug.err: debug_msg_cdebug.o odr_violation1_cdebug.o odr_violation2_cdebug.o gcctestdir/ld
@echo $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_cdebug debug_msg_cdebug.o odr_violation1_cdebug.o odr_violation2_cdebug.o "2>$@"
@if $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_cdebug debug_msg_cdebug.o odr_violation1_cdebug.o odr_violation2_cdebug.o 2>$@; \
then \
echo 1>&2 "Link of debug_msg_cdebug should have failed"; \
rm -f $@; \
exit 1; \
fi
 
endif HAVE_ZLIB
 
# See if we can also detect problems when we're linking .so's, not .o's.
check_DATA += debug_msg_so.err
MOSTLYCLEANFILES += debug_msg_so.err
945,6 → 1005,18
 
endif HAVE_ZLIB
 
# Test -TText and -Tdata.
check_PROGRAMS += flagstest_o_ttext_1
flagstest_o_ttext_1: flagstest_debug.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -o $@ $< -Wl,-Ttext,0x400000 -Wl,-Tdata,0x800000
 
# This version won't be runnable, because there is no way to put the
# PT_PHDR segment at file offset 0. We just make sure that we can
# build it without error.
check_DATA += flagstest_o_ttext_2
flagstest_o_ttext_2: flagstest_debug.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -o $@ $< -Wl,-Ttext,0x400010 -Wl,-Tdata,0x800010
 
# Test symbol versioning.
check_PROGRAMS += ver_test
ver_test_SOURCES = ver_test_main.cc
1047,6 → 1119,14
ver_test_11.a: ver_test_1.o ver_test_2.o ver_test_4.o
$(TEST_AR) rc $@ $^
 
check_PROGRAMS += ver_test_12
ver_test_12_SOURCES = ver_test_main_2.cc
ver_test_12_DEPENDENCIES = gcctestdir/ld ver_test_12.o
ver_test_12_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
ver_test_12_LDADD = ver_test_12.o
ver_test_12.o: gcctestdir/ld ver_test_1.o ver_test_2.o ver_test_4.o
gcctestdir/ld -r -o $@ ver_test_1.o ver_test_2.o ver_test_4.o
 
check_PROGRAMS += protected_1
protected_1_SOURCES = \
protected_main_1.cc protected_main_2.cc protected_main_3.cc
1095,6 → 1175,14
relro_test.stdout: relro_test.so
$(TEST_READELF) -SlW relro_test.so > relro_test.stdout
 
check_PROGRAMS += relro_now_test
relro_now_test_SOURCES = relro_test_main.cc
relro_now_test_DEPENDENCIES = gcctestdir/ld relro_now_test.so
relro_now_test_LDFLAGS = -Bgcctestdir -Wl,-R,. -Wl,-z,relro -Wl,-z,now
relro_now_test_LDADD = relro_now_test.so
relro_now_test.so: gcctestdir/ld relro_test_pic.o
$(CXXLINK) -Bgcctestdir/ -shared -Wl,-z,relro -Wl,-z,now relro_test_pic.o
 
check_PROGRAMS += relro_strip_test
relro_strip_test_SOURCES = relro_test_main.cc
relro_strip_test_DEPENDENCIES = gcctestdir/ld relro_strip_test.so
1133,6 → 1221,16
justsyms_2r.o: justsyms_2.o gcctestdir/ld $(srcdir)/justsyms.t
gcctestdir/ld -o $@ -r -T $(srcdir)/justsyms.t justsyms_2.o
 
check_PROGRAMS += justsyms_exec
justsyms_exec_SOURCES = justsyms_exec.c
justsyms_exec_DEPENDENCIES = gcctestdir/ld justsyms_lib
justsyms_exec_LDFLAGS = -Bgcctestdir/ -Wl,-R,justsyms_lib
justsyms_exec_LDADD =
justsyms_lib.o: justsyms_lib.c
$(COMPILE) -c -o $@ $<
justsyms_lib: justsyms_lib.o gcctestdir/ld
gcctestdir/ld -o $@ -Ttext=0x1000200 -Tdata=0x2000000 -e exported_func justsyms_lib.o
 
check_PROGRAMS += binary_test
MOSTLYCLEANFILES += binary.txt
binary_test_SOURCES = binary_test.cc
1565,6 → 1663,7
ifuncmain1pie.o: ifuncmain1.c
$(COMPILE) -c -fpie -o $@ $<
 
if HAVE_STATIC
check_PROGRAMS += ifuncmain1static
ifuncmain1static_SOURCES = ifuncmain1.c
ifuncmain1static_DEPENDENCIES = gcctestdir/ld ifuncdep1.o
1574,6 → 1673,7
check_PROGRAMS += ifuncmain1picstatic
ifuncmain1picstatic: ifuncmain1pic.o ifuncmod1.o gcctestdir/ld
$(LINK) -Bgcctestdir/ -static ifuncmain1pic.o ifuncmod1.o
endif
 
check_PROGRAMS += ifuncmain1
ifuncmain1_SOURCES = ifuncmain1.c
1621,6 → 1721,7
ifuncdep2pic.o: ifuncdep2.c
$(COMPILE) -c -fpic -o $@ $<
 
if HAVE_STATIC
check_PROGRAMS += ifuncmain2static
ifuncmain2static_SOURCES = ifuncmain2.c ifuncdep2.c
ifuncmain2static_DEPENDENCIES = gcctestdir/ld
1630,6 → 1731,7
check_PROGRAMS += ifuncmain2picstatic
ifuncmain2picstatic: ifuncmain2pic.o ifuncdep2pic.o gcctestdir/ld
$(LINK) -Bgcctestdir/ -static ifuncmain2pic.o ifuncdep2pic.o
endif
 
check_PROGRAMS += ifuncmain2
ifuncmain2_SOURCES = ifuncmain2.c ifuncdep2.c
1655,6 → 1757,7
ifuncmain4pic.o: ifuncmain4.c
$(COMPILE) -c -fpic -o $@ $<
 
if HAVE_STATIC
check_PROGRAMS += ifuncmain4static
ifuncmain4static_SOURCES = ifuncmain4.c
ifuncmain4static_DEPENDENCIES = gcctestdir/ld
1664,6 → 1767,7
check_PROGRAMS += ifuncmain4picstatic
ifuncmain4picstatic: ifuncmain4pic.o gcctestdir/ld
$(LINK) -Bgcctestdir/ -static ifuncmain4pic.o
endif
 
check_PROGRAMS += ifuncmain4
ifuncmain4_SOURCES = ifuncmain4.c
1685,6 → 1789,7
ifuncdep5.o: ifuncmod5.c
$(COMPILE) -c -o $@ $<
 
if HAVE_STATIC
check_PROGRAMS += ifuncmain5static
ifuncmain5static_SOURCES = ifuncmain5.c
ifuncmain5static_DEPENDENCIES = gcctestdir/ld ifuncdep5.o
1694,6 → 1799,7
check_PROGRAMS += ifuncmain5picstatic
ifuncmain5picstatic: ifuncmain5pic.o ifuncmod5.o gcctestdir/ld
$(LINK) -Bgcctestdir/ -static ifuncmain5pic.o ifuncmod5.o
endif
 
check_PROGRAMS += ifuncmain5
ifuncmain5_SOURCES = ifuncmain5.c
1731,6 → 1837,7
ifuncmain7pie.o: ifuncmain7.c
$(COMPILE) -c -fpie -o $@ $<
 
if HAVE_STATIC
check_PROGRAMS += ifuncmain7static
ifuncmain7static_SOURCES = ifuncmain7.c
ifuncmain7static_DEPENDENCIES = gcctestdir/ld
1740,6 → 1847,7
check_PROGRAMS += ifuncmain7picstatic
ifuncmain7picstatic: ifuncmain7pic.o gcctestdir/ld
$(LINK) -Bgcctestdir/ -static ifuncmain7pic.o
endif
 
check_PROGRAMS += ifuncmain7
ifuncmain7_SOURCES = ifuncmain7.c
1755,6 → 1863,18
ifuncmain7pie: ifuncmain7pie.o gcctestdir/ld
$(LINK) -Bgcctestdir/ -pie ifuncmain7pie.o
 
check_PROGRAMS += ifuncvar
ifuncvar1_pic.o: ifuncvar1.c
$(COMPILE) -c -fpic -o $@ $<
ifuncvar2_pic.o: ifuncvar2.c
$(COMPILE) -c -fpic -o $@ $<
ifuncvar.so: ifuncvar1_pic.o ifuncvar2_pic.o gcctestdir/ld
$(LINK) -Bgcctestdir/ -shared ifuncvar1_pic.o ifuncvar2_pic.o
ifuncvar_SOURCES = ifuncvar3.c
ifuncvar_DEPENDENCIES = gcctestdir/ld ifuncvar.so
ifuncvar_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
ifuncvar_LDADD = ifuncvar.so
 
endif IFUNC
 
# Test that strong reference to a weak symbol in a DSO remains strong.
1820,15 → 1940,26
 
if DEFAULT_TARGET_X86_64
 
two_file_test_1_v1_ndebug.o: two_file_test_1_v1.cc
$(CXXCOMPILE) -O0 -g0 -c -o $@ $<
two_file_test_1_ndebug.o: two_file_test_1.cc
$(CXXCOMPILE) -O0 -g0 -c -o $@ $<
two_file_test_1b_ndebug.o: two_file_test_1b.cc
$(CXXCOMPILE) -O0 -g0 -c -o $@ $<
two_file_test_2_ndebug.o: two_file_test_2.cc
$(CXXCOMPILE) -O0 -g0 -c -o $@ $<
two_file_test_main_ndebug.o: two_file_test_main.cc
$(CXXCOMPILE) -O0 -g0 -c -o $@ $<
 
check_PROGRAMS += incremental_test_2
MOSTLYCLEANFILES += two_file_test_tmp_2.o
incremental_test_2: two_file_test_1_v1.o two_file_test_1.o two_file_test_1b.o \
two_file_test_2.o two_file_test_main.o gcctestdir/ld
cp -f two_file_test_1_v1.o two_file_test_tmp_2.o
$(CXXLINK) -Wl,--incremental-full -Bgcctestdir/ two_file_test_tmp_2.o two_file_test_1b.o two_file_test_2.o two_file_test_main.o
incremental_test_2: two_file_test_1_v1_ndebug.o two_file_test_1_ndebug.o two_file_test_1b_ndebug.o \
two_file_test_2_ndebug.o two_file_test_main_ndebug.o gcctestdir/ld
cp -f two_file_test_1_v1_ndebug.o two_file_test_tmp_2.o
$(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ two_file_test_tmp_2.o two_file_test_1b_ndebug.o two_file_test_2_ndebug.o two_file_test_main_ndebug.o
@sleep 1
cp -f two_file_test_1.o two_file_test_tmp_2.o
$(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ two_file_test_tmp_2.o two_file_test_1b.o two_file_test_2.o two_file_test_main.o
cp -f two_file_test_1_ndebug.o two_file_test_tmp_2.o
$(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ two_file_test_tmp_2.o two_file_test_1b_ndebug.o two_file_test_2_ndebug.o two_file_test_main_ndebug.o
 
check_PROGRAMS += incremental_test_3
MOSTLYCLEANFILES += two_file_test_tmp_3.o
1835,7 → 1966,7
incremental_test_3: two_file_test_1.o two_file_test_1b_v1.o two_file_test_1b.o \
two_file_test_2.o two_file_test_main.o gcctestdir/ld
cp -f two_file_test_1b_v1.o two_file_test_tmp_3.o
$(CXXLINK) -Wl,--incremental-full -Bgcctestdir/ two_file_test_1.o two_file_test_tmp_3.o two_file_test_2.o two_file_test_main.o
$(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ two_file_test_1.o two_file_test_tmp_3.o two_file_test_2.o two_file_test_main.o
@sleep 1
cp -f two_file_test_1b.o two_file_test_tmp_3.o
$(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ two_file_test_1.o two_file_test_tmp_3.o two_file_test_2.o two_file_test_main.o
1845,16 → 1976,42
incremental_test_4: two_file_test_1.o two_file_test_1b.o two_file_test_2_v1.o \
two_file_test_2.o two_file_test_main.o gcctestdir/ld
cp -f two_file_test_2_v1.o two_file_test_tmp_4.o
$(CXXLINK) -Wl,--incremental-full -Bgcctestdir/ two_file_test_1.o two_file_test_1b.o two_file_test_tmp_4.o two_file_test_main.o
$(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ two_file_test_1.o two_file_test_1b.o two_file_test_tmp_4.o two_file_test_main.o
mv -f incremental_test_4 incremental_test_4.base
@sleep 1
cp -f two_file_test_2.o two_file_test_tmp_4.o
$(CXXLINK) -Wl,--incremental-update,--incremental-base=incremental_test_4.base -Bgcctestdir/ two_file_test_1.o two_file_test_1b.o two_file_test_tmp_4.o two_file_test_main.o
 
check_PROGRAMS += incremental_test_5
MOSTLYCLEANFILES += two_file_test_5.a
incremental_test_5: two_file_test_1.o two_file_test_1b_v1.o two_file_test_1b.o \
two_file_test_2.o two_file_test_main.o gcctestdir/ld
cp -f two_file_test_1b_v1.o two_file_test_tmp_5.o
$(TEST_AR) rc two_file_test_5.a two_file_test_1.o two_file_test_tmp_5.o two_file_test_2.o
$(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ two_file_test_main.o two_file_test_5.a
@sleep 1
cp -f two_file_test_1b.o two_file_test_tmp_5.o
$(TEST_AR) rc two_file_test_5.a two_file_test_1.o two_file_test_tmp_5.o two_file_test_2.o
$(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ two_file_test_main.o two_file_test_5.a
 
# Test the --incremental-unchanged flag with an archive library.
# The second link should not update the library.
check_PROGRAMS += incremental_test_6
MOSTLYCLEANFILES += two_file_test_6.a
incremental_test_6: two_file_test_1.o two_file_test_1b_v1.o two_file_test_1b.o \
two_file_test_2.o two_file_test_main.o gcctestdir/ld
cp -f two_file_test_1b.o two_file_test_tmp_6.o
$(TEST_AR) rc two_file_test_6.a two_file_test_1.o two_file_test_tmp_6.o two_file_test_2.o
$(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ two_file_test_main.o two_file_test_6.a
@sleep 1
cp -f two_file_test_1b_v1.o two_file_test_tmp_6.o
$(TEST_AR) rc two_file_test_6.a two_file_test_1.o two_file_test_tmp_6.o two_file_test_2.o
$(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ two_file_test_main.o -Wl,--incremental-unchanged two_file_test_6.a -Wl,--incremental-unknown
 
check_PROGRAMS += incremental_copy_test
incremental_copy_test: copy_test_v1.o copy_test.o copy_test_1.so copy_test_2.so
cp -f copy_test_v1.o copy_test_tmp.o
$(CXXLINK) -Wl,--incremental-full -Bgcctestdir/ -Wl,-R,. copy_test_tmp.o copy_test_1.so copy_test_2.so
$(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ -Wl,-R,. copy_test_tmp.o copy_test_1.so copy_test_2.so
@sleep 1
cp -f copy_test.o copy_test_tmp.o
$(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ -Wl,-R,. copy_test_tmp.o copy_test_1.so copy_test_2.so
1862,7 → 2019,7
check_PROGRAMS += incremental_common_test_1
incremental_common_test_1: common_test_1_v1.o common_test_1_v2.o gcctestdir/ld
cp -f common_test_1_v1.o common_test_1_tmp.o
$(CXXLINK) -Wl,--incremental-full -Bgcctestdir/ common_test_1_tmp.o
$(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ common_test_1_tmp.o
@sleep 1
cp -f common_test_1_v2.o common_test_1_tmp.o
$(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ common_test_1_tmp.o
1985,7 → 2142,8
thumb2_bl_in_range.stdout thumb2_bl_out_of_range.stdout \
thumb_blx_in_range.stdout thumb_blx_out_of_range.stdout \
thumb2_blx_in_range.stdout thumb2_blx_out_of_range.stdout \
thumb_bl_out_of_range_local.stdout
thumb_bl_out_of_range_local.stdout arm_thm_jump11.stdout \
arm_thm_jump8.stdout
 
arm_bl_in_range.stdout: arm_bl_in_range
$(TEST_OBJDUMP) -D $< > $@
2086,10 → 2244,29
thumb_bl_out_of_range_local.o: thumb_bl_out_of_range_local.s
$(TEST_AS) -o $@ -march=armv5te $<
 
arm_thm_jump11.stdout: arm_thm_jump11
$(TEST_OBJDUMP) -D $< > $@
 
arm_thm_jump11: arm_thm_jump11.o ../ld-new
../ld-new -T $(srcdir)/arm_thm_jump11.t -o $@ $<
 
arm_thm_jump11.o: arm_thm_jump11.s
$(TEST_AS) -o $@ $<
 
arm_thm_jump8.stdout: arm_thm_jump8
$(TEST_OBJDUMP) -D $< > $@
 
arm_thm_jump8: arm_thm_jump8.o ../ld-new
../ld-new -T $(srcdir)/arm_thm_jump8.t -o $@ $<
 
arm_thm_jump8.o: arm_thm_jump8.s
$(TEST_AS) -o $@ $<
 
MOSTLYCLEANFILES += arm_bl_in_range arm_bl_out_of_range thumb_bl_in_range \
thumb_bl_out_of_range thumb2_bl_in_range thumb2_bl_out_of_range \
thumb_blx_in_range thumb_blx_out_of_range thumb2_blx_in_range \
thumb2_blx_out_of_range thumb_bl_out_of_range_local
thumb2_blx_out_of_range thumb_bl_out_of_range_local arm_thm_jump11 \
arm_thm_jump8
 
check_SCRIPTS += arm_fix_v4bx.sh
check_DATA += arm_fix_v4bx.stdout arm_fix_v4bx_interworking.stdout \
2245,6 → 2422,20
pr12826_2.o: pr12826_2.s
$(TEST_AS) -o $@ $<
 
check_SCRIPTS += arm_unaligned_reloc.sh
check_DATA += arm_unaligned_reloc.stdout
 
arm_unaligned_reloc.stdout: arm_unaligned_reloc
$(TEST_OBJDUMP) -D $< > $@
 
arm_unaligned_reloc: arm_unaligned_reloc.o ../ld-new
../ld-new -o $@ $<
 
arm_unaligned_reloc.o: arm_unaligned_reloc.s
$(TEST_AS) -o $@ $<
 
MOSTLYCLEANFILES += arm_unaligned_reloc
 
endif DEFAULT_TARGET_ARM
 
endif NATIVE_OR_CROSS_LINKER
/trunk/gnu/binutils/gold/testsuite/protected_main_1.cc
28,9 → 28,13
extern bool t1();
extern bool t2();
 
extern "C" int f2();
extern int (*get_f2_addr()) ();
 
int
main()
{
assert(t1());
assert(t2());
assert(&f2 == get_f2_addr());
}
/trunk/gnu/binutils/gold/testsuite/ifuncvar1.c
0,0 → 1,20
/* Test global variable initialized to hidden STT_GNU_IFUNC symbol. */
 
int didit;
 
extern void doit (void);
 
void
doit (void)
{
didit = 1;
}
 
void (*get_foo (void)) (void) __asm__ ("foo");
__asm__ (".type foo, %gnu_indirect_function");
__asm__ (".hidden foo");
 
void (*get_foo (void)) (void)
{
return &doit;
}
/trunk/gnu/binutils/gold/testsuite/ifuncvar2.c
0,0 → 1,12
/* Test global variable initialized to hidden STT_GNU_IFUNC symbol. */
 
extern void foo (void);
void (*f) (void) = &foo;
 
extern void bar (void);
 
void
bar (void)
{
f ();
}
/trunk/gnu/binutils/gold/testsuite/weak_alias_test_5.cc
0,0 → 1,39
// weak_alias_test_5.cc -- test versioned weak aliases for gold
 
// Copyright 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
 
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
// MA 02110-1301, USA.
 
// Define a versioned symbol.
int versioned_symbol = 1;
__asm__(".symver versioned_symbol,versioned_symbol@@VER1");
 
// Define a weak alias for the versioned symbol, with a different version.
extern int versioned_alias __attribute__ ((weak, alias("versioned_symbol")));
__asm__(".symver versioned_alias,versioned_alias@@VER2");
 
bool
t2()
{
if (versioned_symbol != 1)
return false;
if (versioned_alias != 1)
return false;
return true;
}
/trunk/gnu/binutils/gold/testsuite/ifuncvar3.c
0,0 → 1,14
/* Test global variable initialized to hidden STT_GNU_IFUNC symbol. */
 
#include <assert.h>
 
extern void bar (void);
extern int didit;
 
int
main (void)
{
bar ();
assert (didit == 1);
return 0;
}
/trunk/gnu/binutils/gold/testsuite/arm_thm_jump11.s
0,0 → 1,57
# arm_thm_jump11.s
# Test R_ARM_THM_JUMP11 relocations just within the branch range limits.
.syntax unified
.arch armv5te
 
.section .text.pre,"x"
 
# Add padding so that target is just in branch range.
.space 8
 
.global _backward_target
.code 16
.thumb_func
.type _backword_target, %function
_backward_target:
bx lr
.size _backward_target, .-_backward_target
.text
 
# Define _start so that linker does not complain.
.global _start
.code 32
.align 2
.type _start, %function
_start:
bx lr
.size _start, .-_start
 
.global _backward_test
.code 16
.thumb_func
.type _backward_test, %function
_backward_test:
b.n _backward_target
.size _backward_test, .-_backward_test
 
.global _forward_test
.code 16
.thumb_func
.type _forward_test, %function
_forward_test:
b.n _forward_target
.size _forward_test, .-_forward_test
.section .text.post,"x"
 
# Add padding so that target is just in branch range.
.space 8
 
.global _forward_target
.code 16
.thumb_func
.type _forward_target, %function
_forward_target:
bx lr
.size _forward_target, .-_forward_target
/trunk/gnu/binutils/gold/testsuite/arm_thm_jump11.t
0,0 → 1,36
/* arm_thm_jump11.t -- linker script to test R_ARM_THM_JUMP11 relocation.
 
Copyright 2011 Free Software Foundation, Inc.
Written by Doug Kwan <dougkwan@google.com>.
 
This file is part of gold.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
 
SECTIONS
{
. = 0x8000;
 
.text.pre : { *(.text.pre) }
. = ALIGN(0x800);
.text : { *(.text) }
. = ALIGN(0x800);
.text.post : { *(.text.post) }
. += 0x1000;
.data : { *(.data) }
.bss : { *(.bss) }
.ARM.attributes : { *(.ARM.attributes) }
}
/trunk/gnu/binutils/gold/testsuite/debug_msg.sh
90,6 → 90,33
check debug_msg.err "debug_msg.cc:68"
check debug_msg.err "odr_violation2.cc:27"
 
# Check for the same error messages when using --compressed-debug-sections.
if test -r debug_msg_cdebug.err
then
check debug_msg_cdebug.err "debug_msg_cdebug.o:debug_msg.cc:function fn_array: error: undefined reference to 'undef_fn1()'"
check debug_msg_cdebug.err "debug_msg_cdebug.o:debug_msg.cc:function fn_array: error: undefined reference to 'undef_fn2()'"
check debug_msg_cdebug.err "debug_msg_cdebug.o:debug_msg.cc:function badref1: error: undefined reference to 'undef_int'"
check debug_msg_cdebug.err ".*/debug_msg.cc:50: error: undefined reference to 'undef_fn1()'"
check debug_msg_cdebug.err ".*/debug_msg.cc:55: error: undefined reference to 'undef_fn2()'"
check debug_msg_cdebug.err ".*/debug_msg.cc:43: error: undefined reference to 'undef_fn1()'"
check debug_msg_cdebug.err ".*/debug_msg.cc:44: error: undefined reference to 'undef_fn2()'"
check debug_msg_cdebug.err ".*/debug_msg.cc:.*: error: undefined reference to 'undef_int'"
check debug_msg_cdebug.err ".*/debug_msg.cc:43: error: undefined reference to 'undef_fn1()'"
check debug_msg_cdebug.err ".*/debug_msg.cc:44: error: undefined reference to 'undef_fn2()'"
check debug_msg_cdebug.err ".*/debug_msg.cc:.*: error: undefined reference to 'undef_int'"
check debug_msg_cdebug.err ": symbol 'Ordering::operator()(int, int)' defined in multiple places (possible ODR violation):"
check debug_msg_cdebug.err "odr_violation1.cc:6"
check debug_msg_cdebug.err "odr_violation2.cc:12"
check_missing debug_msg_cdebug.err "OdrDerived::~OdrDerived()"
check_missing debug_msg_cdebug.err "__adjust_heap"
check_missing debug_msg_cdebug.err ": symbol 'OverriddenCFunction' defined in multiple places (possible ODR violation):"
check_missing debug_msg_cdebug.err "odr_violation1.cc:16"
check_missing debug_msg_cdebug.err "odr_violation2.cc:23"
check debug_msg_cdebug.err ": symbol 'SometimesInlineFunction(int)' defined in multiple places (possible ODR violation):"
check debug_msg_cdebug.err "debug_msg.cc:68"
check debug_msg_cdebug.err "odr_violation2.cc:27"
fi
 
# When linking together .so's, we don't catch the line numbers, but we
# still find all the undefined variables, and the ODR violation.
check debug_msg_so.err "debug_msg.so: error: undefined reference to 'undef_fn1()'"
98,14 → 125,14
check debug_msg_so.err ": symbol 'Ordering::operator()(int, int)' defined in multiple places (possible ODR violation):"
check debug_msg_so.err "odr_violation1.cc:6"
check debug_msg_so.err "odr_violation2.cc:12"
check_missing debug_msg.err "OdrDerived::~OdrDerived()"
check_missing debug_msg.err "__adjust_heap"
check_missing debug_msg.err ": symbol 'OverriddenCFunction' defined in multiple places (possible ODR violation):"
check_missing debug_msg.err "odr_violation1.cc:16"
check_missing debug_msg.err "odr_violation2.cc:23"
check debug_msg.err ": symbol 'SometimesInlineFunction(int)' defined in multiple places (possible ODR violation):"
check debug_msg.err "debug_msg.cc:68"
check debug_msg.err "odr_violation2.cc:27"
check_missing debug_msg_so.err "OdrDerived::~OdrDerived()"
check_missing debug_msg_so.err "__adjust_heap"
check_missing debug_msg_so.err ": symbol 'OverriddenCFunction' defined in multiple places (possible ODR violation):"
check_missing debug_msg_so.err "odr_violation1.cc:16"
check_missing debug_msg_so.err "odr_violation2.cc:23"
check debug_msg_so.err ": symbol 'SometimesInlineFunction(int)' defined in multiple places (possible ODR violation):"
check debug_msg_so.err "debug_msg.cc:68"
check debug_msg_so.err "odr_violation2.cc:27"
 
# These messages shouldn't need any debug info to detect:
check debug_msg_ndebug.err "debug_msg_ndebug.so: error: undefined reference to 'undef_fn1()'"
/trunk/gnu/binutils/gold/testsuite/plugin_test.c
60,6 → 60,12
static ld_plugin_message message = NULL;
static ld_plugin_get_input_file get_input_file = NULL;
static ld_plugin_release_input_file release_input_file = NULL;
static ld_plugin_get_input_section_count get_input_section_count = NULL;
static ld_plugin_get_input_section_type get_input_section_type = NULL;
static ld_plugin_get_input_section_name get_input_section_name = NULL;
static ld_plugin_get_input_section_contents get_input_section_contents = NULL;
static ld_plugin_update_section_order update_section_order = NULL;
static ld_plugin_allow_section_ordering allow_section_ordering = NULL;
 
#define MAXOPTS 10
 
126,6 → 132,24
case LDPT_RELEASE_INPUT_FILE:
release_input_file = entry->tv_u.tv_release_input_file;
break;
case LDPT_GET_INPUT_SECTION_COUNT:
get_input_section_count = *entry->tv_u.tv_get_input_section_count;
break;
case LDPT_GET_INPUT_SECTION_TYPE:
get_input_section_type = *entry->tv_u.tv_get_input_section_type;
break;
case LDPT_GET_INPUT_SECTION_NAME:
get_input_section_name = *entry->tv_u.tv_get_input_section_name;
break;
case LDPT_GET_INPUT_SECTION_CONTENTS:
get_input_section_contents = *entry->tv_u.tv_get_input_section_contents;
break;
case LDPT_UPDATE_SECTION_ORDER:
update_section_order = *entry->tv_u.tv_update_section_order;
break;
case LDPT_ALLOW_SECTION_ORDERING:
allow_section_ordering = *entry->tv_u.tv_allow_section_ordering;
break;
default:
break;
}
179,6 → 203,42
return LDPS_ERR;
}
 
if (get_input_section_count == NULL)
{
fprintf(stderr, "tv_get_input_section_count interface missing\n");
return LDPS_ERR;
}
 
if (get_input_section_type == NULL)
{
fprintf(stderr, "tv_get_input_section_type interface missing\n");
return LDPS_ERR;
}
 
if (get_input_section_name == NULL)
{
fprintf(stderr, "tv_get_input_section_name interface missing\n");
return LDPS_ERR;
}
 
if (get_input_section_contents == NULL)
{
fprintf(stderr, "tv_get_input_section_contents interface missing\n");
return LDPS_ERR;
}
 
if (update_section_order == NULL)
{
fprintf(stderr, "tv_update_section_order interface missing\n");
return LDPS_ERR;
}
 
if (allow_section_ordering == NULL)
{
fprintf(stderr, "tv_allow_section_ordering interface missing\n");
return LDPS_ERR;
}
 
return LDPS_OK;
}
 
/trunk/gnu/binutils/gold/testsuite/testfile.cc
1,6 → 1,6
// testfile.cc -- Dummy ELF objects for testing purposes.
 
// Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
94,6 → 94,7
false, // has_resolve
false, // has_code_fill
false, // is_default_stack_executable
false, // can_icf_inline_merge_sections
'\0', // wrap_char
"/dummy", // dynamic_linker
0x08000000, // default_text_segment_address
150,7 → 151,7
{
public:
Target_selector_test()
: Target_selector(0xffff, size, big_endian, NULL)
: Target_selector(0xffff, size, big_endian, NULL, NULL)
{ }
 
Target*
/trunk/gnu/binutils/gold/testsuite/initpri2.c
0,0 → 1,118
/* initpri2.c -- test mixing init_array and ctor priorities.
 
Copyright 2011 Free Software Foundation, Inc.
Copied from the gcc configury, where the test was contributed by
H.J. Lu <hongjiu.lu@intel.com>.
 
This file is part of gold.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
 
/* This tests that the linker correctly combines .ctor and .init_array
sections when both have priorities. */
 
#include <stdlib.h>
 
static int count;
 
static void
init1005 (void)
{
if (count != 0)
abort ();
count = 1005;
}
void (*const init_array1005[]) (void)
__attribute__ ((section (".init_array.01005"), aligned (sizeof (void *))))
= { init1005 };
static void
fini1005 (void)
{
if (count != 1005)
abort ();
}
void (*const fini_array1005[]) (void)
__attribute__ ((section (".fini_array.01005"), aligned (sizeof (void *))))
= { fini1005 };
 
static void
ctor1007 (void)
{
if (count != 1005)
abort ();
count = 1007;
}
void (*const ctors1007[]) (void)
__attribute__ ((section (".ctors.64528"), aligned (sizeof (void *))))
= { ctor1007 };
static void
dtor1007 (void)
{
if (count != 1007)
abort ();
count = 1005;
}
void (*const dtors1007[]) (void)
__attribute__ ((section (".dtors.64528"), aligned (sizeof (void *))))
= { dtor1007 };
 
static void
init65530 (void)
{
if (count != 1007)
abort ();
count = 65530;
}
void (*const init_array65530[]) (void)
__attribute__ ((section (".init_array.65530"), aligned (sizeof (void *))))
= { init65530 };
static void
fini65530 (void)
{
if (count != 65530)
abort ();
count = 1007;
}
void (*const fini_array65530[]) (void)
__attribute__ ((section (".fini_array.65530"), aligned (sizeof (void *))))
= { fini65530 };
 
static void
ctor65535 (void)
{
if (count != 65530)
abort ();
count = 65535;
}
void (*const ctors65535[]) (void)
__attribute__ ((section (".ctors"), aligned (sizeof (void *))))
= { ctor65535 };
static void
dtor65535 (void)
{
if (count != 65535)
abort ();
count = 65530;
}
void (*const dtors65535[]) (void)
__attribute__ ((section (".dtors"), aligned (sizeof (void *))))
= { dtor65535 };
 
int
main (void)
{
return 0;
}
/trunk/gnu/binutils/gold/testsuite/Makefile.in
47,7 → 47,12
$(am__EXEEXT_13) $(am__EXEEXT_14) $(am__EXEEXT_15) \
$(am__EXEEXT_16) $(am__EXEEXT_17) $(am__EXEEXT_18) \
$(am__EXEEXT_19) $(am__EXEEXT_20) $(am__EXEEXT_21) \
$(am__EXEEXT_22) $(am__EXEEXT_23)
$(am__EXEEXT_22) $(am__EXEEXT_23) $(am__EXEEXT_24) \
$(am__EXEEXT_25) $(am__EXEEXT_26) $(am__EXEEXT_27) \
$(am__EXEEXT_28) $(am__EXEEXT_29) $(am__EXEEXT_30) \
$(am__EXEEXT_31) $(am__EXEEXT_32) $(am__EXEEXT_33) \
$(am__EXEEXT_34) $(am__EXEEXT_35) $(am__EXEEXT_36) \
$(am__EXEEXT_37) $(am__EXEEXT_38)
@NATIVE_OR_CROSS_LINKER_TRUE@am__append_1 = object_unittest \
@NATIVE_OR_CROSS_LINKER_TRUE@ binary_unittest
 
84,11 → 89,6
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_9.sh dynamic_list.sh
 
# Create the data files that debug_msg.sh analyzes.
 
# See if we can also detect problems when we're linking .so's, not .o's.
 
# We also want to make sure we do something reasonable when there's no
# debug info available. For the best test, we use .so's.
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_3 = incremental_test.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ gc_comdat_test.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ gc_tls_test.stdout \
104,23 → 104,7
@GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_string_merge_test.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ icf_sht_rel_addend_test.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared.dbg \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_plt_shared.so debug_msg.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ debug_msg_so.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ debug_msg_ndebug.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ undef_symbol.err ver_test_1.syms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_2.syms ver_test_4.syms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_5.syms ver_test_7.syms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_10.syms protected_3.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_test.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_matching_test.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_3.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_4.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_5.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_6.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_7.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_8.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_9.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ dynamic_list.stdout
@GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_plt_shared.so debug_msg.err
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_4 = incremental_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ gc_comdat_test gc_tls_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ gc_orphan_section_test icf_test \
134,15 → 118,20
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared.dbg \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ alt/weak_undef_lib.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_5 = icf_virtual_function_folding_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ basic_test basic_static_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ basic_pic_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ basic_static_pic_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ basic_pie_test constructor_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ constructor_static_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_static_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_pic_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_1_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ basic_test basic_pic_test
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@am__append_6 = basic_static_test \
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@ basic_static_pic_test
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_7 = basic_pie_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ constructor_test
@GCC_FALSE@constructor_test_DEPENDENCIES =
@NATIVE_LINKER_FALSE@constructor_test_DEPENDENCIES =
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@am__append_8 = constructor_static_test
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_9 = two_file_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_pic_test
@GCC_FALSE@two_file_test_DEPENDENCIES =
@NATIVE_LINKER_FALSE@two_file_test_DEPENDENCIES =
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@am__append_10 = two_file_static_test
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_11 = two_file_shared_1_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_2_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_1_pic_2_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_2_pic_1_test \
151,14 → 140,10
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_separate_shared_21_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_relocatable_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_pie_test
@GCC_FALSE@constructor_test_DEPENDENCIES =
@NATIVE_LINKER_FALSE@constructor_test_DEPENDENCIES =
@GCC_FALSE@two_file_test_DEPENDENCIES =
@NATIVE_LINKER_FALSE@two_file_test_DEPENDENCIES =
 
# The nonpic tests will fail on platforms which can not put non-PIC
# code into shared libraries, so we just don't run them in that case.
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_6 = two_file_shared_1_nonpic_test \
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_12 = two_file_shared_1_nonpic_test \
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_2_nonpic_test \
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_same_shared_nonpic_test \
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_separate_shared_12_nonpic_test \
166,28 → 151,29
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_mixed_shared_test \
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_mixed_2_shared_test \
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_mixed_pie_test
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_7 = two_file_strip_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_13 = two_file_strip_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_same_shared_strip_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ common_test_1 common_test_2 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_static_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_shared_1_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_shared_2_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_same_shared_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_separate_shared_12_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_separate_shared_21_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_test weak_undef_test
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_separate_shared_21_test
@GCC_FALSE@common_test_1_DEPENDENCIES =
@NATIVE_LINKER_FALSE@common_test_1_DEPENDENCIES =
@GCC_FALSE@exception_test_DEPENDENCIES =
@NATIVE_LINKER_FALSE@exception_test_DEPENDENCIES =
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@am__append_14 = exception_static_test
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_15 = weak_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_undef_test
@GCC_FALSE@weak_test_DEPENDENCIES =
@NATIVE_LINKER_FALSE@weak_test_DEPENDENCIES =
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_8 = weak_undef_nonpic_test
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_9 = alt/weak_undef_lib_nonpic.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_10 = weak_alias_test weak_plt \
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_16 = weak_undef_nonpic_test
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_17 = alt/weak_undef_lib_nonpic.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_18 = weak_alias_test weak_plt \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ copy_test
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am__append_11 = tls_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am__append_19 = tls_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_pic_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_pie_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_pie_pic_test \
194,21 → 180,65
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_shared_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_shared_ie_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_shared_gd_to_ie_test
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_GNU2_DIALECT_TRUE@@TLS_TRUE@am__append_12 = tls_shared_gnu2_gd_to_ie_test
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_DESCRIPTORS_TRUE@@TLS_GNU2_DIALECT_TRUE@@TLS_TRUE@am__append_13 = tls_shared_gnu2_test
@GCC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@am__append_14 = tls_static_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@ tls_static_pic_test
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am__append_15 = tls_shared_nonpic_test
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_16 = many_sections_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ many_sections_r_test
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_GNU2_DIALECT_TRUE@@TLS_TRUE@am__append_20 = tls_shared_gnu2_gd_to_ie_test
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_DESCRIPTORS_TRUE@@TLS_GNU2_DIALECT_TRUE@@TLS_TRUE@am__append_21 = tls_shared_gnu2_test
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@am__append_22 = tls_static_test \
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@ tls_static_pic_test
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am__append_23 = tls_shared_nonpic_test
 
# Test -o when emitting to a special file (such as something in /dev).
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_24 = many_sections_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ many_sections_r_test initpri1 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ initpri2 initpri3a initpri3b \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ flagstest_o_specialfile
@GCC_FALSE@many_sections_test_DEPENDENCIES =
@NATIVE_LINKER_FALSE@many_sections_test_DEPENDENCIES =
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_17 = many_sections_define.h \
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_25 = many_sections_define.h \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ many_sections_check.h
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_18 = many_sections_define.h \
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_26 = many_sections_define.h \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ many_sections_check.h \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ debug_msg.err debug_msg_so.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ debug_msg.err
@GCC_FALSE@initpri1_DEPENDENCIES =
@NATIVE_LINKER_FALSE@initpri1_DEPENDENCIES =
@GCC_FALSE@initpri2_DEPENDENCIES =
@NATIVE_LINKER_FALSE@initpri2_DEPENDENCIES =
@GCC_FALSE@initpri3a_DEPENDENCIES =
@NATIVE_LINKER_FALSE@initpri3a_DEPENDENCIES =
@GCC_FALSE@initpri3b_DEPENDENCIES =
@NATIVE_LINKER_FALSE@initpri3b_DEPENDENCIES =
 
# Check that --detect-odr-violations works with compressed debug sections.
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@am__append_27 = debug_msg_cdebug.err
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@am__append_28 = debug_msg_cdebug.err
 
# See if we can also detect problems when we're linking .so's, not .o's.
 
# We also want to make sure we do something reasonable when there's no
# debug info available. For the best test, we use .so's.
 
# This version won't be runnable, because there is no way to put the
# PT_PHDR segment at file offset 0. We just make sure that we can
# build it without error.
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_29 = debug_msg_so.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ debug_msg_ndebug.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ undef_symbol.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ flagstest_o_ttext_2 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_1.syms ver_test_2.syms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_4.syms ver_test_5.syms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_7.syms ver_test_10.syms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_3.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_test.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_matching_test.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_3.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_4.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_5.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_6.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_7.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_8.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_9.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ dynamic_list.stdout
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_30 = debug_msg_so.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ debug_msg_ndebug.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ undef_symbol.err ver_test_11.a \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_3.err binary.txt \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_matching_test.stdout \
221,30 → 251,28
@GCC_TRUE@@NATIVE_LINKER_TRUE@ alt/thin_archive_test_2.o \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ alt/thin_archive_test_4.o \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ alt/libthin2.a alt/libthin4.a
@CONSTRUCTOR_PRIORITY_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_19 = initpri1
@CONSTRUCTOR_PRIORITY_FALSE@initpri1_DEPENDENCIES =
@GCC_FALSE@initpri1_DEPENDENCIES =
@NATIVE_LINKER_FALSE@initpri1_DEPENDENCIES =
 
# Test -o when emitting to a special file (such as something in /dev).
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_20 = flagstest_o_specialfile
 
# Test --compress-debug-sections. FIXME: check we actually compress.
 
# The specialfile output has a tricky case when we also compress debug
# sections, because it requires output-file resizing.
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@am__append_21 = flagstest_compress_debug_sections \
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@am__append_31 = flagstest_compress_debug_sections \
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ flagstest_o_specialfile_and_compress_debug_sections
 
# Test -TText and -Tdata.
 
# Test symbol versioning.
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_22 = ver_test ver_test_2 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_6 ver_test_8 ver_test_9 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_11 protected_1 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_2 relro_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_32 = flagstest_o_ttext_1 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test ver_test_2 ver_test_6 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_8 ver_test_9 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_11 ver_test_12 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_1 protected_2 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_test relro_now_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_strip_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_script_test script_test_1 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_2 justsyms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ binary_test script_test_3 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ justsyms_exec binary_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_3 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ tls_phdrs_script_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ tls_script_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ thin_archive_test_1 \
255,6 → 283,8
@NATIVE_LINKER_FALSE@script_test_2_DEPENDENCIES =
@GCC_FALSE@justsyms_DEPENDENCIES =
@NATIVE_LINKER_FALSE@justsyms_DEPENDENCIES =
@GCC_FALSE@justsyms_exec_DEPENDENCIES =
@NATIVE_LINKER_FALSE@justsyms_exec_DEPENDENCIES =
@GCC_FALSE@binary_test_DEPENDENCIES =
@NATIVE_LINKER_FALSE@binary_test_DEPENDENCIES =
@GCC_FALSE@thin_archive_test_2_DEPENDENCIES =
261,7 → 291,7
@NATIVE_LINKER_FALSE@thin_archive_test_2_DEPENDENCIES =
 
# Test plugins with -r.
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@am__append_23 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@am__append_33 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_1 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_2 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_3 \
270,7 → 300,7
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_6 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_7 \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_8
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@am__append_24 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@am__append_34 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_1.sh \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_2.sh \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_3.sh \
280,7 → 310,7
 
# Test that symbols known in the IR file but not in the replacement file
# produce an unresolved symbol error.
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@am__append_25 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@am__append_35 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_1.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_2.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_3.err \
290,7 → 320,7
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_7.syms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_9.err
# Make a copy of two_file_test_1.o, which does not define the symbol _Z4t16av.
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@am__append_26 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@am__append_36 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_1.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_2.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_3.err \
301,7 → 331,7
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_9.err \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ two_file_test_1c.o \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ unused.c
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_27 = exclude_libs_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_37 = exclude_libs_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ local_labels_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ discard_locals_test
 
319,7 → 349,7
# weak reference in a DSO.
 
# Test that MEMORY region support works.
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_28 = exclude_libs_test.sh \
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_38 = exclude_libs_test.sh \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ discard_locals_test.sh \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ hidden_test.sh \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ retain_symbols_file_test.sh \
326,7 → 356,7
@GCC_TRUE@@NATIVE_LINKER_TRUE@ no_version_test.sh \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ strong_ref_weak_def.sh \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ dyn_weak_ref.sh memory_test.sh
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_29 = exclude_libs_test.syms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_39 = exclude_libs_test.syms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ discard_locals_test.syms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ discard_locals_relocatable_test1.syms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ discard_locals_relocatable_test2.syms \
336,7 → 366,7
@GCC_TRUE@@NATIVE_LINKER_TRUE@ strong_ref_weak_def.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ dyn_weak_ref.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ memory_test.stdout
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_30 = exclude_libs_test.syms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_40 = exclude_libs_test.syms \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ libexclude_libs_test_1.a \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ libexclude_libs_test_2.a \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ alt/libexclude_libs_test_3.a \
362,7 → 392,7
@GCC_TRUE@@NATIVE_LINKER_TRUE@ dyn_weak_ref.stdout \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ memory_test.stdout memory_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ memory_test.o
@GCC_TRUE@@MCMODEL_MEDIUM_TRUE@@NATIVE_LINKER_TRUE@am__append_31 = large
@GCC_TRUE@@MCMODEL_MEDIUM_TRUE@@NATIVE_LINKER_TRUE@am__append_41 = large
@GCC_FALSE@large_DEPENDENCIES =
@MCMODEL_MEDIUM_FALSE@large_DEPENDENCIES =
@NATIVE_LINKER_FALSE@large_DEPENDENCIES =
371,14 → 401,13
# it will get execute permission.
 
# Check -l:foo.a
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_32 = permission_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_42 = permission_test \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ searched_file_test
@GCC_FALSE@searched_file_test_DEPENDENCIES =
@NATIVE_LINKER_FALSE@searched_file_test_DEPENDENCIES =
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__append_33 = \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1static \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1picstatic \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1 \
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__append_43 = ifuncmain1static \
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1picstatic
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__append_44 = ifuncmain1 \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1pic \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1vis \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1vispic \
385,30 → 414,16
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1staticpic \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1pie \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1vispie \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1staticpie \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain2static \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain2picstatic \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain2 \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain2pic \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain3 \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain4static \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain4picstatic \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain4 \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain5static \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain5picstatic \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain5 \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain5pic \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain5staticpic \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain5pie \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain6pie \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain7static \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain7picstatic \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain7 \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain7pic \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain7pie
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1staticpie
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__append_45 = ifuncmain2static \
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain2picstatic
@GCC_FALSE@ifuncmain2static_DEPENDENCIES =
@HAVE_STATIC_FALSE@ifuncmain2static_DEPENDENCIES =
@IFUNC_FALSE@ifuncmain2static_DEPENDENCIES =
@NATIVE_LINKER_FALSE@ifuncmain2static_DEPENDENCIES =
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__append_46 = ifuncmain2 \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain2pic \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain3
@GCC_FALSE@ifuncmain2_DEPENDENCIES =
@IFUNC_FALSE@ifuncmain2_DEPENDENCIES =
@NATIVE_LINKER_FALSE@ifuncmain2_DEPENDENCIES =
415,58 → 430,80
@GCC_FALSE@ifuncmain3_DEPENDENCIES =
@IFUNC_FALSE@ifuncmain3_DEPENDENCIES =
@NATIVE_LINKER_FALSE@ifuncmain3_DEPENDENCIES =
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__append_47 = ifuncmain4static \
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain4picstatic
@GCC_FALSE@ifuncmain4static_DEPENDENCIES =
@HAVE_STATIC_FALSE@ifuncmain4static_DEPENDENCIES =
@IFUNC_FALSE@ifuncmain4static_DEPENDENCIES =
@NATIVE_LINKER_FALSE@ifuncmain4static_DEPENDENCIES =
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__append_48 = ifuncmain4
@GCC_FALSE@ifuncmain4_DEPENDENCIES =
@IFUNC_FALSE@ifuncmain4_DEPENDENCIES =
@NATIVE_LINKER_FALSE@ifuncmain4_DEPENDENCIES =
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__append_49 = ifuncmain5static \
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain5picstatic
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__append_50 = ifuncmain5 \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain5pic \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain5staticpic \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain5pie \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain6pie
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__append_51 = ifuncmain7static \
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain7picstatic
@GCC_FALSE@ifuncmain7static_DEPENDENCIES =
@HAVE_STATIC_FALSE@ifuncmain7static_DEPENDENCIES =
@IFUNC_FALSE@ifuncmain7static_DEPENDENCIES =
@NATIVE_LINKER_FALSE@ifuncmain7static_DEPENDENCIES =
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__append_52 = ifuncmain7 \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain7pic \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain7pie \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncvar
@GCC_FALSE@ifuncmain7_DEPENDENCIES =
@IFUNC_FALSE@ifuncmain7_DEPENDENCIES =
@NATIVE_LINKER_FALSE@ifuncmain7_DEPENDENCIES =
 
# Test that --start-lib and --end-lib function correctly.
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_34 = start_lib_test
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_53 = start_lib_test
 
# End-to-end incremental linking tests.
# Incremental linking is currently supported only on the x86_64 target.
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_35 = incremental_test_2 \
# Test the --incremental-unchanged flag with an archive library.
# The second link should not update the library.
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_54 = incremental_test_2 \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_3 \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_4 \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_5 \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_6 \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_copy_test \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_common_test_1
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_36 = two_file_test_tmp_2.o \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_55 = two_file_test_tmp_2.o \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_tmp_3.o \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_4.base \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_tmp_4.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_tmp_4.o \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_5.a \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_6.a
 
# These tests work with native and cross linkers.
 
# Test script section order.
@NATIVE_OR_CROSS_LINKER_TRUE@am__append_37 = script_test_10.sh
@NATIVE_OR_CROSS_LINKER_TRUE@am__append_38 = script_test_10.stdout
@NATIVE_OR_CROSS_LINKER_TRUE@am__append_56 = script_test_10.sh
@NATIVE_OR_CROSS_LINKER_TRUE@am__append_57 = script_test_10.stdout
 
# These tests work with cross linkers only.
@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_39 = split_i386.sh
@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_40 = split_i386_1.stdout split_i386_2.stdout \
@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_58 = split_i386.sh
@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_59 = split_i386_1.stdout split_i386_2.stdout \
@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_i386_3.stdout split_i386_4.stdout split_i386_r.stdout
 
@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_41 = split_i386_1 split_i386_2 split_i386_3 \
@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_60 = split_i386_1 split_i386_2 split_i386_3 \
@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_i386_4 split_i386_r
 
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_42 = split_x86_64.sh
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_43 = split_x86_64_1.stdout split_x86_64_2.stdout \
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_61 = split_x86_64.sh
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_62 = split_x86_64_1.stdout split_x86_64_2.stdout \
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_x86_64_3.stdout split_x86_64_4.stdout split_x86_64_r.stdout
 
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_44 = split_x86_64_1 split_x86_64_2 split_x86_64_3 \
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_63 = split_x86_64_1 split_x86_64_2 split_x86_64_3 \
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ split_x86_64_4 split_x86_64_r
 
 
# Cortex-A8 workaround test.
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_45 = arm_abs_global.sh \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_64 = arm_abs_global.sh \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_branch_in_range.sh \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_branch_out_of_range.sh \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_fix_v4bx.sh \
473,8 → 510,9
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_attr_merge.sh \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_cortex_a8.sh \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_exidx_test.sh \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ pr12826.sh
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_46 = arm_abs_global.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ pr12826.sh \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_unaligned_reloc.sh
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_65 = arm_abs_global.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_bl_in_range.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_bl_out_of_range.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ thumb_bl_in_range.stdout \
486,6 → 524,8
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ thumb2_blx_in_range.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ thumb2_blx_out_of_range.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ thumb_bl_out_of_range_local.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_thm_jump11.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_thm_jump8.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_fix_v4bx.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_fix_v4bx_interworking.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_no_fix_v4bx.stdout \
499,8 → 539,9
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_cortex_a8_local.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_cortex_a8_local_reloc.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_exidx_test.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ pr12826.stdout
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_47 = arm_abs_global \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ pr12826.stdout \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_unaligned_reloc.stdout
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@am__append_66 = arm_abs_global \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_bl_in_range \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_bl_out_of_range \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ thumb_bl_in_range \
512,6 → 553,8
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ thumb2_blx_in_range \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ thumb2_blx_out_of_range \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ thumb_bl_out_of_range_local \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_thm_jump11 \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_thm_jump8 \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_fix_v4bx \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_fix_v4bx_interworking \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_no_fix_v4bx \
523,7 → 566,8
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_cortex_a8_bl \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_cortex_a8_blx \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_cortex_a8_local \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_cortex_a8_local_reloc
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_cortex_a8_local_reloc \
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ arm_unaligned_reloc
subdir = testsuite
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
552,15 → 596,16
@NATIVE_OR_CROSS_LINKER_TRUE@ binary_unittest$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_2 = icf_virtual_function_folding_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ basic_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ basic_static_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ basic_pic_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ basic_static_pic_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ basic_pie_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ constructor_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ constructor_static_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_static_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_pic_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ basic_pic_test$(EXEEXT)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_3 = basic_static_test$(EXEEXT) \
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@ basic_static_pic_test$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_4 = basic_pie_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ constructor_test$(EXEEXT)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_5 = constructor_static_test$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_6 = two_file_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_pic_test$(EXEEXT)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_7 = two_file_static_test$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_8 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_1_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_2_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_1_pic_2_test$(EXEEXT) \
570,7 → 615,7
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_separate_shared_21_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_relocatable_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_pie_test$(EXEEXT)
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_3 = two_file_shared_1_nonpic_test$(EXEEXT) \
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_9 = two_file_shared_1_nonpic_test$(EXEEXT) \
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_shared_2_nonpic_test$(EXEEXT) \
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_same_shared_nonpic_test$(EXEEXT) \
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_separate_shared_12_nonpic_test$(EXEEXT) \
578,25 → 623,26
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_mixed_shared_test$(EXEEXT) \
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_mixed_2_shared_test$(EXEEXT) \
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_mixed_pie_test$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_4 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_10 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_strip_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_same_shared_strip_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ common_test_1$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ common_test_2$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_static_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_shared_1_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_shared_2_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_same_shared_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_separate_shared_12_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_separate_shared_21_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_separate_shared_21_test$(EXEEXT)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_11 = exception_static_test$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_12 = weak_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_undef_test$(EXEEXT)
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_5 = weak_undef_nonpic_test$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_6 = weak_alias_test$(EXEEXT) \
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_13 = weak_undef_nonpic_test$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_14 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_alias_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_plt$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ copy_test$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am__EXEEXT_7 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am__EXEEXT_15 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_pic_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_pie_test$(EXEEXT) \
604,32 → 650,40
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_shared_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_shared_ie_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_shared_gd_to_ie_test$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_GNU2_DIALECT_TRUE@@TLS_TRUE@am__EXEEXT_8 = tls_shared_gnu2_gd_to_ie_test$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_DESCRIPTORS_TRUE@@TLS_GNU2_DIALECT_TRUE@@TLS_TRUE@am__EXEEXT_9 = tls_shared_gnu2_test$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@am__EXEEXT_10 = tls_static_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@ tls_static_pic_test$(EXEEXT)
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am__EXEEXT_11 = tls_shared_nonpic_test$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_12 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_GNU2_DIALECT_TRUE@@TLS_TRUE@am__EXEEXT_16 = tls_shared_gnu2_gd_to_ie_test$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_DESCRIPTORS_TRUE@@TLS_GNU2_DIALECT_TRUE@@TLS_TRUE@am__EXEEXT_17 = tls_shared_gnu2_test$(EXEEXT)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@am__EXEEXT_18 = tls_static_test$(EXEEXT) \
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@ tls_static_pic_test$(EXEEXT)
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am__EXEEXT_19 = tls_shared_nonpic_test$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_20 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ many_sections_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ many_sections_r_test$(EXEEXT)
@CONSTRUCTOR_PRIORITY_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_13 = initpri1$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_14 = flagstest_o_specialfile$(EXEEXT)
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_15 = flagstest_compress_debug_sections$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ many_sections_r_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ initpri1$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ initpri2$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ initpri3a$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ initpri3b$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ flagstest_o_specialfile$(EXEEXT)
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_21 = flagstest_compress_debug_sections$(EXEEXT) \
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ flagstest_o_specialfile_and_compress_debug_sections$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_16 = ver_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_22 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ flagstest_o_ttext_1$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_2$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_6$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_8$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_9$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_11$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_12$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_1$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_2$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_now_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_strip_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_script_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_1$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_2$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ justsyms$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ justsyms_exec$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ binary_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_3$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ tls_phdrs_script_test$(EXEEXT) \
636,7 → 690,7
@GCC_TRUE@@NATIVE_LINKER_TRUE@ tls_script_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ thin_archive_test_1$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ thin_archive_test_2$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@am__EXEEXT_17 = plugin_test_1$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@am__EXEEXT_23 = plugin_test_1$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_2$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_3$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_4$(EXEEXT) \
644,16 → 698,17
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_6$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_7$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@PLUGINS_TRUE@ plugin_test_8$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_18 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_24 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exclude_libs_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ local_labels_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ discard_locals_test$(EXEEXT)
@GCC_TRUE@@MCMODEL_MEDIUM_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_19 = large$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_20 = \
@GCC_TRUE@@MCMODEL_MEDIUM_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_25 = large$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_26 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ permission_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ searched_file_test$(EXEEXT)
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_21 = ifuncmain1static$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1picstatic$(EXEEXT) \
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_27 = ifuncmain1static$(EXEEXT) \
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1picstatic$(EXEEXT)
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_28 = \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1pic$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1vis$(EXEEXT) \
661,31 → 716,38
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1staticpic$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1pie$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1vispie$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1staticpie$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain2static$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain2picstatic$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain1staticpie$(EXEEXT)
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_29 = ifuncmain2static$(EXEEXT) \
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain2picstatic$(EXEEXT)
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_30 = \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain2$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain2pic$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain3$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain4static$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain4picstatic$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain4$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain5static$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain5picstatic$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain3$(EXEEXT)
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_31 = ifuncmain4static$(EXEEXT) \
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain4picstatic$(EXEEXT)
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_32 = \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain4$(EXEEXT)
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_33 = ifuncmain5static$(EXEEXT) \
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain5picstatic$(EXEEXT)
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_34 = \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain5$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain5pic$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain5staticpic$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain5pie$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain6pie$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain7static$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain7picstatic$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain6pie$(EXEEXT)
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_35 = ifuncmain7static$(EXEEXT) \
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain7picstatic$(EXEEXT)
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_36 = \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain7$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain7pic$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain7pie$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_22 = start_lib_test$(EXEEXT)
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_23 = incremental_test_2$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncmain7pie$(EXEEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncvar$(EXEEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_37 = start_lib_test$(EXEEXT)
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_38 = incremental_test_2$(EXEEXT) \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_3$(EXEEXT) \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_4$(EXEEXT) \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_5$(EXEEXT) \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_test_6$(EXEEXT) \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_copy_test$(EXEEXT) \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ incremental_common_test_1$(EXEEXT)
basic_pic_test_SOURCES = basic_pic_test.c
743,8 → 805,7
$(common_test_2_LDFLAGS) $(LDFLAGS) -o $@
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__objects_1 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ constructor_test.$(OBJEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am_constructor_static_test_OBJECTS = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(am__objects_1)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@am_constructor_static_test_OBJECTS = $(am__objects_1)
constructor_static_test_OBJECTS = \
$(am_constructor_static_test_OBJECTS)
constructor_static_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
806,8 → 867,7
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_test_main.$(OBJEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_test_1.$(OBJEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exception_test_2.$(OBJEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am_exception_static_test_OBJECTS = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(am__objects_2)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@am_exception_static_test_OBJECTS = $(am__objects_2)
exception_static_test_OBJECTS = $(am_exception_static_test_OBJECTS)
exception_static_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(exception_static_test_LDFLAGS) $(LDFLAGS) -o $@
846,6 → 906,12
libgoldtest.a ../libgold.a ../../libiberty/libiberty.a \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
flagstest_o_ttext_1_SOURCES = flagstest_o_ttext_1.c
flagstest_o_ttext_1_OBJECTS = flagstest_o_ttext_1.$(OBJEXT)
flagstest_o_ttext_1_LDADD = $(LDADD)
flagstest_o_ttext_1_DEPENDENCIES = libgoldtest.a ../libgold.a \
../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
icf_virtual_function_folding_test_SOURCES = \
icf_virtual_function_folding_test.c
icf_virtual_function_folding_test_OBJECTS = \
876,7 → 942,7
ifuncmain1pie_DEPENDENCIES = libgoldtest.a ../libgold.a \
../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am_ifuncmain1static_OBJECTS = ifuncmain1.$(OBJEXT)
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am_ifuncmain1static_OBJECTS = ifuncmain1.$(OBJEXT)
ifuncmain1static_OBJECTS = $(am_ifuncmain1static_OBJECTS)
ifuncmain1static_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(ifuncmain1static_LDFLAGS) $(LDFLAGS) -o $@
925,8 → 991,8
ifuncmain2picstatic_DEPENDENCIES = libgoldtest.a ../libgold.a \
../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am_ifuncmain2static_OBJECTS = ifuncmain2.$(OBJEXT) \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncdep2.$(OBJEXT)
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am_ifuncmain2static_OBJECTS = ifuncmain2.$(OBJEXT) \
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncdep2.$(OBJEXT)
ifuncmain2static_OBJECTS = $(am_ifuncmain2static_OBJECTS)
ifuncmain2static_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(ifuncmain2static_LDFLAGS) $(LDFLAGS) -o $@
944,7 → 1010,7
ifuncmain4picstatic_DEPENDENCIES = libgoldtest.a ../libgold.a \
../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am_ifuncmain4static_OBJECTS = ifuncmain4.$(OBJEXT)
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am_ifuncmain4static_OBJECTS = ifuncmain4.$(OBJEXT)
ifuncmain4static_OBJECTS = $(am_ifuncmain4static_OBJECTS)
ifuncmain4static_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(ifuncmain4static_LDFLAGS) $(LDFLAGS) -o $@
970,7 → 1036,7
ifuncmain5pie_DEPENDENCIES = libgoldtest.a ../libgold.a \
../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am_ifuncmain5static_OBJECTS = ifuncmain5.$(OBJEXT)
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am_ifuncmain5static_OBJECTS = ifuncmain5.$(OBJEXT)
ifuncmain5static_OBJECTS = $(am_ifuncmain5static_OBJECTS)
ifuncmain5static_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(ifuncmain5static_LDFLAGS) $(LDFLAGS) -o $@
1008,10 → 1074,15
ifuncmain7pie_DEPENDENCIES = libgoldtest.a ../libgold.a \
../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am_ifuncmain7static_OBJECTS = ifuncmain7.$(OBJEXT)
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am_ifuncmain7static_OBJECTS = ifuncmain7.$(OBJEXT)
ifuncmain7static_OBJECTS = $(am_ifuncmain7static_OBJECTS)
ifuncmain7static_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(ifuncmain7static_LDFLAGS) $(LDFLAGS) -o $@
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@am_ifuncvar_OBJECTS = \
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ ifuncvar3.$(OBJEXT)
ifuncvar_OBJECTS = $(am_ifuncvar_OBJECTS)
ifuncvar_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(ifuncvar_LDFLAGS) \
$(LDFLAGS) -o $@
incremental_common_test_1_SOURCES = incremental_common_test_1.c
incremental_common_test_1_OBJECTS = \
incremental_common_test_1.$(OBJEXT)
1043,15 → 1114,48
incremental_test_4_DEPENDENCIES = libgoldtest.a ../libgold.a \
../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
@CONSTRUCTOR_PRIORITY_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@am_initpri1_OBJECTS = initpri1.$(OBJEXT)
incremental_test_5_SOURCES = incremental_test_5.c
incremental_test_5_OBJECTS = incremental_test_5.$(OBJEXT)
incremental_test_5_LDADD = $(LDADD)
incremental_test_5_DEPENDENCIES = libgoldtest.a ../libgold.a \
../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
incremental_test_6_SOURCES = incremental_test_6.c
incremental_test_6_OBJECTS = incremental_test_6.$(OBJEXT)
incremental_test_6_LDADD = $(LDADD)
incremental_test_6_DEPENDENCIES = libgoldtest.a ../libgold.a \
../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am_initpri1_OBJECTS = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ initpri1.$(OBJEXT)
initpri1_OBJECTS = $(am_initpri1_OBJECTS)
initpri1_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(initpri1_LDFLAGS) \
$(LDFLAGS) -o $@
@GCC_TRUE@@NATIVE_LINKER_TRUE@am_initpri2_OBJECTS = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ initpri2.$(OBJEXT)
initpri2_OBJECTS = $(am_initpri2_OBJECTS)
initpri2_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(initpri2_LDFLAGS) \
$(LDFLAGS) -o $@
@GCC_TRUE@@NATIVE_LINKER_TRUE@am_initpri3a_OBJECTS = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ initpri3.$(OBJEXT)
initpri3a_OBJECTS = $(am_initpri3a_OBJECTS)
initpri3a_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(initpri3a_LDFLAGS) \
$(LDFLAGS) -o $@
@GCC_TRUE@@NATIVE_LINKER_TRUE@am_initpri3b_OBJECTS = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ initpri3.$(OBJEXT)
initpri3b_OBJECTS = $(am_initpri3b_OBJECTS)
initpri3b_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(initpri3b_LDFLAGS) \
$(LDFLAGS) -o $@
@GCC_TRUE@@NATIVE_LINKER_TRUE@am_justsyms_OBJECTS = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ justsyms_1.$(OBJEXT)
justsyms_OBJECTS = $(am_justsyms_OBJECTS)
justsyms_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(justsyms_LDFLAGS) $(LDFLAGS) -o $@
@GCC_TRUE@@NATIVE_LINKER_TRUE@am_justsyms_exec_OBJECTS = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ justsyms_exec.$(OBJEXT)
justsyms_exec_OBJECTS = $(am_justsyms_exec_OBJECTS)
justsyms_exec_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(justsyms_exec_LDFLAGS) $(LDFLAGS) -o $@
@GCC_TRUE@@MCMODEL_MEDIUM_TRUE@@NATIVE_LINKER_TRUE@am_large_OBJECTS = large-large.$(OBJEXT)
large_OBJECTS = $(am_large_OBJECTS)
large_LINK = $(CCLD) $(large_CFLAGS) $(CFLAGS) $(large_LDFLAGS) \
1147,6 → 1251,11
protected_2_OBJECTS = $(am_protected_2_OBJECTS)
protected_2_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(protected_2_LDFLAGS) $(LDFLAGS) -o $@
@GCC_TRUE@@NATIVE_LINKER_TRUE@am_relro_now_test_OBJECTS = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_test_main.$(OBJEXT)
relro_now_test_OBJECTS = $(am_relro_now_test_OBJECTS)
relro_now_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(relro_now_test_LDFLAGS) $(LDFLAGS) -o $@
@GCC_TRUE@@NATIVE_LINKER_TRUE@am_relro_script_test_OBJECTS = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ relro_test_main.$(OBJEXT)
relro_script_test_OBJECTS = $(am_relro_script_test_OBJECTS)
1261,7 → 1370,7
tls_shared_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(tls_shared_test_LDFLAGS) $(LDFLAGS) -o $@
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am__objects_4 = tls_test_main.$(OBJEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@am_tls_static_pic_test_OBJECTS = $(am__objects_4)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@am_tls_static_pic_test_OBJECTS = $(am__objects_4)
tls_static_pic_test_OBJECTS = $(am_tls_static_pic_test_OBJECTS)
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@am__DEPENDENCIES_3 = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_test_pic.o \
1269,7 → 1378,7
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ tls_test_c_pic.o
tls_static_pic_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(tls_static_pic_test_LDFLAGS) $(LDFLAGS) -o $@
@GCC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@am_tls_static_test_OBJECTS = $(am__objects_3)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@am_tls_static_test_OBJECTS = $(am__objects_3)
tls_static_test_OBJECTS = $(am_tls_static_test_OBJECTS)
tls_static_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(tls_static_test_LDFLAGS) $(LDFLAGS) -o $@
1406,8 → 1515,7
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_1b.$(OBJEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_2.$(OBJEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_static_test_OBJECTS = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(am__objects_5)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@am_two_file_static_test_OBJECTS = $(am__objects_5)
two_file_static_test_OBJECTS = $(am_two_file_static_test_OBJECTS)
two_file_static_test_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(two_file_static_test_LDFLAGS) $(LDFLAGS) -o $@
1435,6 → 1543,11
ver_test_11_OBJECTS = $(am_ver_test_11_OBJECTS)
ver_test_11_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(ver_test_11_LDFLAGS) $(LDFLAGS) -o $@
@GCC_TRUE@@NATIVE_LINKER_TRUE@am_ver_test_12_OBJECTS = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_main_2.$(OBJEXT)
ver_test_12_OBJECTS = $(am_ver_test_12_OBJECTS)
ver_test_12_LINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(ver_test_12_LDFLAGS) $(LDFLAGS) -o $@
@GCC_TRUE@@NATIVE_LINKER_TRUE@am_ver_test_2_OBJECTS = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_main_2.$(OBJEXT)
ver_test_2_OBJECTS = $(am_ver_test_2_OBJECTS)
1508,12 → 1621,12
$(exclude_libs_test_SOURCES) \
flagstest_compress_debug_sections.c flagstest_o_specialfile.c \
flagstest_o_specialfile_and_compress_debug_sections.c \
icf_virtual_function_folding_test.c $(ifuncmain1_SOURCES) \
ifuncmain1pic.c ifuncmain1picstatic.c ifuncmain1pie.c \
$(ifuncmain1static_SOURCES) ifuncmain1staticpic.c \
ifuncmain1staticpie.c $(ifuncmain1vis_SOURCES) \
ifuncmain1vispic.c ifuncmain1vispie.c $(ifuncmain2_SOURCES) \
ifuncmain2pic.c ifuncmain2picstatic.c \
flagstest_o_ttext_1.c icf_virtual_function_folding_test.c \
$(ifuncmain1_SOURCES) ifuncmain1pic.c ifuncmain1picstatic.c \
ifuncmain1pie.c $(ifuncmain1static_SOURCES) \
ifuncmain1staticpic.c ifuncmain1staticpie.c \
$(ifuncmain1vis_SOURCES) ifuncmain1vispic.c ifuncmain1vispie.c \
$(ifuncmain2_SOURCES) ifuncmain2pic.c ifuncmain2picstatic.c \
$(ifuncmain2static_SOURCES) $(ifuncmain3_SOURCES) \
$(ifuncmain4_SOURCES) ifuncmain4picstatic.c \
$(ifuncmain4static_SOURCES) $(ifuncmain5_SOURCES) \
1521,19 → 1634,22
$(ifuncmain5static_SOURCES) ifuncmain5staticpic.c \
ifuncmain6pie.c $(ifuncmain7_SOURCES) ifuncmain7pic.c \
ifuncmain7picstatic.c ifuncmain7pie.c \
$(ifuncmain7static_SOURCES) incremental_common_test_1.c \
incremental_copy_test.c incremental_test_2.c \
incremental_test_3.c incremental_test_4.c $(initpri1_SOURCES) \
$(justsyms_SOURCES) $(large_SOURCES) local_labels_test.c \
many_sections_r_test.c $(many_sections_test_SOURCES) \
$(object_unittest_SOURCES) permission_test.c plugin_test_1.c \
plugin_test_2.c plugin_test_3.c plugin_test_4.c \
plugin_test_5.c plugin_test_6.c plugin_test_7.c \
plugin_test_8.c $(protected_1_SOURCES) $(protected_2_SOURCES) \
$(relro_script_test_SOURCES) $(relro_strip_test_SOURCES) \
$(relro_test_SOURCES) $(script_test_1_SOURCES) \
$(script_test_2_SOURCES) script_test_3.c \
$(searched_file_test_SOURCES) start_lib_test.c \
$(ifuncmain7static_SOURCES) $(ifuncvar_SOURCES) \
incremental_common_test_1.c incremental_copy_test.c \
incremental_test_2.c incremental_test_3.c incremental_test_4.c \
incremental_test_5.c incremental_test_6.c $(initpri1_SOURCES) \
$(initpri2_SOURCES) $(initpri3a_SOURCES) $(initpri3b_SOURCES) \
$(justsyms_SOURCES) $(justsyms_exec_SOURCES) $(large_SOURCES) \
local_labels_test.c many_sections_r_test.c \
$(many_sections_test_SOURCES) $(object_unittest_SOURCES) \
permission_test.c plugin_test_1.c plugin_test_2.c \
plugin_test_3.c plugin_test_4.c plugin_test_5.c \
plugin_test_6.c plugin_test_7.c plugin_test_8.c \
$(protected_1_SOURCES) $(protected_2_SOURCES) \
$(relro_now_test_SOURCES) $(relro_script_test_SOURCES) \
$(relro_strip_test_SOURCES) $(relro_test_SOURCES) \
$(script_test_1_SOURCES) $(script_test_2_SOURCES) \
script_test_3.c $(searched_file_test_SOURCES) start_lib_test.c \
$(thin_archive_test_1_SOURCES) $(thin_archive_test_2_SOURCES) \
$(tls_phdrs_script_test_SOURCES) $(tls_pic_test_SOURCES) \
tls_pie_pic_test.c tls_pie_test.c $(tls_script_test_SOURCES) \
1562,11 → 1678,11
$(two_file_shared_2_test_SOURCES) \
$(two_file_static_test_SOURCES) two_file_strip_test.c \
$(two_file_test_SOURCES) $(ver_test_SOURCES) \
$(ver_test_11_SOURCES) $(ver_test_2_SOURCES) \
$(ver_test_6_SOURCES) $(ver_test_8_SOURCES) \
$(ver_test_9_SOURCES) $(weak_alias_test_SOURCES) weak_plt.c \
$(weak_test_SOURCES) $(weak_undef_nonpic_test_SOURCES) \
$(weak_undef_test_SOURCES)
$(ver_test_11_SOURCES) $(ver_test_12_SOURCES) \
$(ver_test_2_SOURCES) $(ver_test_6_SOURCES) \
$(ver_test_8_SOURCES) $(ver_test_9_SOURCES) \
$(weak_alias_test_SOURCES) weak_plt.c $(weak_test_SOURCES) \
$(weak_undef_nonpic_test_SOURCES) $(weak_undef_test_SOURCES)
ETAGS = etags
CTAGS = ctags
am__tty_colors = \
1803,20 → 1919,21
# improve on that here. automake-1.9 info docs say "mostlyclean" is
# the right choice for files 'make' builds that people rebuild.
MOSTLYCLEANFILES = *.so *.syms *.stdout $(am__append_4) \
$(am__append_9) $(am__append_18) $(am__append_26) \
$(am__append_30) $(am__append_36) $(am__append_41) \
$(am__append_44) $(am__append_47)
$(am__append_17) $(am__append_26) $(am__append_28) \
$(am__append_30) $(am__append_36) $(am__append_40) \
$(am__append_55) $(am__append_60) $(am__append_63) \
$(am__append_66)
 
# We will add to these later, for each individual test. Note
# that we add each test under check_SCRIPTS or check_PROGRAMS;
# the TESTS variable is automatically populated from these.
check_SCRIPTS = $(am__append_2) $(am__append_24) $(am__append_28) \
$(am__append_37) $(am__append_39) $(am__append_42) \
$(am__append_45)
check_DATA = $(am__append_3) $(am__append_25) $(am__append_29) \
$(am__append_38) $(am__append_40) $(am__append_43) \
$(am__append_46)
BUILT_SOURCES = $(am__append_17)
check_SCRIPTS = $(am__append_2) $(am__append_34) $(am__append_38) \
$(am__append_56) $(am__append_58) $(am__append_61) \
$(am__append_64)
check_DATA = $(am__append_3) $(am__append_27) $(am__append_29) \
$(am__append_35) $(am__append_39) $(am__append_57) \
$(am__append_59) $(am__append_62) $(am__append_65)
BUILT_SOURCES = $(am__append_25)
TESTS = $(check_SCRIPTS) $(check_PROGRAMS)
 
# ---------------------------------------------------------------------
1837,10 → 1954,10
@GCC_TRUE@@NATIVE_LINKER_TRUE@constructor_test_DEPENDENCIES = gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@constructor_test_LDFLAGS = -Bgcctestdir/
@GCC_TRUE@@NATIVE_LINKER_TRUE@constructor_test_LDADD =
@GCC_TRUE@@NATIVE_LINKER_TRUE@constructor_static_test_SOURCES = $(constructor_test_SOURCES)
@GCC_TRUE@@NATIVE_LINKER_TRUE@constructor_static_test_DEPENDENCIES = $(constructor_test_DEPENDENCIES)
@GCC_TRUE@@NATIVE_LINKER_TRUE@constructor_static_test_LDFLAGS = $(constructor_test_LDFLAGS) -static
@GCC_TRUE@@NATIVE_LINKER_TRUE@constructor_static_test_LDADD = $(constructor_test_LDADD)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@constructor_static_test_SOURCES = $(constructor_test_SOURCES)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@constructor_static_test_DEPENDENCIES = $(constructor_test_DEPENDENCIES)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@constructor_static_test_LDFLAGS = $(constructor_test_LDFLAGS) -static
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@constructor_static_test_LDADD = $(constructor_test_LDADD)
@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_test_SOURCES = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_1.cc \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_1b.cc \
1851,10 → 1968,10
@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_test_DEPENDENCIES = gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_test_LDFLAGS = -Bgcctestdir/
@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_test_LDADD =
@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_static_test_SOURCES = $(two_file_test_SOURCES)
@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_static_test_DEPENDENCIES = $(two_file_test_DEPENDENCIES)
@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_static_test_LDFLAGS = $(two_file_test_LDFLAGS) -static
@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_static_test_LDADD = $(two_file_test_LDADD)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@two_file_static_test_SOURCES = $(two_file_test_SOURCES)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@two_file_static_test_DEPENDENCIES = $(two_file_test_DEPENDENCIES)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@two_file_static_test_LDFLAGS = $(two_file_test_LDFLAGS) -static
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@two_file_static_test_LDADD = $(two_file_test_LDADD)
@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_pic_test_SOURCES = two_file_test_main.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_pic_test_DEPENDENCIES = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld two_file_test_1_pic.o two_file_test_1b_pic.o two_file_test_2_pic.o
1976,10 → 2093,10
@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_test_DEPENDENCIES = gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_test_LDFLAGS = -Bgcctestdir/
@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_test_LDADD =
@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_static_test_SOURCES = $(exception_test_SOURCES)
@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_static_test_DEPENDENCIES = $(exception_test_DEPENDENCIES)
@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_static_test_LDFLAGS = $(exception_test_LDFLAGS) -static
@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_static_test_LDADD = $(exception_test_LDADD)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@exception_static_test_SOURCES = $(exception_test_SOURCES)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@exception_static_test_DEPENDENCIES = $(exception_test_DEPENDENCIES)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@exception_static_test_LDFLAGS = $(exception_test_LDFLAGS) -static
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@exception_static_test_LDADD = $(exception_test_LDADD)
@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_shared_1_test_SOURCES = exception_test_2.cc exception_test_main.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_shared_1_test_DEPENDENCIES = gcctestdir/ld exception_shared_1.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@exception_shared_1_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
2023,12 → 2140,12
@GCC_TRUE@@NATIVE_LINKER_TRUE@weak_alias_test_SOURCES = weak_alias_test_main.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@weak_alias_test_DEPENDENCIES = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld weak_alias_test_1.so weak_alias_test_2.so \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_alias_test_3.o weak_alias_test_4.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_alias_test_3.o weak_alias_test_4.so weak_alias_test_5.so
 
@GCC_TRUE@@NATIVE_LINKER_TRUE@weak_alias_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
@GCC_TRUE@@NATIVE_LINKER_TRUE@weak_alias_test_LDADD = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_alias_test_1.so weak_alias_test_2.so weak_alias_test_3.o \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_alias_test_4.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_alias_test_4.so weak_alias_test_5.so
 
@GCC_TRUE@@NATIVE_LINKER_TRUE@copy_test_SOURCES = copy_test.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@copy_test_DEPENDENCIES = gcctestdir/ld copy_test_1.so copy_test_2.so
2074,14 → 2191,14
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_DESCRIPTORS_TRUE@@TLS_GNU2_DIALECT_TRUE@@TLS_TRUE@tls_shared_gnu2_test_DEPENDENCIES = gcctestdir/ld tls_test_gnu2_shared.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_DESCRIPTORS_TRUE@@TLS_GNU2_DIALECT_TRUE@@TLS_TRUE@tls_shared_gnu2_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_DESCRIPTORS_TRUE@@TLS_GNU2_DIALECT_TRUE@@TLS_TRUE@tls_shared_gnu2_test_LDADD = tls_test_gnu2_shared.so -lpthread
@GCC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@tls_static_test_SOURCES = $(tls_test_SOURCES)
@GCC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@tls_static_test_DEPENDENCIES = $(tls_test_DEPENDENCIES)
@GCC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@tls_static_test_LDFLAGS = $(tls_test_LDFLAGS) -static
@GCC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@tls_static_test_LDADD = $(tls_test_LDADD)
@GCC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@tls_static_pic_test_SOURCES = $(tls_pic_test_SOURCES)
@GCC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@tls_static_pic_test_DEPENDENCIES = $(tls_pic_test_DEPENDENCIES)
@GCC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@tls_static_pic_test_LDFLAGS = $(tls_pic_test_LDFLAGS) -static
@GCC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@tls_static_pic_test_LDADD = $(tls_pic_test_LDADD)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@tls_static_test_SOURCES = $(tls_test_SOURCES)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@tls_static_test_DEPENDENCIES = $(tls_test_DEPENDENCIES)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@tls_static_test_LDFLAGS = $(tls_test_LDFLAGS) -static
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@tls_static_test_LDADD = $(tls_test_LDADD)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@tls_static_pic_test_SOURCES = $(tls_pic_test_SOURCES)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@tls_static_pic_test_DEPENDENCIES = $(tls_pic_test_DEPENDENCIES)
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@tls_static_pic_test_LDFLAGS = $(tls_pic_test_LDFLAGS) -static
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@@STATIC_TLS_TRUE@@TLS_TRUE@tls_static_pic_test_LDADD = $(tls_pic_test_LDADD)
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@tls_shared_nonpic_test_SOURCES = tls_test_main.cc
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@tls_shared_nonpic_test_DEPENDENCIES = gcctestdir/ld tls_test_shared_nonpic.so
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@tls_shared_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
2090,10 → 2207,22
@GCC_TRUE@@NATIVE_LINKER_TRUE@many_sections_test_DEPENDENCIES = gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@many_sections_test_LDFLAGS = -Bgcctestdir/ -rdynamic
@GCC_TRUE@@NATIVE_LINKER_TRUE@many_sections_test_LDADD =
@CONSTRUCTOR_PRIORITY_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri1_SOURCES = initpri1.c
@CONSTRUCTOR_PRIORITY_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri1_DEPENDENCIES = gcctestdir/ld
@CONSTRUCTOR_PRIORITY_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri1_LDFLAGS = -Bgcctestdir/
@CONSTRUCTOR_PRIORITY_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri1_LDADD =
@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri1_SOURCES = initpri1.c
@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri1_DEPENDENCIES = gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri1_LDFLAGS = -Bgcctestdir/
@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri1_LDADD =
@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri2_SOURCES = initpri2.c
@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri2_DEPENDENCIES = gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri2_LDFLAGS = -Bgcctestdir/
@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri2_LDADD =
@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri3a_SOURCES = initpri3.c
@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri3a_DEPENDENCIES = gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri3a_LDFLAGS = -Bgcctestdir/
@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri3a_LDADD =
@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri3b_SOURCES = initpri3.c
@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri3b_DEPENDENCIES = gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri3b_LDFLAGS = -Bgcctestdir/ -Wl,--no-ctors-in-init-array
@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri3b_LDADD =
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_SOURCES = ver_test_main.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_DEPENDENCIES = gcctestdir/ld ver_test_1.so ver_test_2.so ver_test_4.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
2118,6 → 2247,10
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_11_DEPENDENCIES = gcctestdir/ld ver_test_11.a
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_11_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_11_LDADD = ver_test_11.a
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_12_SOURCES = ver_test_main_2.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_12_DEPENDENCIES = gcctestdir/ld ver_test_12.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_12_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_12_LDADD = ver_test_12.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@protected_1_SOURCES = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_main_1.cc protected_main_2.cc protected_main_3.cc
 
2132,6 → 2265,10
@GCC_TRUE@@NATIVE_LINKER_TRUE@relro_test_DEPENDENCIES = gcctestdir/ld relro_test.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@relro_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
@GCC_TRUE@@NATIVE_LINKER_TRUE@relro_test_LDADD = relro_test.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@relro_now_test_SOURCES = relro_test_main.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@relro_now_test_DEPENDENCIES = gcctestdir/ld relro_now_test.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@relro_now_test_LDFLAGS = -Bgcctestdir -Wl,-R,. -Wl,-z,relro -Wl,-z,now
@GCC_TRUE@@NATIVE_LINKER_TRUE@relro_now_test_LDADD = relro_now_test.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@relro_strip_test_SOURCES = relro_test_main.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@relro_strip_test_DEPENDENCIES = gcctestdir/ld relro_strip_test.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@relro_strip_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
2152,6 → 2289,10
@GCC_TRUE@@NATIVE_LINKER_TRUE@justsyms_DEPENDENCIES = gcctestdir/ld justsyms_2r.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@justsyms_LDFLAGS = -Bgcctestdir/ -Wl,-R,justsyms_2r.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@justsyms_LDADD =
@GCC_TRUE@@NATIVE_LINKER_TRUE@justsyms_exec_SOURCES = justsyms_exec.c
@GCC_TRUE@@NATIVE_LINKER_TRUE@justsyms_exec_DEPENDENCIES = gcctestdir/ld justsyms_lib
@GCC_TRUE@@NATIVE_LINKER_TRUE@justsyms_exec_LDFLAGS = -Bgcctestdir/ -Wl,-R,justsyms_lib
@GCC_TRUE@@NATIVE_LINKER_TRUE@justsyms_exec_LDADD =
@GCC_TRUE@@NATIVE_LINKER_TRUE@binary_test_SOURCES = binary_test.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@binary_test_DEPENDENCIES = gcctestdir/ld binary.txt
@GCC_TRUE@@NATIVE_LINKER_TRUE@binary_test_LDFLAGS = -Bgcctestdir/ -Wl,--format,binary,binary.txt,--format,elf
2194,10 → 2335,10
@GCC_TRUE@@NATIVE_LINKER_TRUE@searched_file_test_DEPENDENCIES = alt/searched_file_test_lib.a
@GCC_TRUE@@NATIVE_LINKER_TRUE@searched_file_test_LDFLAGS = -Bgcctestdir/ -Lalt
@GCC_TRUE@@NATIVE_LINKER_TRUE@searched_file_test_LDADD = -l:searched_file_test_lib.a
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain1static_SOURCES = ifuncmain1.c
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain1static_DEPENDENCIES = gcctestdir/ld ifuncdep1.o
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain1static_LDFLAGS = -Bgcctestdir/ -static
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain1static_LDADD = ifuncdep1.o
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain1static_SOURCES = ifuncmain1.c
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain1static_DEPENDENCIES = gcctestdir/ld ifuncdep1.o
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain1static_LDFLAGS = -Bgcctestdir/ -static
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain1static_LDADD = ifuncdep1.o
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain1_SOURCES = ifuncmain1.c
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain1_DEPENDENCIES = gcctestdir/ld ifuncmod1.so
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain1_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
2206,10 → 2347,10
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain1vis_DEPENDENCIES = gcctestdir/ld ifuncmod1.so
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain1vis_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain1vis_LDADD = ifuncmod1.so
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain2static_SOURCES = ifuncmain2.c ifuncdep2.c
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain2static_DEPENDENCIES = gcctestdir/ld
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain2static_LDFLAGS = -Bgcctestdir/ -static
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain2static_LDADD =
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain2static_SOURCES = ifuncmain2.c ifuncdep2.c
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain2static_DEPENDENCIES = gcctestdir/ld
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain2static_LDFLAGS = -Bgcctestdir/ -static
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain2static_LDADD =
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain2_SOURCES = ifuncmain2.c ifuncdep2.c
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain2_DEPENDENCIES = gcctestdir/ld
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain2_LDFLAGS = -Bgcctestdir/
2218,30 → 2359,34
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain3_DEPENDENCIES = gcctestdir/ld ifuncmod3.so
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain3_LDFLAGS = -Bgcctestdir/ -Wl,--export-dynamic -Wl,-R,.
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain3_LDADD = -ldl
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain4static_SOURCES = ifuncmain4.c
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain4static_DEPENDENCIES = gcctestdir/ld
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain4static_LDFLAGS = -Bgcctestdir/ -static
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain4static_LDADD =
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain4static_SOURCES = ifuncmain4.c
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain4static_DEPENDENCIES = gcctestdir/ld
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain4static_LDFLAGS = -Bgcctestdir/ -static
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain4static_LDADD =
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain4_SOURCES = ifuncmain4.c
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain4_DEPENDENCIES = gcctestdir/ld
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain4_LDFLAGS = -Bgcctestdir/
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain4_LDADD =
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain5static_SOURCES = ifuncmain5.c
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain5static_DEPENDENCIES = gcctestdir/ld ifuncdep5.o
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain5static_LDFLAGS = -Bgcctestdir/ -static
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain5static_LDADD = ifuncdep5.o
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain5static_SOURCES = ifuncmain5.c
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain5static_DEPENDENCIES = gcctestdir/ld ifuncdep5.o
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain5static_LDFLAGS = -Bgcctestdir/ -static
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain5static_LDADD = ifuncdep5.o
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain5_SOURCES = ifuncmain5.c
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain5_DEPENDENCIES = gcctestdir/ld ifuncmod5.so
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain5_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain5_LDADD = ifuncmod5.so
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain7static_SOURCES = ifuncmain7.c
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain7static_DEPENDENCIES = gcctestdir/ld
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain7static_LDFLAGS = -Bgcctestdir/ -static
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain7static_LDADD =
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain7static_SOURCES = ifuncmain7.c
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain7static_DEPENDENCIES = gcctestdir/ld
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain7static_LDFLAGS = -Bgcctestdir/ -static
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain7static_LDADD =
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain7_SOURCES = ifuncmain7.c
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain7_DEPENDENCIES = gcctestdir/ld
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain7_LDFLAGS = -Bgcctestdir/
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain7_LDADD =
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncvar_SOURCES = ifuncvar3.c
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncvar_DEPENDENCIES = gcctestdir/ld ifuncvar.so
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncvar_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncvar_LDADD = ifuncvar.so
@DEFAULT_TARGET_I386_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@SPLIT_DEFSYMS = --defsym __morestack=0x100 --defsym __morestack_non_split=0x200
@DEFAULT_TARGET_X86_64_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@SPLIT_DEFSYMS = --defsym __morestack=0x100 --defsym __morestack_non_split=0x200
all: $(BUILT_SOURCES)
2304,6 → 2449,9
@GCC_FALSE@basic_static_pic_test$(EXEEXT): $(basic_static_pic_test_OBJECTS) $(basic_static_pic_test_DEPENDENCIES)
@GCC_FALSE@ @rm -f basic_static_pic_test$(EXEEXT)
@GCC_FALSE@ $(LINK) $(basic_static_pic_test_OBJECTS) $(basic_static_pic_test_LDADD) $(LIBS)
@HAVE_STATIC_FALSE@basic_static_pic_test$(EXEEXT): $(basic_static_pic_test_OBJECTS) $(basic_static_pic_test_DEPENDENCIES)
@HAVE_STATIC_FALSE@ @rm -f basic_static_pic_test$(EXEEXT)
@HAVE_STATIC_FALSE@ $(LINK) $(basic_static_pic_test_OBJECTS) $(basic_static_pic_test_LDADD) $(LIBS)
@NATIVE_LINKER_FALSE@basic_static_pic_test$(EXEEXT): $(basic_static_pic_test_OBJECTS) $(basic_static_pic_test_DEPENDENCIES)
@NATIVE_LINKER_FALSE@ @rm -f basic_static_pic_test$(EXEEXT)
@NATIVE_LINKER_FALSE@ $(LINK) $(basic_static_pic_test_OBJECTS) $(basic_static_pic_test_LDADD) $(LIBS)
2310,6 → 2458,9
@GCC_FALSE@basic_static_test$(EXEEXT): $(basic_static_test_OBJECTS) $(basic_static_test_DEPENDENCIES)
@GCC_FALSE@ @rm -f basic_static_test$(EXEEXT)
@GCC_FALSE@ $(LINK) $(basic_static_test_OBJECTS) $(basic_static_test_LDADD) $(LIBS)
@HAVE_STATIC_FALSE@basic_static_test$(EXEEXT): $(basic_static_test_OBJECTS) $(basic_static_test_DEPENDENCIES)
@HAVE_STATIC_FALSE@ @rm -f basic_static_test$(EXEEXT)
@HAVE_STATIC_FALSE@ $(LINK) $(basic_static_test_OBJECTS) $(basic_static_test_LDADD) $(LIBS)
@NATIVE_LINKER_FALSE@basic_static_test$(EXEEXT): $(basic_static_test_OBJECTS) $(basic_static_test_DEPENDENCIES)
@NATIVE_LINKER_FALSE@ @rm -f basic_static_test$(EXEEXT)
@NATIVE_LINKER_FALSE@ $(LINK) $(basic_static_test_OBJECTS) $(basic_static_test_LDADD) $(LIBS)
2391,6 → 2542,12
@NATIVE_LINKER_FALSE@flagstest_o_specialfile_and_compress_debug_sections$(EXEEXT): $(flagstest_o_specialfile_and_compress_debug_sections_OBJECTS) $(flagstest_o_specialfile_and_compress_debug_sections_DEPENDENCIES)
@NATIVE_LINKER_FALSE@ @rm -f flagstest_o_specialfile_and_compress_debug_sections$(EXEEXT)
@NATIVE_LINKER_FALSE@ $(LINK) $(flagstest_o_specialfile_and_compress_debug_sections_OBJECTS) $(flagstest_o_specialfile_and_compress_debug_sections_LDADD) $(LIBS)
@GCC_FALSE@flagstest_o_ttext_1$(EXEEXT): $(flagstest_o_ttext_1_OBJECTS) $(flagstest_o_ttext_1_DEPENDENCIES)
@GCC_FALSE@ @rm -f flagstest_o_ttext_1$(EXEEXT)
@GCC_FALSE@ $(LINK) $(flagstest_o_ttext_1_OBJECTS) $(flagstest_o_ttext_1_LDADD) $(LIBS)
@NATIVE_LINKER_FALSE@flagstest_o_ttext_1$(EXEEXT): $(flagstest_o_ttext_1_OBJECTS) $(flagstest_o_ttext_1_DEPENDENCIES)
@NATIVE_LINKER_FALSE@ @rm -f flagstest_o_ttext_1$(EXEEXT)
@NATIVE_LINKER_FALSE@ $(LINK) $(flagstest_o_ttext_1_OBJECTS) $(flagstest_o_ttext_1_LDADD) $(LIBS)
@GCC_FALSE@icf_virtual_function_folding_test$(EXEEXT): $(icf_virtual_function_folding_test_OBJECTS) $(icf_virtual_function_folding_test_DEPENDENCIES)
@GCC_FALSE@ @rm -f icf_virtual_function_folding_test$(EXEEXT)
@GCC_FALSE@ $(LINK) $(icf_virtual_function_folding_test_OBJECTS) $(icf_virtual_function_folding_test_LDADD) $(LIBS)
2412,6 → 2569,9
@GCC_FALSE@ifuncmain1picstatic$(EXEEXT): $(ifuncmain1picstatic_OBJECTS) $(ifuncmain1picstatic_DEPENDENCIES)
@GCC_FALSE@ @rm -f ifuncmain1picstatic$(EXEEXT)
@GCC_FALSE@ $(LINK) $(ifuncmain1picstatic_OBJECTS) $(ifuncmain1picstatic_LDADD) $(LIBS)
@HAVE_STATIC_FALSE@ifuncmain1picstatic$(EXEEXT): $(ifuncmain1picstatic_OBJECTS) $(ifuncmain1picstatic_DEPENDENCIES)
@HAVE_STATIC_FALSE@ @rm -f ifuncmain1picstatic$(EXEEXT)
@HAVE_STATIC_FALSE@ $(LINK) $(ifuncmain1picstatic_OBJECTS) $(ifuncmain1picstatic_LDADD) $(LIBS)
@IFUNC_FALSE@ifuncmain1picstatic$(EXEEXT): $(ifuncmain1picstatic_OBJECTS) $(ifuncmain1picstatic_DEPENDENCIES)
@IFUNC_FALSE@ @rm -f ifuncmain1picstatic$(EXEEXT)
@IFUNC_FALSE@ $(LINK) $(ifuncmain1picstatic_OBJECTS) $(ifuncmain1picstatic_LDADD) $(LIBS)
2484,6 → 2644,9
@GCC_FALSE@ifuncmain2picstatic$(EXEEXT): $(ifuncmain2picstatic_OBJECTS) $(ifuncmain2picstatic_DEPENDENCIES)
@GCC_FALSE@ @rm -f ifuncmain2picstatic$(EXEEXT)
@GCC_FALSE@ $(LINK) $(ifuncmain2picstatic_OBJECTS) $(ifuncmain2picstatic_LDADD) $(LIBS)
@HAVE_STATIC_FALSE@ifuncmain2picstatic$(EXEEXT): $(ifuncmain2picstatic_OBJECTS) $(ifuncmain2picstatic_DEPENDENCIES)
@HAVE_STATIC_FALSE@ @rm -f ifuncmain2picstatic$(EXEEXT)
@HAVE_STATIC_FALSE@ $(LINK) $(ifuncmain2picstatic_OBJECTS) $(ifuncmain2picstatic_LDADD) $(LIBS)
@IFUNC_FALSE@ifuncmain2picstatic$(EXEEXT): $(ifuncmain2picstatic_OBJECTS) $(ifuncmain2picstatic_DEPENDENCIES)
@IFUNC_FALSE@ @rm -f ifuncmain2picstatic$(EXEEXT)
@IFUNC_FALSE@ $(LINK) $(ifuncmain2picstatic_OBJECTS) $(ifuncmain2picstatic_LDADD) $(LIBS)
2502,6 → 2665,9
@GCC_FALSE@ifuncmain4picstatic$(EXEEXT): $(ifuncmain4picstatic_OBJECTS) $(ifuncmain4picstatic_DEPENDENCIES)
@GCC_FALSE@ @rm -f ifuncmain4picstatic$(EXEEXT)
@GCC_FALSE@ $(LINK) $(ifuncmain4picstatic_OBJECTS) $(ifuncmain4picstatic_LDADD) $(LIBS)
@HAVE_STATIC_FALSE@ifuncmain4picstatic$(EXEEXT): $(ifuncmain4picstatic_OBJECTS) $(ifuncmain4picstatic_DEPENDENCIES)
@HAVE_STATIC_FALSE@ @rm -f ifuncmain4picstatic$(EXEEXT)
@HAVE_STATIC_FALSE@ $(LINK) $(ifuncmain4picstatic_OBJECTS) $(ifuncmain4picstatic_LDADD) $(LIBS)
@IFUNC_FALSE@ifuncmain4picstatic$(EXEEXT): $(ifuncmain4picstatic_OBJECTS) $(ifuncmain4picstatic_DEPENDENCIES)
@IFUNC_FALSE@ @rm -f ifuncmain4picstatic$(EXEEXT)
@IFUNC_FALSE@ $(LINK) $(ifuncmain4picstatic_OBJECTS) $(ifuncmain4picstatic_LDADD) $(LIBS)
2526,6 → 2692,9
@GCC_FALSE@ifuncmain5picstatic$(EXEEXT): $(ifuncmain5picstatic_OBJECTS) $(ifuncmain5picstatic_DEPENDENCIES)
@GCC_FALSE@ @rm -f ifuncmain5picstatic$(EXEEXT)
@GCC_FALSE@ $(LINK) $(ifuncmain5picstatic_OBJECTS) $(ifuncmain5picstatic_LDADD) $(LIBS)
@HAVE_STATIC_FALSE@ifuncmain5picstatic$(EXEEXT): $(ifuncmain5picstatic_OBJECTS) $(ifuncmain5picstatic_DEPENDENCIES)
@HAVE_STATIC_FALSE@ @rm -f ifuncmain5picstatic$(EXEEXT)
@HAVE_STATIC_FALSE@ $(LINK) $(ifuncmain5picstatic_OBJECTS) $(ifuncmain5picstatic_LDADD) $(LIBS)
@IFUNC_FALSE@ifuncmain5picstatic$(EXEEXT): $(ifuncmain5picstatic_OBJECTS) $(ifuncmain5picstatic_DEPENDENCIES)
@IFUNC_FALSE@ @rm -f ifuncmain5picstatic$(EXEEXT)
@IFUNC_FALSE@ $(LINK) $(ifuncmain5picstatic_OBJECTS) $(ifuncmain5picstatic_LDADD) $(LIBS)
2577,6 → 2746,9
@GCC_FALSE@ifuncmain7picstatic$(EXEEXT): $(ifuncmain7picstatic_OBJECTS) $(ifuncmain7picstatic_DEPENDENCIES)
@GCC_FALSE@ @rm -f ifuncmain7picstatic$(EXEEXT)
@GCC_FALSE@ $(LINK) $(ifuncmain7picstatic_OBJECTS) $(ifuncmain7picstatic_LDADD) $(LIBS)
@HAVE_STATIC_FALSE@ifuncmain7picstatic$(EXEEXT): $(ifuncmain7picstatic_OBJECTS) $(ifuncmain7picstatic_DEPENDENCIES)
@HAVE_STATIC_FALSE@ @rm -f ifuncmain7picstatic$(EXEEXT)
@HAVE_STATIC_FALSE@ $(LINK) $(ifuncmain7picstatic_OBJECTS) $(ifuncmain7picstatic_LDADD) $(LIBS)
@IFUNC_FALSE@ifuncmain7picstatic$(EXEEXT): $(ifuncmain7picstatic_OBJECTS) $(ifuncmain7picstatic_DEPENDENCIES)
@IFUNC_FALSE@ @rm -f ifuncmain7picstatic$(EXEEXT)
@IFUNC_FALSE@ $(LINK) $(ifuncmain7picstatic_OBJECTS) $(ifuncmain7picstatic_LDADD) $(LIBS)
2595,6 → 2767,9
ifuncmain7static$(EXEEXT): $(ifuncmain7static_OBJECTS) $(ifuncmain7static_DEPENDENCIES)
@rm -f ifuncmain7static$(EXEEXT)
$(ifuncmain7static_LINK) $(ifuncmain7static_OBJECTS) $(ifuncmain7static_LDADD) $(LIBS)
ifuncvar$(EXEEXT): $(ifuncvar_OBJECTS) $(ifuncvar_DEPENDENCIES)
@rm -f ifuncvar$(EXEEXT)
$(ifuncvar_LINK) $(ifuncvar_OBJECTS) $(ifuncvar_LDADD) $(LIBS)
@DEFAULT_TARGET_X86_64_FALSE@incremental_common_test_1$(EXEEXT): $(incremental_common_test_1_OBJECTS) $(incremental_common_test_1_DEPENDENCIES)
@DEFAULT_TARGET_X86_64_FALSE@ @rm -f incremental_common_test_1$(EXEEXT)
@DEFAULT_TARGET_X86_64_FALSE@ $(LINK) $(incremental_common_test_1_OBJECTS) $(incremental_common_test_1_LDADD) $(LIBS)
2640,12 → 2815,42
@NATIVE_LINKER_FALSE@incremental_test_4$(EXEEXT): $(incremental_test_4_OBJECTS) $(incremental_test_4_DEPENDENCIES)
@NATIVE_LINKER_FALSE@ @rm -f incremental_test_4$(EXEEXT)
@NATIVE_LINKER_FALSE@ $(LINK) $(incremental_test_4_OBJECTS) $(incremental_test_4_LDADD) $(LIBS)
@DEFAULT_TARGET_X86_64_FALSE@incremental_test_5$(EXEEXT): $(incremental_test_5_OBJECTS) $(incremental_test_5_DEPENDENCIES)
@DEFAULT_TARGET_X86_64_FALSE@ @rm -f incremental_test_5$(EXEEXT)
@DEFAULT_TARGET_X86_64_FALSE@ $(LINK) $(incremental_test_5_OBJECTS) $(incremental_test_5_LDADD) $(LIBS)
@GCC_FALSE@incremental_test_5$(EXEEXT): $(incremental_test_5_OBJECTS) $(incremental_test_5_DEPENDENCIES)
@GCC_FALSE@ @rm -f incremental_test_5$(EXEEXT)
@GCC_FALSE@ $(LINK) $(incremental_test_5_OBJECTS) $(incremental_test_5_LDADD) $(LIBS)
@NATIVE_LINKER_FALSE@incremental_test_5$(EXEEXT): $(incremental_test_5_OBJECTS) $(incremental_test_5_DEPENDENCIES)
@NATIVE_LINKER_FALSE@ @rm -f incremental_test_5$(EXEEXT)
@NATIVE_LINKER_FALSE@ $(LINK) $(incremental_test_5_OBJECTS) $(incremental_test_5_LDADD) $(LIBS)
@DEFAULT_TARGET_X86_64_FALSE@incremental_test_6$(EXEEXT): $(incremental_test_6_OBJECTS) $(incremental_test_6_DEPENDENCIES)
@DEFAULT_TARGET_X86_64_FALSE@ @rm -f incremental_test_6$(EXEEXT)
@DEFAULT_TARGET_X86_64_FALSE@ $(LINK) $(incremental_test_6_OBJECTS) $(incremental_test_6_LDADD) $(LIBS)
@GCC_FALSE@incremental_test_6$(EXEEXT): $(incremental_test_6_OBJECTS) $(incremental_test_6_DEPENDENCIES)
@GCC_FALSE@ @rm -f incremental_test_6$(EXEEXT)
@GCC_FALSE@ $(LINK) $(incremental_test_6_OBJECTS) $(incremental_test_6_LDADD) $(LIBS)
@NATIVE_LINKER_FALSE@incremental_test_6$(EXEEXT): $(incremental_test_6_OBJECTS) $(incremental_test_6_DEPENDENCIES)
@NATIVE_LINKER_FALSE@ @rm -f incremental_test_6$(EXEEXT)
@NATIVE_LINKER_FALSE@ $(LINK) $(incremental_test_6_OBJECTS) $(incremental_test_6_LDADD) $(LIBS)
initpri1$(EXEEXT): $(initpri1_OBJECTS) $(initpri1_DEPENDENCIES)
@rm -f initpri1$(EXEEXT)
$(initpri1_LINK) $(initpri1_OBJECTS) $(initpri1_LDADD) $(LIBS)
initpri2$(EXEEXT): $(initpri2_OBJECTS) $(initpri2_DEPENDENCIES)
@rm -f initpri2$(EXEEXT)
$(initpri2_LINK) $(initpri2_OBJECTS) $(initpri2_LDADD) $(LIBS)
initpri3a$(EXEEXT): $(initpri3a_OBJECTS) $(initpri3a_DEPENDENCIES)
@rm -f initpri3a$(EXEEXT)
$(initpri3a_LINK) $(initpri3a_OBJECTS) $(initpri3a_LDADD) $(LIBS)
initpri3b$(EXEEXT): $(initpri3b_OBJECTS) $(initpri3b_DEPENDENCIES)
@rm -f initpri3b$(EXEEXT)
$(initpri3b_LINK) $(initpri3b_OBJECTS) $(initpri3b_LDADD) $(LIBS)
justsyms$(EXEEXT): $(justsyms_OBJECTS) $(justsyms_DEPENDENCIES)
@rm -f justsyms$(EXEEXT)
$(justsyms_LINK) $(justsyms_OBJECTS) $(justsyms_LDADD) $(LIBS)
justsyms_exec$(EXEEXT): $(justsyms_exec_OBJECTS) $(justsyms_exec_DEPENDENCIES)
@rm -f justsyms_exec$(EXEEXT)
$(justsyms_exec_LINK) $(justsyms_exec_OBJECTS) $(justsyms_exec_LDADD) $(LIBS)
large$(EXEEXT): $(large_OBJECTS) $(large_DEPENDENCIES)
@rm -f large$(EXEEXT)
$(large_LINK) $(large_OBJECTS) $(large_LDADD) $(LIBS)
2751,6 → 2956,9
protected_2$(EXEEXT): $(protected_2_OBJECTS) $(protected_2_DEPENDENCIES)
@rm -f protected_2$(EXEEXT)
$(protected_2_LINK) $(protected_2_OBJECTS) $(protected_2_LDADD) $(LIBS)
relro_now_test$(EXEEXT): $(relro_now_test_OBJECTS) $(relro_now_test_DEPENDENCIES)
@rm -f relro_now_test$(EXEEXT)
$(relro_now_test_LINK) $(relro_now_test_OBJECTS) $(relro_now_test_LDADD) $(LIBS)
relro_script_test$(EXEEXT): $(relro_script_test_OBJECTS) $(relro_script_test_DEPENDENCIES)
@rm -f relro_script_test$(EXEEXT)
$(relro_script_test_LINK) $(relro_script_test_OBJECTS) $(relro_script_test_LDADD) $(LIBS)
2925,6 → 3133,9
ver_test_11$(EXEEXT): $(ver_test_11_OBJECTS) $(ver_test_11_DEPENDENCIES)
@rm -f ver_test_11$(EXEEXT)
$(ver_test_11_LINK) $(ver_test_11_OBJECTS) $(ver_test_11_LDADD) $(LIBS)
ver_test_12$(EXEEXT): $(ver_test_12_OBJECTS) $(ver_test_12_DEPENDENCIES)
@rm -f ver_test_12$(EXEEXT)
$(ver_test_12_LINK) $(ver_test_12_OBJECTS) $(ver_test_12_LDADD) $(LIBS)
ver_test_2$(EXEEXT): $(ver_test_2_OBJECTS) $(ver_test_2_DEPENDENCIES)
@rm -f ver_test_2$(EXEEXT)
$(ver_test_2_LINK) $(ver_test_2_OBJECTS) $(ver_test_2_LDADD) $(LIBS)
2980,6 → 3191,7
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flagstest_compress_debug_sections.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flagstest_o_specialfile.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flagstest_o_specialfile_and_compress_debug_sections.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flagstest_o_ttext_1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/icf_virtual_function_folding_test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ifuncdep2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ifuncmain1.Po@am__quote@
3007,13 → 3219,19
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ifuncmain7pic.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ifuncmain7picstatic.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ifuncmain7pie.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ifuncvar3.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/incremental_common_test_1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/incremental_copy_test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/incremental_test_2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/incremental_test_3.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/incremental_test_4.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/incremental_test_5.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/incremental_test_6.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/initpri1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/initpri2.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/initpri3.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/justsyms_1.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/justsyms_exec.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/large-large.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/local_labels_test.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/many_sections_r_test.Po@am__quote@
3424,6 → 3642,8
@p='arm_exidx_test.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
pr12826.sh.log: pr12826.sh
@p='pr12826.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
arm_unaligned_reloc.sh.log: arm_unaligned_reloc.sh
@p='arm_unaligned_reloc.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
object_unittest.log: object_unittest$(EXEEXT)
@p='object_unittest$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
binary_unittest.log: binary_unittest$(EXEEXT)
3432,10 → 3652,10
@p='icf_virtual_function_folding_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
basic_test.log: basic_test$(EXEEXT)
@p='basic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
basic_pic_test.log: basic_pic_test$(EXEEXT)
@p='basic_pic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
basic_static_test.log: basic_static_test$(EXEEXT)
@p='basic_static_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
basic_pic_test.log: basic_pic_test$(EXEEXT)
@p='basic_pic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
basic_static_pic_test.log: basic_static_pic_test$(EXEEXT)
@p='basic_static_pic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
basic_pie_test.log: basic_pie_test$(EXEEXT)
3446,10 → 3666,10
@p='constructor_static_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
two_file_test.log: two_file_test$(EXEEXT)
@p='two_file_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
two_file_pic_test.log: two_file_pic_test$(EXEEXT)
@p='two_file_pic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
two_file_static_test.log: two_file_static_test$(EXEEXT)
@p='two_file_static_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
two_file_pic_test.log: two_file_pic_test$(EXEEXT)
@p='two_file_pic_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
two_file_shared_1_test.log: two_file_shared_1_test$(EXEEXT)
@p='two_file_shared_1_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
two_file_shared_2_test.log: two_file_shared_2_test$(EXEEXT)
3494,8 → 3714,6
@p='common_test_2$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
exception_test.log: exception_test$(EXEEXT)
@p='exception_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
exception_static_test.log: exception_static_test$(EXEEXT)
@p='exception_static_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
exception_shared_1_test.log: exception_shared_1_test$(EXEEXT)
@p='exception_shared_1_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
exception_shared_2_test.log: exception_shared_2_test$(EXEEXT)
3506,6 → 3724,8
@p='exception_separate_shared_12_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
exception_separate_shared_21_test.log: exception_separate_shared_21_test$(EXEEXT)
@p='exception_separate_shared_21_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
exception_static_test.log: exception_static_test$(EXEEXT)
@p='exception_static_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
weak_test.log: weak_test$(EXEEXT)
@p='weak_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
weak_undef_test.log: weak_undef_test$(EXEEXT)
3548,6 → 3768,12
@p='many_sections_r_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
initpri1.log: initpri1$(EXEEXT)
@p='initpri1$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
initpri2.log: initpri2$(EXEEXT)
@p='initpri2$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
initpri3a.log: initpri3a$(EXEEXT)
@p='initpri3a$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
initpri3b.log: initpri3b$(EXEEXT)
@p='initpri3b$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
flagstest_o_specialfile.log: flagstest_o_specialfile$(EXEEXT)
@p='flagstest_o_specialfile$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
flagstest_compress_debug_sections.log: flagstest_compress_debug_sections$(EXEEXT)
3554,6 → 3780,8
@p='flagstest_compress_debug_sections$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
flagstest_o_specialfile_and_compress_debug_sections.log: flagstest_o_specialfile_and_compress_debug_sections$(EXEEXT)
@p='flagstest_o_specialfile_and_compress_debug_sections$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
flagstest_o_ttext_1.log: flagstest_o_ttext_1$(EXEEXT)
@p='flagstest_o_ttext_1$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
ver_test.log: ver_test$(EXEEXT)
@p='ver_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
ver_test_2.log: ver_test_2$(EXEEXT)
3566,6 → 3794,8
@p='ver_test_9$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
ver_test_11.log: ver_test_11$(EXEEXT)
@p='ver_test_11$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
ver_test_12.log: ver_test_12$(EXEEXT)
@p='ver_test_12$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
protected_1.log: protected_1$(EXEEXT)
@p='protected_1$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
protected_2.log: protected_2$(EXEEXT)
3572,6 → 3802,8
@p='protected_2$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
relro_test.log: relro_test$(EXEEXT)
@p='relro_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
relro_now_test.log: relro_now_test$(EXEEXT)
@p='relro_now_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
relro_strip_test.log: relro_strip_test$(EXEEXT)
@p='relro_strip_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
relro_script_test.log: relro_script_test$(EXEEXT)
3582,6 → 3814,8
@p='script_test_2$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
justsyms.log: justsyms$(EXEEXT)
@p='justsyms$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
justsyms_exec.log: justsyms_exec$(EXEEXT)
@p='justsyms_exec$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
binary_test.log: binary_test$(EXEEXT)
@p='binary_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
script_test_3.log: script_test_3$(EXEEXT)
3682,6 → 3916,8
@p='ifuncmain7pic$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
ifuncmain7pie.log: ifuncmain7pie$(EXEEXT)
@p='ifuncmain7pie$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
ifuncvar.log: ifuncvar$(EXEEXT)
@p='ifuncvar$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
start_lib_test.log: start_lib_test$(EXEEXT)
@p='start_lib_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
incremental_test_2.log: incremental_test_2$(EXEEXT)
3690,6 → 3926,10
@p='incremental_test_3$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
incremental_test_4.log: incremental_test_4$(EXEEXT)
@p='incremental_test_4$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
incremental_test_5.log: incremental_test_5$(EXEEXT)
@p='incremental_test_5$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
incremental_test_6.log: incremental_test_6$(EXEEXT)
@p='incremental_test_6$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
incremental_copy_test.log: incremental_copy_test$(EXEEXT)
@p='incremental_copy_test$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
incremental_common_test_1.log: incremental_common_test_1$(EXEEXT)
3834,6 → 4074,12
@GCC_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ rm -f gcctestdir/ld
@GCC_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ (cd gcctestdir && $(LN_S) ../../ld-new ld)
 
# Some tests require the latest features of an in-tree assembler.
@GCC_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@gcctestdir/as: $(TEST_AS)
@GCC_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ test -d gcctestdir || mkdir -p gcctestdir
@GCC_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ rm -f gcctestdir/as
@GCC_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ (cd gcctestdir && $(LN_S) $(abs_top_builddir)/../gas/as-new as)
 
# ---------------------------------------------------------------------
# These tests test the output of gold (end-to-end tests). In
# particular, they make sure that gold can link "difficult" object
3943,15 → 4189,15
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -c -o $@ $<
@GCC_TRUE@@NATIVE_LINKER_TRUE@basic_test: basic_test.o gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ basic_test.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@basic_static_test: basic_test.o gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -static basic_test.o
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@basic_static_test: basic_test.o gcctestdir/ld
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -static basic_test.o
 
@GCC_TRUE@@NATIVE_LINKER_TRUE@basic_pic_test.o: basic_test.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -c -fpic -o $@ $<
@GCC_TRUE@@NATIVE_LINKER_TRUE@basic_pic_test: basic_pic_test.o gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ basic_pic_test.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@basic_static_pic_test: basic_pic_test.o gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -static basic_pic_test.o
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@basic_static_pic_test: basic_pic_test.o gcctestdir/ld
@GCC_TRUE@@HAVE_STATIC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -static basic_pic_test.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@basic_pie_test.o: basic_test.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -c -fpie -o $@ $<
@GCC_TRUE@@NATIVE_LINKER_TRUE@basic_pie_test: basic_pie_test.o gcctestdir/ld
3984,15 → 4230,15
@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared.dbg: two_file_shared.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) -w $< >$@ 2>/dev/null
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_1_nonpic.so: two_file_test_1.o gcctestdir/ld
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1.o two_file_test_1b.o
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1.o two_file_test_1b.o -Wl,-z,notext
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_2_nonpic.so: two_file_test_2.o gcctestdir/ld
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared two_file_test_2.o
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_nonpic.so: two_file_test_1.o two_file_test_1b.o two_file_test_2.o gcctestdir/ld
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1.o two_file_test_1b.o two_file_test_2.o
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1.o two_file_test_1b.o two_file_test_2.o -Wl,-z,notext
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_mixed.so: two_file_test_1_pic.o two_file_test_1b_pic.o two_file_test_2.o gcctestdir/ld
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1_pic.o two_file_test_1b_pic.o two_file_test_2.o
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1_pic.o two_file_test_1b_pic.o two_file_test_2.o -Wl,-z,notext
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_shared_mixed_1.so: two_file_test_1.o two_file_test_1b_pic.o two_file_shared_2.so gcctestdir/ld
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1.o two_file_test_1b_pic.o two_file_shared_2.so
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1.o two_file_test_1b_pic.o two_file_shared_2.so -Wl,-z,notext
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_mixed_pie_test: two_file_test_1.o two_file_test_1b_pie.o \
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main_pie.o two_file_shared_2.so gcctestdir/ld
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -Wl,-R,. -pie two_file_test_1.o two_file_test_1b_pie.o two_file_test_main_pie.o two_file_shared_2.so
4032,10 → 4278,10
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@weak_undef_file2_nonpic.o: weak_undef_file2.cc
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -c -o $@ $<
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@weak_undef_lib_nonpic.so: weak_undef_file1_nonpic.o
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared weak_undef_file1_nonpic.o
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared weak_undef_file1_nonpic.o -Wl,-z,notext
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@alt/weak_undef_lib_nonpic.so: weak_undef_file2_nonpic.o
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ test -d alt || mkdir -p alt
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared weak_undef_file2_nonpic.o
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared weak_undef_file2_nonpic.o -Wl,-z,notext
@GCC_TRUE@@NATIVE_LINKER_TRUE@weak_alias_test_1_pic.o: weak_alias_test_1.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -c -fpic -o $@ $<
@GCC_TRUE@@NATIVE_LINKER_TRUE@weak_alias_test_1.so: weak_alias_test_1_pic.o gcctestdir/ld
4050,6 → 4296,11
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -c -fpic -o $@ $<
@GCC_TRUE@@NATIVE_LINKER_TRUE@weak_alias_test_4.so: weak_alias_test_4_pic.o gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared weak_alias_test_4_pic.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@weak_alias_test_5_pic.o: weak_alias_test_5.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -c -fpic -o $@ $<
@GCC_TRUE@@NATIVE_LINKER_TRUE@weak_alias_test_5.so: weak_alias_test_5_pic.o $(srcdir)/weak_alias_test.script gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared weak_alias_test_5_pic.o \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ -Wl,--version-script,$(srcdir)/weak_alias_test.script
@GCC_TRUE@@NATIVE_LINKER_TRUE@weak_plt_main_pic.o: weak_plt_main.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -c -fpic -o $@ $<
@GCC_TRUE@@NATIVE_LINKER_TRUE@weak_plt: weak_plt_main_pic.o gcctestdir/ld
4116,7 → 4367,7
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_DESCRIPTORS_TRUE@@TLS_GNU2_DIALECT_TRUE@@TLS_TRUE@tls_test_gnu2_shared.so: tls_test_gnu2.o tls_test_file2_gnu2.o tls_test_c_gnu2.o gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_DESCRIPTORS_TRUE@@TLS_GNU2_DIALECT_TRUE@@TLS_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared tls_test_gnu2.o tls_test_file2_gnu2.o tls_test_c_gnu2.o
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@tls_test_shared_nonpic.so: tls_test.o tls_test_file2.o tls_test_c.o gcctestdir/ld
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared tls_test.o tls_test_file2.o tls_test_c.o
@FN_PTRS_IN_SO_WITHOUT_PIC_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@@TLS_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared tls_test.o tls_test_file2.o tls_test_c.o -Wl,-z,notext
@GCC_TRUE@@NATIVE_LINKER_TRUE@many_sections_define.h:
@GCC_TRUE@@NATIVE_LINKER_TRUE@ (for i in `seq 1 70000`; do \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ echo "int var_$$i __attribute__((section(\"section_$$i\"))) = $$i;"; \
4147,6 → 4398,20
@GCC_TRUE@@NATIVE_LINKER_TRUE@ rm -f $@; \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ exit 1; \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ fi
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@debug_msg_cdebug.o: debug_msg.cc gcctestdir/as
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -Bgcctestdir/ -O0 -g -Wa,--compress-debug-sections -c -w -o $@ $(srcdir)/debug_msg.cc
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@odr_violation1_cdebug.o: odr_violation1.cc gcctestdir/as
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -Bgcctestdir/ -O0 -g -Wa,--compress-debug-sections -c -w -o $@ $(srcdir)/odr_violation1.cc
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@odr_violation2_cdebug.o: odr_violation2.cc gcctestdir/as
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -Bgcctestdir/ -O2 -g -Wa,--compress-debug-sections -c -w -o $@ $(srcdir)/odr_violation2.cc
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@debug_msg_cdebug.err: debug_msg_cdebug.o odr_violation1_cdebug.o odr_violation2_cdebug.o gcctestdir/ld
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ @echo $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_cdebug debug_msg_cdebug.o odr_violation1_cdebug.o odr_violation2_cdebug.o "2>$@"
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ @if $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_cdebug debug_msg_cdebug.o odr_violation1_cdebug.o odr_violation2_cdebug.o 2>$@; \
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ then \
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ echo 1>&2 "Link of debug_msg_cdebug should have failed"; \
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ rm -f $@; \
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ exit 1; \
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ fi
@GCC_TRUE@@NATIVE_LINKER_TRUE@debug_msg.so: debug_msg.cc gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -Bgcctestdir/ -O0 -g -shared -fPIC -w -o $@ $(srcdir)/debug_msg.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@odr_violation1.so: odr_violation1.cc gcctestdir/ld
4199,6 → 4464,10
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -o /dev/stdout $< -Wl,--compress-debug-sections=zlib 2>&1 | cat > $@
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ chmod a+x $@
@GCC_TRUE@@HAVE_ZLIB_TRUE@@NATIVE_LINKER_TRUE@ test -s $@
@GCC_TRUE@@NATIVE_LINKER_TRUE@flagstest_o_ttext_1: flagstest_debug.o gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -o $@ $< -Wl,-Ttext,0x400000 -Wl,-Tdata,0x800000
@GCC_TRUE@@NATIVE_LINKER_TRUE@flagstest_o_ttext_2: flagstest_debug.o gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -o $@ $< -Wl,-Ttext,0x400010 -Wl,-Tdata,0x800010
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_1.so: ver_test_1.o ver_test_2.so ver_test_3.o ver_test_4.so gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared ver_test_1.o ver_test_2.so ver_test_3.o ver_test_4.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_2.so: ver_test_2.o $(srcdir)/ver_test_2.script ver_test_4.so gcctestdir/ld
4247,6 → 4516,8
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared -Wl,--version-script,$(srcdir)/ver_test_10.script ver_test_2.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_11.a: ver_test_1.o ver_test_2.o ver_test_4.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_AR) rc $@ $^
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_12.o: gcctestdir/ld ver_test_1.o ver_test_2.o ver_test_4.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld -r -o $@ ver_test_1.o ver_test_2.o ver_test_4.o
 
@GCC_TRUE@@NATIVE_LINKER_TRUE@protected_1.so: gcctestdir/ld protected_1_pic.o protected_2_pic.o protected_3_pic.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared protected_1_pic.o protected_2_pic.o protected_3_pic.o
4271,6 → 4542,8
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -c -fpic -o $@ $<
@GCC_TRUE@@NATIVE_LINKER_TRUE@relro_test.stdout: relro_test.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) -SlW relro_test.so > relro_test.stdout
@GCC_TRUE@@NATIVE_LINKER_TRUE@relro_now_test.so: gcctestdir/ld relro_test_pic.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared -Wl,-z,relro -Wl,-z,now relro_test_pic.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@relro_strip_test.so: relro_test.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_STRIP) -o $@ $<
@GCC_TRUE@@NATIVE_LINKER_TRUE@relro_script_test.so: gcctestdir/ld relro_script_test.t relro_test_pic.o
4279,6 → 4552,10
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -c -o $@ $<
@GCC_TRUE@@NATIVE_LINKER_TRUE@justsyms_2r.o: justsyms_2.o gcctestdir/ld $(srcdir)/justsyms.t
@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld -o $@ -r -T $(srcdir)/justsyms.t justsyms_2.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@justsyms_lib.o: justsyms_lib.c
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -c -o $@ $<
@GCC_TRUE@@NATIVE_LINKER_TRUE@justsyms_lib: justsyms_lib.o gcctestdir/ld
@GCC_TRUE@@NATIVE_LINKER_TRUE@ gcctestdir/ld -o $@ -Ttext=0x1000200 -Tdata=0x2000000 -e exported_func justsyms_lib.o
# Copy the file to the build directory to avoid worrying about the
# full pathname in the generated symbols.
@GCC_TRUE@@NATIVE_LINKER_TRUE@binary.txt: $(srcdir)/binary.in
4517,8 → 4794,8
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -c -fpic -o $@ $<
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain1pie.o: ifuncmain1.c
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -c -fpie -o $@ $<
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain1picstatic: ifuncmain1pic.o ifuncmod1.o gcctestdir/ld
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ -static ifuncmain1pic.o ifuncmod1.o
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain1picstatic: ifuncmain1pic.o ifuncmod1.o gcctestdir/ld
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ -static ifuncmain1pic.o ifuncmod1.o
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain1pic: ifuncmain1pic.o ifuncmod1.so gcctestdir/ld
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ ifuncmain1pic.o ifuncmod1.so -Wl,-R,.
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain1vispic.o: ifuncmain1vis.c
4541,8 → 4818,8
 
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncdep2pic.o: ifuncdep2.c
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -c -fpic -o $@ $<
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain2picstatic: ifuncmain2pic.o ifuncdep2pic.o gcctestdir/ld
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ -static ifuncmain2pic.o ifuncdep2pic.o
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain2picstatic: ifuncmain2pic.o ifuncdep2pic.o gcctestdir/ld
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ -static ifuncmain2pic.o ifuncdep2pic.o
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain2pic: ifuncmain2pic.o ifuncdep2pic.o gcctestdir/ld
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ ifuncmain2pic.o ifuncdep2pic.o
 
4553,8 → 4830,8
 
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain4pic.o: ifuncmain4.c
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -c -fpic -o $@ $<
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain4picstatic: ifuncmain4pic.o gcctestdir/ld
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ -static ifuncmain4pic.o
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain4picstatic: ifuncmain4pic.o gcctestdir/ld
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ -static ifuncmain4pic.o
 
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain5pic.o: ifuncmain5.c
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -c -fpic -o $@ $<
4569,8 → 4846,8
 
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncdep5.o: ifuncmod5.c
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -c -o $@ $<
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain5picstatic: ifuncmain5pic.o ifuncmod5.o gcctestdir/ld
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ -static ifuncmain5pic.o ifuncmod5.o
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain5picstatic: ifuncmain5pic.o ifuncmod5.o gcctestdir/ld
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ -static ifuncmain5pic.o ifuncmod5.o
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain5pic: ifuncmain5pic.o ifuncmod5.so gcctestdir/ld
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ ifuncmain5pic.o ifuncmod5.so -Wl,-R,.
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain5staticpic: ifuncmain5pic.o ifuncmod5.o gcctestdir/ld
4593,12 → 4870,18
 
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain7pie.o: ifuncmain7.c
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -c -fpie -o $@ $<
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain7picstatic: ifuncmain7pic.o gcctestdir/ld
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ -static ifuncmain7pic.o
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain7picstatic: ifuncmain7pic.o gcctestdir/ld
@GCC_TRUE@@HAVE_STATIC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ -static ifuncmain7pic.o
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain7pic: ifuncmain7pic.o gcctestdir/ld
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ ifuncmain7pic.o
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncmain7pie: ifuncmain7pie.o gcctestdir/ld
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ -pie ifuncmain7pie.o
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncvar1_pic.o: ifuncvar1.c
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -c -fpic -o $@ $<
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncvar2_pic.o: ifuncvar2.c
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -c -fpic -o $@ $<
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ifuncvar.so: ifuncvar1_pic.o ifuncvar2_pic.o gcctestdir/ld
@GCC_TRUE@@IFUNC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ -shared ifuncvar1_pic.o ifuncvar2_pic.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@strong_ref_weak_def_2.o: strong_ref_weak_def_2.c
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(COMPILE) -o $@ -c -fPIC $<
@GCC_TRUE@@NATIVE_LINKER_TRUE@strong_ref_weak_def_2.so: strong_ref_weak_def_2.o gcctestdir/ld
4635,17 → 4918,31
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(LINK) -Bgcctestdir/ -nostartfiles -nostdlib -T $(srcdir)/memory_test.t -o $@ memory_test.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@memory_test.stdout: memory_test
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) -lWS $< > $@
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@incremental_test_2: two_file_test_1_v1.o two_file_test_1.o two_file_test_1b.o \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_2.o two_file_test_main.o gcctestdir/ld
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f two_file_test_1_v1.o two_file_test_tmp_2.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-full -Bgcctestdir/ two_file_test_tmp_2.o two_file_test_1b.o two_file_test_2.o two_file_test_main.o
 
# End-to-end incremental linking tests.
# Incremental linking is currently supported only on the x86_64 target.
 
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_test_1_v1_ndebug.o: two_file_test_1_v1.cc
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -g0 -c -o $@ $<
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_test_1_ndebug.o: two_file_test_1.cc
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -g0 -c -o $@ $<
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_test_1b_ndebug.o: two_file_test_1b.cc
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -g0 -c -o $@ $<
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_test_2_ndebug.o: two_file_test_2.cc
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -g0 -c -o $@ $<
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@two_file_test_main_ndebug.o: two_file_test_main.cc
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -O0 -g0 -c -o $@ $<
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@incremental_test_2: two_file_test_1_v1_ndebug.o two_file_test_1_ndebug.o two_file_test_1b_ndebug.o \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_2_ndebug.o two_file_test_main_ndebug.o gcctestdir/ld
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f two_file_test_1_v1_ndebug.o two_file_test_tmp_2.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ two_file_test_tmp_2.o two_file_test_1b_ndebug.o two_file_test_2_ndebug.o two_file_test_main_ndebug.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ @sleep 1
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f two_file_test_1.o two_file_test_tmp_2.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ two_file_test_tmp_2.o two_file_test_1b.o two_file_test_2.o two_file_test_main.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f two_file_test_1_ndebug.o two_file_test_tmp_2.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ two_file_test_tmp_2.o two_file_test_1b_ndebug.o two_file_test_2_ndebug.o two_file_test_main_ndebug.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@incremental_test_3: two_file_test_1.o two_file_test_1b_v1.o two_file_test_1b.o \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_2.o two_file_test_main.o gcctestdir/ld
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f two_file_test_1b_v1.o two_file_test_tmp_3.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-full -Bgcctestdir/ two_file_test_1.o two_file_test_tmp_3.o two_file_test_2.o two_file_test_main.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ two_file_test_1.o two_file_test_tmp_3.o two_file_test_2.o two_file_test_main.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ @sleep 1
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f two_file_test_1b.o two_file_test_tmp_3.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ two_file_test_1.o two_file_test_tmp_3.o two_file_test_2.o two_file_test_main.o
4652,20 → 4949,38
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@incremental_test_4: two_file_test_1.o two_file_test_1b.o two_file_test_2_v1.o \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_2.o two_file_test_main.o gcctestdir/ld
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f two_file_test_2_v1.o two_file_test_tmp_4.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-full -Bgcctestdir/ two_file_test_1.o two_file_test_1b.o two_file_test_tmp_4.o two_file_test_main.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ two_file_test_1.o two_file_test_1b.o two_file_test_tmp_4.o two_file_test_main.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ mv -f incremental_test_4 incremental_test_4.base
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ @sleep 1
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f two_file_test_2.o two_file_test_tmp_4.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-update,--incremental-base=incremental_test_4.base -Bgcctestdir/ two_file_test_1.o two_file_test_1b.o two_file_test_tmp_4.o two_file_test_main.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@incremental_test_5: two_file_test_1.o two_file_test_1b_v1.o two_file_test_1b.o \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_2.o two_file_test_main.o gcctestdir/ld
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f two_file_test_1b_v1.o two_file_test_tmp_5.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_AR) rc two_file_test_5.a two_file_test_1.o two_file_test_tmp_5.o two_file_test_2.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ two_file_test_main.o two_file_test_5.a
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ @sleep 1
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f two_file_test_1b.o two_file_test_tmp_5.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_AR) rc two_file_test_5.a two_file_test_1.o two_file_test_tmp_5.o two_file_test_2.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ two_file_test_main.o two_file_test_5.a
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@incremental_test_6: two_file_test_1.o two_file_test_1b_v1.o two_file_test_1b.o \
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_2.o two_file_test_main.o gcctestdir/ld
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f two_file_test_1b.o two_file_test_tmp_6.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_AR) rc two_file_test_6.a two_file_test_1.o two_file_test_tmp_6.o two_file_test_2.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ two_file_test_main.o two_file_test_6.a
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ @sleep 1
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f two_file_test_1b_v1.o two_file_test_tmp_6.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_AR) rc two_file_test_6.a two_file_test_1.o two_file_test_tmp_6.o two_file_test_2.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ two_file_test_main.o -Wl,--incremental-unchanged two_file_test_6.a -Wl,--incremental-unknown
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@incremental_copy_test: copy_test_v1.o copy_test.o copy_test_1.so copy_test_2.so
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f copy_test_v1.o copy_test_tmp.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-full -Bgcctestdir/ -Wl,-R,. copy_test_tmp.o copy_test_1.so copy_test_2.so
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ -Wl,-R,. copy_test_tmp.o copy_test_1.so copy_test_2.so
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ @sleep 1
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f copy_test.o copy_test_tmp.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ -Wl,-R,. copy_test_tmp.o copy_test_1.so copy_test_2.so
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@incremental_common_test_1: common_test_1_v1.o common_test_1_v2.o gcctestdir/ld
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f common_test_1_v1.o common_test_1_tmp.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-full -Bgcctestdir/ common_test_1_tmp.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ common_test_1_tmp.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ @sleep 1
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ cp -f common_test_1_v2.o common_test_1_tmp.o
@DEFAULT_TARGET_X86_64_TRUE@@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ common_test_1_tmp.o
4837,6 → 5152,24
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@thumb_bl_out_of_range_local.o: thumb_bl_out_of_range_local.s
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_AS) -o $@ -march=armv5te $<
 
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@arm_thm_jump11.stdout: arm_thm_jump11
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_OBJDUMP) -D $< > $@
 
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@arm_thm_jump11: arm_thm_jump11.o ../ld-new
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ ../ld-new -T $(srcdir)/arm_thm_jump11.t -o $@ $<
 
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@arm_thm_jump11.o: arm_thm_jump11.s
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_AS) -o $@ $<
 
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@arm_thm_jump8.stdout: arm_thm_jump8
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_OBJDUMP) -D $< > $@
 
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@arm_thm_jump8: arm_thm_jump8.o ../ld-new
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ ../ld-new -T $(srcdir)/arm_thm_jump8.t -o $@ $<
 
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@arm_thm_jump8.o: arm_thm_jump8.s
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_AS) -o $@ $<
 
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@arm_fix_v4bx.stdout: arm_fix_v4bx
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_OBJDUMP) -D -j.text $< > $@
 
4963,6 → 5296,15
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@pr12826_2.o: pr12826_2.s
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_AS) -o $@ $<
 
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@arm_unaligned_reloc.stdout: arm_unaligned_reloc
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_OBJDUMP) -D $< > $@
 
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@arm_unaligned_reloc: arm_unaligned_reloc.o ../ld-new
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ ../ld-new -o $@ $<
 
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@arm_unaligned_reloc.o: arm_unaligned_reloc.s
@DEFAULT_TARGET_ARM_TRUE@@NATIVE_OR_CROSS_LINKER_TRUE@ $(TEST_AS) -o $@ $<
 
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
/trunk/gnu/binutils/gold/testsuite/arm_branch_in_range.sh
61,4 → 61,13
" 2000006: f400 c000 blx 1000008 <_backward_target>"
check thumb2_blx_in_range.stdout \
" 200000c: f3ff c7fe blx 300000c <_forward_target>"
check arm_thm_jump11.stdout \
" 8804: e400 b.n 8008 <_backward_target>"
check arm_thm_jump11.stdout \
" 8806: e3ff b.n 9008 <_forward_target>"
check arm_thm_jump8.stdout \
" 8104: d080 beq.n 8008 <_backward_target>"
check arm_thm_jump8.stdout \
" 8106: d07f beq.n 8208 <_forward_target>"
 
exit 0
/trunk/gnu/binutils/gold/testsuite/justsyms_lib.c
0,0 → 1,35
// justsyms_lib.cc -- test --just-symbols for gold
 
// Copyright 2011 Free Software Foundation, Inc.
// Written by Cary Coutant <ccoutant@google.com>.
 
// This file is part of gold.
 
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
// MA 02110-1301, USA.
 
// This test goes with justsyms_exec.cc. We compile this file, then
// link it into an executable image with -Ttext and -Tdata to set
// the starting addresses for each segment.
 
int exported_func(void);
 
int exported_data = 0x1000;
 
int
exported_func(void)
{
return 1;
}
/trunk/gnu/binutils/gold/testsuite/arm_exidx_test.s
1,12 → 1,25
.syntax unified
.arch armv5te
.text
.section .text.answer,"ax",%progbits
.align 2
.global answer
.type answer, %function
answer:
.fnstart
.cantunwind
mov r0, #42
bx lr
.fnend
.size answer, .-answer
 
# Check that we can handle an empty .text section
.section .text.empty,"ax",%progbits
.align 2
.global empty
.type empty, %function
empty:
.fnstart
.cantunwind
.fnend
.size empty, .-empty
 
/trunk/gnu/binutils/gold/testsuite/initpri3.c
0,0 → 1,80
/* initpri3.c -- test ctor odering when using init_array.
 
Copyright 2011 Free Software Foundation, Inc.
Written by Ian Lance Taylor <iant@google.com>.
 
This file is part of gold.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
 
/* This tests that the linker correctly orders .ctor entries when
putting them into .init_array, as is the default. */
 
#include <assert.h>
 
int i = 1;
 
static void
ctor1 (void)
{
assert (i == 1);
i = 2;
}
 
static void
ctor2 (void)
{
assert (i == 2);
i = 3;
}
 
static void
dtor1 (void)
{
assert (i == 3);
i = 2;
}
 
static void
dtor2 (void)
{
assert (i == 2);
i = 1;
}
 
/* The .ctors section is run in reverse order, the .dtors section in
run in forward order. We give these arrays the "aligned" attribute
because the x86_64 ABI would otherwise give them a 16-byte
alignment, which may leave a hole in the section. */
 
void (*ctors[]) (void)
__attribute__ ((aligned (4), section (".ctors"))) = {
ctor2,
ctor1
};
 
void (*dtors[]) (void)
__attribute__ ((aligned (4), section (".dtors"))) = {
dtor1,
dtor2
};
 
int
main (void)
{
assert (i == 3);
return 0;
}
/trunk/gnu/binutils/gold/testsuite/weak_alias_test.script
0,0 → 1,8
VER1 {
global:
versioned_symbol;
};
VER2 {
global:
versioned_alias;
};
/trunk/gnu/binutils/gold/testsuite/odr_violation2.cc
12,7 → 12,7
bool Ordering::operator()(int a, int b) {
// Optimization makes this operator() a different size than the one
// in odr_violation1.cc.
return a + 1 > b + 1;
return a + 12345 > b / 67;
}
 
void SortDescending(int array[], int size) {
/trunk/gnu/binutils/gold/testsuite/arm_thm_jump8.s
0,0 → 1,57
# arm_thm_jump8.s
# Test R_ARM_THM_JUMP8 relocations just within the branch range limits.
.syntax unified
.arch armv5te
 
.section .text.pre,"x"
 
# Add padding so that target is just in branch range.
.space 8
 
.global _backward_target
.code 16
.thumb_func
.type _backword_target, %function
_backward_target:
bx lr
.size _backward_target, .-_backward_target
.text
 
# Define _start so that linker does not complain.
.global _start
.code 32
.align 2
.type _start, %function
_start:
bx lr
.size _start, .-_start
 
.global _backward_test
.code 16
.thumb_func
.type _backward_test, %function
_backward_test:
beq.n _backward_target
.size _backward_test, .-_backward_test
 
.global _forward_test
.code 16
.thumb_func
.type _forward_test, %function
_forward_test:
beq.n _forward_target
.size _forward_test, .-_forward_test
.section .text.post,"x"
 
# Add padding so that target is just in branch range.
.space 8
 
.global _forward_target
.code 16
.thumb_func
.type _forward_target, %function
_forward_target:
bx lr
.size _forward_target, .-_forward_target
/trunk/gnu/binutils/gold/testsuite/arm_thm_jump8.t
0,0 → 1,36
/* arm_thm_jump8.t -- linker script to test R_ARM_THM_JUMP8 relocation.
 
Copyright 2011 Free Software Foundation, Inc.
Written by Doug Kwan <dougkwan@google.com>.
 
This file is part of gold.
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
 
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
 
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
 
SECTIONS
{
. = 0x8000;
 
.text.pre : { *(.text.pre) }
. = ALIGN(0x100);
.text : { *(.text) }
. = ALIGN(0x100);
.text.post : { *(.text.post) }
. += 0x1000;
.data : { *(.data) }
.bss : { *(.bss) }
.ARM.attributes : { *(.ARM.attributes) }
}
/trunk/gnu/binutils/gold/parameters.h
159,6 → 159,10
bool
incremental() const;
 
// Return true if we are doing a full incremental link.
bool
incremental_full() const;
 
// Return true if we are doing an incremental update.
bool
incremental_update() const;
/trunk/gnu/binutils/gold/object.cc
421,6 → 421,7
deferred_layout_relocs_(),
compressed_sections_()
{
this->e_type_ = ehdr.get_e_type();
}
 
template<int size, bool big_endian>
511,7 → 512,9
Sized_relobj_file<size, big_endian>::check_eh_frame_flags(
const elfcpp::Shdr<size, big_endian>* shdr) const
{
return (shdr->get_sh_type() == elfcpp::SHT_PROGBITS
elfcpp::Elf_Word sh_type = shdr->get_sh_type();
return ((sh_type == elfcpp::SHT_PROGBITS
|| sh_type == elfcpp::SHT_X86_64_UNWIND)
&& (shdr->get_sh_flags() & elfcpp::SHF_ALLOC) != 0);
}
 
746,10 → 749,11
// just like ordinary sections.
elfcpp::Elf_Word flags = elfcpp::Swap<32, big_endian>::readval(pword);
 
// Look up the group signature, which is the name of a symbol. This
// is a lot of effort to go to to read a string. Why didn't they
// just have the group signature point into the string table, rather
// than indirect through a symbol?
// Look up the group signature, which is the name of a symbol. ELF
// uses a symbol name because some group signatures are long, and
// the name is generally already in the symbol table, so it makes
// sense to put the long string just once in .strtab rather than in
// both .strtab and .shstrtab.
 
// Get the appropriate symbol table header (this will normally be
// the single SHT_SYMTAB section, but in principle it need not be).
1016,12 → 1020,13
 
template<int size, bool big_endian>
inline void
Sized_relobj_file<size, big_endian>::layout_section(Layout* layout,
unsigned int shndx,
const char* name,
typename This::Shdr& shdr,
unsigned int reloc_shndx,
unsigned int reloc_type)
Sized_relobj_file<size, big_endian>::layout_section(
Layout* layout,
unsigned int shndx,
const char* name,
const typename This::Shdr& shdr,
unsigned int reloc_shndx,
unsigned int reloc_type)
{
off_t offset;
Output_section* os = layout->layout(this, shndx, name, shdr,
1040,6 → 1045,53
this->set_relocs_must_follow_section_writes();
}
 
// Layout an input .eh_frame section.
 
template<int size, bool big_endian>
void
Sized_relobj_file<size, big_endian>::layout_eh_frame_section(
Layout* layout,
const unsigned char* symbols_data,
section_size_type symbols_size,
const unsigned char* symbol_names_data,
section_size_type symbol_names_size,
unsigned int shndx,
const typename This::Shdr& shdr,
unsigned int reloc_shndx,
unsigned int reloc_type)
{
gold_assert(this->has_eh_frame_);
 
off_t offset;
Output_section* os = layout->layout_eh_frame(this,
symbols_data,
symbols_size,
symbol_names_data,
symbol_names_size,
shndx,
shdr,
reloc_shndx,
reloc_type,
&offset);
this->output_sections()[shndx] = os;
if (os == NULL || offset == -1)
{
// An object can contain at most one section holding exception
// frame information.
gold_assert(this->discarded_eh_frame_shndx_ == -1U);
this->discarded_eh_frame_shndx_ = shndx;
this->section_offsets()[shndx] = invalid_address;
}
else
this->section_offsets()[shndx] = convert_types<Address, off_t>(offset);
 
// If this section requires special handling, and if there are
// relocs that aply to it, then we must do the special handling
// before we apply the relocs.
if (os != NULL && offset == -1 && reloc_shndx != 0)
this->set_relocs_must_follow_section_writes();
}
 
// Lay out the input sections. We walk through the sections and check
// whether they should be included in the link. If they should, we
// pass them to the Layout object, which will return an output section
1243,7 → 1295,7
{
if (this->handle_gnu_warning_section(name, i, symtab))
{
if (!relocatable)
if (!relocatable && !parameters->options().shared())
omit[i] = true;
}
 
1262,8 → 1314,7
// -fsplit-stack.
if (this->handle_split_stack_section(name))
{
if (!parameters->options().relocatable()
&& !parameters->options().shared())
if (!relocatable && !parameters->options().shared())
omit[i] = true;
}
 
1366,7 → 1417,12
out_sections[i] = reinterpret_cast<Output_section*>(1);
out_section_offsets[i] = invalid_address;
}
else
else if (should_defer_layout)
this->deferred_layout_.push_back(Deferred_layout(i, name,
pshdrs,
reloc_shndx[i],
reloc_type[i]));
else
eh_frame_sections.push_back(i);
continue;
}
1526,7 → 1582,6
p != eh_frame_sections.end();
++p)
{
gold_assert(this->has_eh_frame_);
gold_assert(external_symbols_offset != 0);
 
unsigned int i = *p;
1534,33 → 1589,15
pshdr = section_headers_data + i * This::shdr_size;
typename This::Shdr shdr(pshdr);
 
off_t offset;
Output_section* os = layout->layout_eh_frame(this,
symbols_data,
symbols_size,
symbol_names_data,
symbol_names_size,
i, shdr,
reloc_shndx[i],
reloc_type[i],
&offset);
out_sections[i] = os;
if (os == NULL || offset == -1)
{
// An object can contain at most one section holding exception
// frame information.
gold_assert(this->discarded_eh_frame_shndx_ == -1U);
this->discarded_eh_frame_shndx_ = i;
out_section_offsets[i] = invalid_address;
}
else
out_section_offsets[i] = convert_types<Address, off_t>(offset);
 
// If this section requires special handling, and if there are
// relocs that apply to it, then we must do the special handling
// before we apply the relocs.
if (os != NULL && offset == -1 && reloc_shndx[i] != 0)
this->set_relocs_must_follow_section_writes();
this->layout_eh_frame_section(layout,
symbols_data,
symbols_size,
symbol_names_data,
symbol_names_size,
i,
shdr,
reloc_shndx[i],
reloc_type[i]);
}
 
if (is_gc_pass_two)
1599,8 → 1636,27
if (!this->is_section_included(deferred->shndx_))
continue;
 
this->layout_section(layout, deferred->shndx_, deferred->name_.c_str(),
shdr, deferred->reloc_shndx_, deferred->reloc_type_);
if (parameters->options().relocatable()
|| deferred->name_ != ".eh_frame"
|| !this->check_eh_frame_flags(&shdr))
this->layout_section(layout, deferred->shndx_, deferred->name_.c_str(),
shdr, deferred->reloc_shndx_,
deferred->reloc_type_);
else
{
// Reading the symbols again here may be slow.
Read_symbols_data sd;
this->read_symbols(&sd);
this->layout_eh_frame_section(layout,
sd.symbols->data(),
sd.symbols_size,
sd.symbol_names->data(),
sd.symbol_names_size,
deferred->shndx_,
shdr,
deferred->reloc_shndx_,
deferred->reloc_type_);
}
}
 
this->deferred_layout_.clear();
/trunk/gnu/binutils/gold/layout.h
1,6 → 1,6
// layout.h -- lay out output file sections for gold -*- C++ -*-
 
// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
71,34 → 71,60
class Free_list
{
public:
struct Free_list_node
{
Free_list_node(off_t start, off_t end)
: start_(start), end_(end)
{ }
off_t start_;
off_t end_;
};
typedef std::list<Free_list_node>::const_iterator Const_iterator;
 
Free_list()
: list_(), last_remove_(list_.begin()), extend_(false), length_(0)
: list_(), last_remove_(list_.begin()), extend_(false), length_(0),
min_hole_(0)
{ }
 
// Initialize the free list for a section of length LEN.
// If EXTEND is true, free space may be allocated past the end.
void
init(off_t len, bool extend);
 
// Set the minimum hole size that is allowed when allocating
// from the free list.
void
set_min_hole_size(off_t min_hole)
{ this->min_hole_ = min_hole; }
 
// Remove a chunk from the free list.
void
remove(off_t start, off_t end);
 
// Allocate a chunk of space from the free list of length LEN,
// with alignment ALIGN, and minimum offset MINOFF.
off_t
allocate(off_t len, uint64_t align, off_t minoff);
 
// Return an iterator for the beginning of the free list.
Const_iterator
begin() const
{ return this->list_.begin(); }
 
// Return an iterator for the end of the free list.
Const_iterator
end() const
{ return this->list_.end(); }
 
// Dump the free list (for debugging).
void
dump();
 
// Print usage statistics.
static void
print_stats();
 
private:
struct Free_list_node
{
Free_list_node(off_t start, off_t end)
: start_(start), end_(end)
{ }
off_t start_;
off_t end_;
};
typedef std::list<Free_list_node>::iterator Iterator;
 
// The free list.
113,6 → 139,10
// The total length of the section, segment, or file.
off_t length_;
 
// The minimum hole size allowed. When allocating from the free list,
// we must not leave a hole smaller than this.
off_t min_hole_;
 
// Statistics:
// The total number of free lists used.
static unsigned int num_lists;
492,6 → 522,14
const char* name, const elfcpp::Shdr<size, big_endian>& shdr,
unsigned int reloc_shndx, unsigned int reloc_type, off_t* offset);
 
bool
is_section_ordering_specified()
{ return this->section_ordering_specified_; }
 
void
set_section_ordering_specified()
{ this->section_ordering_specified_ = true; }
 
// For incremental updates, allocate a block of memory from the
// free list. Find a block starting at or after MINOFF.
off_t
501,6 → 539,8
unsigned int
find_section_order_index(const std::string&);
 
// Read the sequence of input sections from the file specified with
// linker option --section-ordering-file.
void
read_layout_from_file();
 
549,6 → 589,14
unsigned int reloc_shndx, unsigned int reloc_type,
off_t* offset);
 
// Add .eh_frame information for a PLT. The FDE must start with a
// 4-byte PC-relative reference to the start of the PLT, followed by
// a 4-byte size of PLT.
void
add_eh_frame_for_plt(Output_data* plt, const unsigned char* cie_data,
size_t cie_length, const unsigned char* fde_data,
size_t fde_length);
 
// Handle a GNU stack note. This is called once per input object
// file. SEEN_GNU_STACK is true if the object file has a
// .note.GNU-stack section. GNU_STACK_FLAGS is the section flags
609,6 → 657,12
dynpool() const
{ return &this->dynpool_; }
 
// Return the .dynamic output section. This is only valid after the
// layout has been finalized.
Output_section*
dynamic_section() const
{ return this->dynamic_section_; }
 
// Return the symtab_xindex section used to hold large section
// indexes for the normal symbol table.
Output_symtab_xindex*
645,6 → 699,18
|| strncmp(name, ".stab", sizeof(".stab") - 1) == 0);
}
 
// Return true if RELOBJ is an input file whose base name matches
// FILE_NAME. The base name must have an extension of ".o", and
// must be exactly FILE_NAME.o or FILE_NAME, one character, ".o".
static bool
match_file_name(const Relobj* relobj, const char* file_name);
 
// Return whether section SHNDX in RELOBJ is a .ctors/.dtors section
// with more than one word being mapped to a .init_array/.fini_array
// section.
bool
is_ctors_in_init_array(Relobj* relobj, unsigned int shndx) const;
 
// Check if a comdat group or .gnu.linkonce section with the given
// NAME is selected for the link. If there is already a section,
// *KEPT_SECTION is set to point to the signature and the function
689,6 → 755,10
off_t
symtab_section_offset() const;
 
// Return the section index of the normal symbol tabl.e
unsigned int
symtab_section_shndx() const;
 
// Return the dynamic symbol table.
Output_section*
dynsym_section() const
965,7 → 1035,7
// name. Set *PLEN to the length of the name. *PLEN must be
// initialized to the length of NAME.
static const char*
output_section_name(const char* name, size_t* plen);
output_section_name(const Relobj*, const char* name, size_t* plen);
 
// Return the number of allocated output sections.
size_t
1002,6 → 1072,10
void
attach_allocated_section_to_segment(Output_section*);
 
// Make the .eh_frame section.
Output_section*
make_eh_frame_section(const Relobj*);
 
// Set the final file offsets of all the segments.
off_t
set_segment_offsets(const Target*, Output_segment*, unsigned int* pshndx);
1040,7 → 1114,7
place_orphan_sections_in_script();
 
// Return whether SEG1 comes before SEG2 in the output file.
static bool
bool
segment_precedes(const Output_segment* seg1, const Output_segment* seg2);
 
// Use to save and restore segments during relaxation.
1090,11 → 1164,19
 
// A comparison class for segments.
 
struct Compare_segments
class Compare_segments
{
public:
Compare_segments(Layout* layout)
: layout_(layout)
{ }
 
bool
operator()(const Output_segment* seg1, const Output_segment* seg2)
{ return Layout::segment_precedes(seg1, seg2); }
{ return this->layout_->segment_precedes(seg1, seg2); }
 
private:
Layout* layout_;
};
 
typedef std::vector<Output_section_data*> Output_section_data_list;
1168,6 → 1250,8
Output_segment* tls_segment_;
// A pointer to the PT_GNU_RELRO segment if there is one.
Output_segment* relro_segment_;
// A pointer to the PT_INTERP segment if there is one.
Output_segment* interp_segment_;
// A backend may increase the size of the PT_GNU_RELRO segment if
// there is one. This is the amount to increase it by.
unsigned int increase_relro_;
1224,6 → 1308,9
bool resized_signatures_;
// Whether we have created a .stab*str output section.
bool have_stabstr_section_;
// True if the input sections in the output sections should be sorted
// as specified in a section ordering file.
bool section_ordering_specified_;
// In incremental build, holds information check the inputs and build the
// .gnu_incremental_inputs section.
Incremental_inputs* incremental_inputs_;
/trunk/gnu/binutils/gold/target.h
1,6 → 1,6
// target.h -- target support for gold -*- C++ -*-
 
// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
70,34 → 70,6
virtual ~Target()
{ }
 
// Virtual function which is set to return true by a target if
// it can use relocation types to determine if a function's
// pointer is taken.
virtual bool
can_check_for_function_pointers() const
{ return false; }
 
// This function is used in ICF (icf.cc). This is set to true by
// the target if a relocation to a merged section can be processed
// to retrieve the contents of the merged section.
virtual bool
can_icf_inline_merge_sections () const
{ return false; }
 
// Whether a section called SECTION_NAME may have function pointers to
// sections not eligible for safe ICF folding.
virtual bool
section_may_have_icf_unsafe_pointers(const char* section_name) const
{
// We recognize sections for normal vtables, construction vtables and
// EH frames.
return (!is_prefix_of(".rodata._ZTV", section_name)
&& !is_prefix_of(".data.rel.ro._ZTV", section_name)
&& !is_prefix_of(".rodata._ZTC", section_name)
&& !is_prefix_of(".data.rel.ro._ZTC", section_name)
&& !is_prefix_of(".eh_frame", section_name));
}
 
// Return the bit size that this target implements. This should
// return 32 or 64.
int
274,18 → 246,47
reloc_addend(void* arg, unsigned int type, uint64_t addend) const
{ return this->do_reloc_addend(arg, type, addend); }
 
// Return the PLT section to use for a global symbol. This is used
// for STT_GNU_IFUNC symbols.
Output_data*
plt_section_for_global(const Symbol* sym) const
{ return this->do_plt_section_for_global(sym); }
// Return the PLT address to use for a global symbol. This is used
// for STT_GNU_IFUNC symbols. The symbol's plt_offset is relative
// to this PLT address.
uint64_t
plt_address_for_global(const Symbol* sym) const
{ return this->do_plt_address_for_global(sym); }
 
// Return the PLT section to use for a local symbol. This is used
// for STT_GNU_IFUNC symbols.
Output_data*
plt_section_for_local(const Relobj* object, unsigned int symndx) const
{ return this->do_plt_section_for_local(object, symndx); }
// Return the PLT address to use for a local symbol. This is used
// for STT_GNU_IFUNC symbols. The symbol's plt_offset is relative
// to this PLT address.
uint64_t
plt_address_for_local(const Relobj* object, unsigned int symndx) const
{ return this->do_plt_address_for_local(object, symndx); }
 
// Return whether this target can use relocation types to determine
// if a function's address is taken.
bool
can_check_for_function_pointers() const
{ return this->do_can_check_for_function_pointers(); }
 
// Return whether a relocation to a merged section can be processed
// to retrieve the contents.
bool
can_icf_inline_merge_sections () const
{ return this->pti_->can_icf_inline_merge_sections; }
 
// Whether a section called SECTION_NAME may have function pointers to
// sections not eligible for safe ICF folding.
virtual bool
section_may_have_icf_unsafe_pointers(const char* section_name) const
{ return this->do_section_may_have_icf_unsafe_pointers(section_name); }
 
// Return the base to use for the PC value in an FDE when it is
// encoded using DW_EH_PE_datarel. This does not appear to be
// documented anywhere, but it is target specific. Any use of
// DW_EH_PE_datarel in gcc requires defining a special macro
// (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX) to output the value.
uint64_t
ehframe_datarel_base() const
{ return this->do_ehframe_datarel_base(); }
 
// Return true if a reference to SYM from a reloc of type R_TYPE
// means that the current function may call an object compiled
// without -fsplit-stack. SYM is known to be defined in an object
385,6 → 386,17
select_as_default_target()
{ this->do_select_as_default_target(); }
 
// Return the value to store in the EI_OSABI field in the ELF
// header.
elfcpp::ELFOSABI
osabi() const
{ return this->osabi_; }
 
// Set the value to store in the EI_OSABI field in the ELF header.
void
set_osabi(elfcpp::ELFOSABI osabi)
{ this->osabi_ = osabi; }
 
protected:
// This struct holds the constant information for a child class. We
// use a struct to avoid the overhead of virtual function calls for
406,6 → 418,9
// Whether an object file with no .note.GNU-stack sections implies
// that the stack should be executable.
bool is_default_stack_executable;
// Whether a relocation to a merged section can be processed to
// retrieve the contents.
bool can_icf_inline_merge_sections;
// Prefix character to strip when checking for wrapping.
char wrap_char;
// The default dynamic linker name.
434,7 → 449,7
 
Target(const Target_info* pti)
: pti_(pti), processor_specific_flags_(0),
are_processor_specific_flags_set_(false)
are_processor_specific_flags_set_(false), osabi_(elfcpp::ELFOSABI_NONE)
{ }
 
// Virtual function which may be implemented by the child class.
466,10 → 481,10
// 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.
// By default, we set the EI_OSABI field if requested (in
// Sized_target).
virtual void
do_adjust_elf_header(unsigned char*, int) const
{ }
do_adjust_elf_header(unsigned char*, int) const = 0;
 
// Virtual function which may be overridden by the child class.
virtual bool
489,14 → 504,38
 
// Virtual functions that must be overridden by a target that uses
// STT_GNU_IFUNC symbols.
virtual Output_data*
do_plt_section_for_global(const Symbol*) const
virtual uint64_t
do_plt_address_for_global(const Symbol*) const
{ gold_unreachable(); }
 
virtual Output_data*
do_plt_section_for_local(const Relobj*, unsigned int) const
virtual uint64_t
do_plt_address_for_local(const Relobj*, unsigned int) const
{ gold_unreachable(); }
 
// Virtual function which may be overriden by the child class.
virtual bool
do_can_check_for_function_pointers() const
{ return false; }
 
// Virtual function which may be overridden by the child class. We
// recognize some default sections for which we don't care whether
// they have function pointers.
virtual bool
do_section_may_have_icf_unsafe_pointers(const char* section_name) const
{
// We recognize sections for normal vtables, construction vtables and
// EH frames.
return (!is_prefix_of(".rodata._ZTV", section_name)
&& !is_prefix_of(".data.rel.ro._ZTV", section_name)
&& !is_prefix_of(".rodata._ZTC", section_name)
&& !is_prefix_of(".data.rel.ro._ZTC", section_name)
&& !is_prefix_of(".eh_frame", section_name));
}
 
virtual uint64_t
do_ehframe_datarel_base() const
{ gold_unreachable(); }
 
// Virtual function which may be overridden by the child class. The
// default implementation is that any function not defined by the
// ABI is a call to a non-split function.
609,6 → 648,10
elfcpp::Elf_Word processor_specific_flags_;
// Whether the processor-specific flags are set at least once.
bool are_processor_specific_flags_set_;
// If not ELFOSABI_NONE, the value to put in the EI_OSABI field of
// the ELF header. This is handled at this level because it is
// OS-specific rather than processor-specific.
elfcpp::ELFOSABI osabi_;
};
 
// The abstract class for a specific size and endianness of target.
829,7 → 872,8
// A target needs to implement this to support incremental linking.
 
virtual void
register_global_plt_entry(unsigned int /* plt_index */,
register_global_plt_entry(Symbol_table*, Layout*,
unsigned int /* plt_index */,
Symbol*)
{ gold_unreachable(); }
 
860,6 → 904,10
gold_assert(pti->size == size);
gold_assert(pti->is_big_endian ? big_endian : !big_endian);
}
 
// Set the EI_OSABI field if requested.
virtual void
do_adjust_elf_header(unsigned char*, int) const;
};
 
} // End namespace gold.
/trunk/gnu/binutils/gold/i386.cc
1,6 → 1,6
// i386.cc -- i386 target support for gold.
 
// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
25,6 → 25,7
#include <cstring>
 
#include "elfcpp.h"
#include "dwarf.h"
#include "parameters.h"
#include "reloc.h"
#include "i386.h"
52,15 → 53,16
public:
typedef Output_data_reloc<elfcpp::SHT_REL, true, 32, false> Reloc_section;
 
Output_data_plt_i386(Symbol_table*, Layout*, Output_data_space*);
Output_data_plt_i386(Layout*, Output_data_space*, Output_data_space*);
 
// Add an entry to the PLT.
void
add_entry(Symbol* gsym);
add_entry(Symbol_table*, Layout*, Symbol* gsym);
 
// Add an entry to the PLT for a local STT_GNU_IFUNC symbol.
unsigned int
add_local_ifunc_entry(Sized_relobj_file<32, false>* relobj,
add_local_ifunc_entry(Symbol_table*, Layout*,
Sized_relobj_file<32, false>* relobj,
unsigned int local_sym_index);
 
// Return the .rel.plt section data.
72,10 → 74,19
Reloc_section*
rel_tls_desc(Layout*);
 
// Return where the IRELATIVE relocations should go.
Reloc_section*
rel_irelative(Symbol_table*, Layout*);
 
// Return whether we created a section for IRELATIVE relocations.
bool
has_irelative_section() const
{ return this->irelative_rel_ != NULL; }
 
// Return the number of PLT entries.
unsigned int
entry_count() const
{ return this->count_; }
{ return this->count_ + this->irelative_count_; }
 
// Return the offset of the first non-reserved PLT entry.
static unsigned int
87,6 → 98,14
get_plt_entry_size()
{ return plt_entry_size; }
 
// Return the PLT address to use for a global symbol.
uint64_t
address_for_global(const Symbol*);
 
// Return the PLT address to use for a local symbol.
uint64_t
address_for_local(const Relobj*, unsigned int symndx);
 
protected:
void
do_adjust_output_section(Output_section* os);
101,21 → 120,30
static const int plt_entry_size = 16;
 
// The first entry in the PLT for an executable.
static unsigned char exec_first_plt_entry[plt_entry_size];
static const unsigned char exec_first_plt_entry[plt_entry_size];
 
// The first entry in the PLT for a shared object.
static unsigned char dyn_first_plt_entry[plt_entry_size];
static const unsigned char dyn_first_plt_entry[plt_entry_size];
 
// Other entries in the PLT for an executable.
static unsigned char exec_plt_entry[plt_entry_size];
static const unsigned char exec_plt_entry[plt_entry_size];
 
// Other entries in the PLT for a shared object.
static unsigned char dyn_plt_entry[plt_entry_size];
static const unsigned char dyn_plt_entry[plt_entry_size];
 
// The .eh_frame unwind information for the PLT.
static const int plt_eh_frame_cie_size = 16;
static const int plt_eh_frame_fde_size = 32;
static const unsigned char plt_eh_frame_cie[plt_eh_frame_cie_size];
static const unsigned char plt_eh_frame_fde[plt_eh_frame_fde_size];
 
// Set the final size.
void
set_final_data_size()
{ this->set_data_size((this->count_ + 1) * plt_entry_size); }
{
this->set_data_size((this->count_ + this->irelative_count_ + 1)
* plt_entry_size);
}
 
// Write out the PLT data.
void
138,15 → 166,26
unsigned int got_offset;
};
 
// A pointer to the Layout class, so that we can find the .dynamic
// section when we write out the GOT PLT section.
Layout* layout_;
// The reloc section.
Reloc_section* rel_;
// The TLS_DESC relocations, if necessary. These must follow the
// regular PLT relocs.
Reloc_section* tls_desc_rel_;
// The IRELATIVE relocations, if necessary. These must follow the
// regular relocatoins and the TLS_DESC relocations.
Reloc_section* irelative_rel_;
// The .got.plt section.
Output_data_space* got_plt_;
// The part of the .got.plt section used for IRELATIVE relocs.
Output_data_space* got_irelative_;
// The number of PLT entries.
unsigned int count_;
// Number of PLT entries with R_386_IRELATIVE relocs. These follow
// the regular PLT entries.
unsigned int irelative_count_;
// Global STT_GNU_IFUNC symbols.
std::vector<Global_ifunc> global_ifuncs_;
// Local STT_GNU_IFUNC symbols.
158,27 → 197,19
// http://people.redhat.com/drepper/tls.pdf
// http://www.lsd.ic.unicamp.br/~oliva/writeups/TLS/RFC-TLSDESC-x86.txt
 
class Target_i386 : public Target_freebsd<32, false>
class Target_i386 : public Sized_target<32, false>
{
public:
typedef Output_data_reloc<elfcpp::SHT_REL, true, 32, false> Reloc_section;
 
Target_i386()
: Target_freebsd<32, false>(&i386_info),
got_(NULL), plt_(NULL), got_plt_(NULL), got_tlsdesc_(NULL),
global_offset_table_(NULL), rel_dyn_(NULL),
copy_relocs_(elfcpp::R_386_COPY), dynbss_(NULL),
: Sized_target<32, false>(&i386_info),
got_(NULL), plt_(NULL), got_plt_(NULL), got_irelative_(NULL),
got_tlsdesc_(NULL), global_offset_table_(NULL), rel_dyn_(NULL),
rel_irelative_(NULL), copy_relocs_(elfcpp::R_386_COPY), dynbss_(NULL),
got_mod_index_offset_(-1U), tls_base_symbol_defined_(false)
{ }
 
inline bool
can_check_for_function_pointers() const
{ return true; }
 
virtual bool
can_icf_inline_merge_sections () const
{ return true; }
 
// Process the relocations to determine unreferenced sections for
// garbage collection.
void
282,15 → 313,24
return Target::do_is_local_label_name(name);
}
 
// Return the PLT section.
Output_data*
do_plt_section_for_global(const Symbol*) const
{ return this->plt_section(); }
// Return the PLT address to use for a global symbol.
uint64_t
do_plt_address_for_global(const Symbol* gsym) const
{ return this->plt_section()->address_for_global(gsym); }
 
Output_data*
do_plt_section_for_local(const Relobj*, unsigned int) const
{ return this->plt_section(); }
uint64_t
do_plt_address_for_local(const Relobj* relobj, unsigned int symndx) const
{ return this->plt_section()->address_for_local(relobj, symndx); }
 
// We can tell whether we take the address of a function.
inline bool
do_can_check_for_function_pointers() const
{ return true; }
 
// Return the base for a DW_EH_PE_datarel encoding.
uint64_t
do_ehframe_datarel_base() const;
 
// Return whether SYM is call to a non-split function.
bool
do_is_call_to_non_split(const Symbol* sym, unsigned int) const;
581,6 → 621,10
Reloc_section*
rel_tls_desc_section(Layout*) const;
 
// Get the section to use for IRELATIVE relocations.
Reloc_section*
rel_irelative_section(Layout*);
 
// Add a potential copy relocation.
void
copy_reloc(Symbol_table* symtab, Layout* layout,
617,6 → 661,8
Output_data_plt_i386* plt_;
// The GOT PLT section.
Output_data_space* got_plt_;
// The GOT section for IRELATIVE relocations.
Output_data_space* got_irelative_;
// The GOT section for TLSDESC relocations.
Output_data_got<32, false>* got_tlsdesc_;
// The _GLOBAL_OFFSET_TABLE_ symbol.
623,6 → 669,8
Symbol* global_offset_table_;
// The dynamic reloc section.
Reloc_section* rel_dyn_;
// The section to use for IRELATIVE relocs.
Reloc_section* rel_irelative_;
// Relocs saved to avoid a COPY reloc.
Copy_relocs<elfcpp::SHT_REL, 32, false> copy_relocs_;
// Space for variables copied with a COPY reloc.
642,6 → 690,7
false, // has_resolve
true, // has_code_fill
true, // is_default_stack_executable
true, // can_icf_inline_merge_sections
'\0', // wrap_char
"/usr/lib/libc.so.1", // dynamic_linker
0x08048000, // default_text_segment_address
666,23 → 715,37
 
this->got_ = new Output_data_got<32, false>();
 
// When using -z now, we can treat .got.plt as a relro section.
// Without -z now, it is modified after program startup by lazy
// PLT relocations.
bool is_got_plt_relro = parameters->options().now();
Output_section_order got_order = (is_got_plt_relro
? ORDER_RELRO
: ORDER_RELRO_LAST);
Output_section_order got_plt_order = (is_got_plt_relro
? ORDER_RELRO
: ORDER_NON_RELRO_FIRST);
 
layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS,
(elfcpp::SHF_ALLOC
| elfcpp::SHF_WRITE),
this->got_, ORDER_RELRO_LAST, true);
this->got_, got_order, true);
 
this->got_plt_ = new Output_data_space(4, "** GOT PLT");
layout->add_output_section_data(".got.plt", elfcpp::SHT_PROGBITS,
(elfcpp::SHF_ALLOC
| elfcpp::SHF_WRITE),
this->got_plt_, ORDER_NON_RELRO_FIRST,
false);
this->got_plt_, got_plt_order,
is_got_plt_relro);
 
// The first three entries are reserved.
this->got_plt_->set_current_data_size(3 * 4);
 
// Those bytes can go into the relro segment.
layout->increase_relro(3 * 4);
if (!is_got_plt_relro)
{
// Those bytes can go into the relro segment.
layout->increase_relro(3 * 4);
}
 
// Define _GLOBAL_OFFSET_TABLE_ at the start of the PLT.
this->global_offset_table_ =
694,6 → 757,15
elfcpp::STV_HIDDEN, 0,
false, false);
 
// If there are any IRELATIVE relocations, they get GOT entries
// in .got.plt after the jump slot relocations.
this->got_irelative_ = new Output_data_space(4, "** GOT IRELATIVE PLT");
layout->add_output_section_data(".got.plt", elfcpp::SHT_PROGBITS,
(elfcpp::SHF_ALLOC
| elfcpp::SHF_WRITE),
this->got_irelative_,
got_plt_order, is_got_plt_relro);
 
// If there are any TLSDESC relocations, they get GOT entries in
// .got.plt after the jump slot entries.
this->got_tlsdesc_ = new Output_data_got<32, false>();
701,7 → 773,7
(elfcpp::SHF_ALLOC
| elfcpp::SHF_WRITE),
this->got_tlsdesc_,
ORDER_NON_RELRO_FIRST, false);
got_plt_order, is_got_plt_relro);
}
 
return this->got_;
723,15 → 795,39
return this->rel_dyn_;
}
 
// Get the section to use for IRELATIVE relocs, creating it if
// necessary. These go in .rel.dyn, but only after all other dynamic
// relocations. They need to follow the other dynamic relocations so
// that they can refer to global variables initialized by those
// relocs.
 
Target_i386::Reloc_section*
Target_i386::rel_irelative_section(Layout* layout)
{
if (this->rel_irelative_ == NULL)
{
// Make sure we have already create the dynamic reloc section.
this->rel_dyn_section(layout);
this->rel_irelative_ = new Reloc_section(false);
layout->add_output_section_data(".rel.dyn", elfcpp::SHT_REL,
elfcpp::SHF_ALLOC, this->rel_irelative_,
ORDER_DYNAMIC_RELOCS, false);
gold_assert(this->rel_dyn_->output_section()
== this->rel_irelative_->output_section());
}
return this->rel_irelative_;
}
 
// Create the PLT section. The ordinary .got section is an argument,
// since we need to refer to the start. We also create our own .got
// section just for PLT entries.
 
Output_data_plt_i386::Output_data_plt_i386(Symbol_table* symtab,
Layout* layout,
Output_data_space* got_plt)
: Output_section_data(4), tls_desc_rel_(NULL), got_plt_(got_plt), count_(0),
global_ifuncs_(), local_ifuncs_()
Output_data_plt_i386::Output_data_plt_i386(Layout* layout,
Output_data_space* got_plt,
Output_data_space* got_irelative)
: Output_section_data(16), layout_(layout), tls_desc_rel_(NULL),
irelative_rel_(NULL), got_plt_(got_plt), got_irelative_(got_irelative),
count_(0), irelative_count_(0), global_ifuncs_(), local_ifuncs_()
{
this->rel_ = new Reloc_section(false);
layout->add_output_section_data(".rel.plt", elfcpp::SHT_REL,
738,23 → 834,10
elfcpp::SHF_ALLOC, this->rel_,
ORDER_DYNAMIC_PLT_RELOCS, false);
 
if (parameters->doing_static_link())
{
// A statically linked executable will only have a .rel.plt
// section to hold R_386_IRELATIVE relocs for STT_GNU_IFUNC
// symbols. The library will use these symbols to locate the
// IRELATIVE relocs at program startup time.
symtab->define_in_output_data("__rel_iplt_start", NULL,
Symbol_table::PREDEFINED,
this->rel_, 0, 0, elfcpp::STT_NOTYPE,
elfcpp::STB_GLOBAL, elfcpp::STV_HIDDEN,
0, false, true);
symtab->define_in_output_data("__rel_iplt_end", NULL,
Symbol_table::PREDEFINED,
this->rel_, 0, 0, elfcpp::STT_NOTYPE,
elfcpp::STB_GLOBAL, elfcpp::STV_HIDDEN,
0, true, true);
}
// Add unwind information if requested.
if (parameters->options().ld_generated_unwind_info())
layout->add_eh_frame_for_plt(this, plt_eh_frame_cie, plt_eh_frame_cie_size,
plt_eh_frame_fde, plt_eh_frame_fde_size);
}
 
void
768,29 → 851,23
// Add an entry to the PLT.
 
void
Output_data_plt_i386::add_entry(Symbol* gsym)
Output_data_plt_i386::add_entry(Symbol_table* symtab, Layout* layout,
Symbol* gsym)
{
gold_assert(!gsym->has_plt_offset());
 
// Note that when setting the PLT offset we skip the initial
// reserved PLT entry.
gsym->set_plt_offset((this->count_ + 1) * plt_entry_size);
 
++this->count_;
 
section_offset_type got_offset = this->got_plt_->current_data_size();
 
// Every PLT entry needs a GOT entry which points back to the PLT
// entry (this will be changed by the dynamic linker, normally
// lazily when the function is called).
this->got_plt_->set_current_data_size(got_offset + 4);
 
// Every PLT entry needs a reloc.
if (gsym->type() == elfcpp::STT_GNU_IFUNC
&& gsym->can_use_relative_reloc(false))
{
this->rel_->add_symbolless_global_addend(gsym, elfcpp::R_386_IRELATIVE,
this->got_plt_, got_offset);
gsym->set_plt_offset(this->irelative_count_ * plt_entry_size);
++this->irelative_count_;
section_offset_type got_offset =
this->got_irelative_->current_data_size();
this->got_irelative_->set_current_data_size(got_offset + 4);
Reloc_section* rel = this->rel_irelative(symtab, layout);
rel->add_symbolless_global_addend(gsym, elfcpp::R_386_IRELATIVE,
this->got_irelative_, got_offset);
struct Global_ifunc gi;
gi.sym = gsym;
gi.got_offset = got_offset;
798,6 → 875,19
}
else
{
// When setting the PLT offset we skip the initial reserved PLT
// entry.
gsym->set_plt_offset((this->count_ + 1) * plt_entry_size);
 
++this->count_;
 
section_offset_type got_offset = this->got_plt_->current_data_size();
 
// Every PLT entry needs a GOT entry which points back to the
// PLT entry (this will be changed by the dynamic linker,
// normally lazily when the function is called).
this->got_plt_->set_current_data_size(got_offset + 4);
 
gsym->set_needs_dynsym_entry();
this->rel_->add_global(gsym, elfcpp::R_386_JUMP_SLOT, this->got_plt_,
got_offset);
813,22 → 903,25
 
unsigned int
Output_data_plt_i386::add_local_ifunc_entry(
Symbol_table* symtab,
Layout* layout,
Sized_relobj_file<32, false>* relobj,
unsigned int local_sym_index)
{
unsigned int plt_offset = (this->count_ + 1) * plt_entry_size;
++this->count_;
unsigned int plt_offset = this->irelative_count_ * plt_entry_size;
++this->irelative_count_;
 
section_offset_type got_offset = this->got_plt_->current_data_size();
section_offset_type got_offset = this->got_irelative_->current_data_size();
 
// Every PLT entry needs a GOT entry which points back to the PLT
// entry.
this->got_plt_->set_current_data_size(got_offset + 4);
this->got_irelative_->set_current_data_size(got_offset + 4);
 
// Every PLT entry needs a reloc.
this->rel_->add_symbolless_local_addend(relobj, local_sym_index,
elfcpp::R_386_IRELATIVE,
this->got_plt_, got_offset);
Reloc_section* rel = this->rel_irelative(symtab, layout);
rel->add_symbolless_local_addend(relobj, local_sym_index,
elfcpp::R_386_IRELATIVE,
this->got_irelative_, got_offset);
 
struct Local_ifunc li;
li.object = relobj;
851,15 → 944,75
layout->add_output_section_data(".rel.plt", elfcpp::SHT_REL,
elfcpp::SHF_ALLOC, this->tls_desc_rel_,
ORDER_DYNAMIC_PLT_RELOCS, false);
gold_assert(this->tls_desc_rel_->output_section() ==
this->rel_->output_section());
gold_assert(this->tls_desc_rel_->output_section()
== this->rel_->output_section());
}
return this->tls_desc_rel_;
}
 
// Return where the IRELATIVE relocations should go in the PLT. These
// follow the JUMP_SLOT and TLS_DESC relocations.
 
Output_data_plt_i386::Reloc_section*
Output_data_plt_i386::rel_irelative(Symbol_table* symtab, Layout* layout)
{
if (this->irelative_rel_ == NULL)
{
// Make sure we have a place for the TLS_DESC relocations, in
// case we see any later on.
this->rel_tls_desc(layout);
this->irelative_rel_ = new Reloc_section(false);
layout->add_output_section_data(".rel.plt", elfcpp::SHT_REL,
elfcpp::SHF_ALLOC, this->irelative_rel_,
ORDER_DYNAMIC_PLT_RELOCS, false);
gold_assert(this->irelative_rel_->output_section()
== this->rel_->output_section());
 
if (parameters->doing_static_link())
{
// A statically linked executable will only have a .rel.plt
// section to hold R_386_IRELATIVE relocs for STT_GNU_IFUNC
// symbols. The library will use these symbols to locate
// the IRELATIVE relocs at program startup time.
symtab->define_in_output_data("__rel_iplt_start", NULL,
Symbol_table::PREDEFINED,
this->irelative_rel_, 0, 0,
elfcpp::STT_NOTYPE, elfcpp::STB_GLOBAL,
elfcpp::STV_HIDDEN, 0, false, true);
symtab->define_in_output_data("__rel_iplt_end", NULL,
Symbol_table::PREDEFINED,
this->irelative_rel_, 0, 0,
elfcpp::STT_NOTYPE, elfcpp::STB_GLOBAL,
elfcpp::STV_HIDDEN, 0, true, true);
}
}
return this->irelative_rel_;
}
 
// Return the PLT address to use for a global symbol.
 
uint64_t
Output_data_plt_i386::address_for_global(const Symbol* gsym)
{
uint64_t offset = 0;
if (gsym->type() == elfcpp::STT_GNU_IFUNC
&& gsym->can_use_relative_reloc(false))
offset = (this->count_ + 1) * plt_entry_size;
return this->address() + offset;
}
 
// Return the PLT address to use for a local symbol. These are always
// IRELATIVE relocs.
 
uint64_t
Output_data_plt_i386::address_for_local(const Relobj*, unsigned int)
{
return this->address() + (this->count_ + 1) * plt_entry_size;
}
 
// The first entry in the PLT for an executable.
 
unsigned char Output_data_plt_i386::exec_first_plt_entry[plt_entry_size] =
const unsigned char Output_data_plt_i386::exec_first_plt_entry[plt_entry_size] =
{
0xff, 0x35, // pushl contents of memory address
0, 0, 0, 0, // replaced with address of .got + 4
870,7 → 1023,7
 
// The first entry in the PLT for a shared object.
 
unsigned char Output_data_plt_i386::dyn_first_plt_entry[plt_entry_size] =
const unsigned char Output_data_plt_i386::dyn_first_plt_entry[plt_entry_size] =
{
0xff, 0xb3, 4, 0, 0, 0, // pushl 4(%ebx)
0xff, 0xa3, 8, 0, 0, 0, // jmp *8(%ebx)
879,7 → 1032,7
 
// Subsequent entries in the PLT for an executable.
 
unsigned char Output_data_plt_i386::exec_plt_entry[plt_entry_size] =
const unsigned char Output_data_plt_i386::exec_plt_entry[plt_entry_size] =
{
0xff, 0x25, // jmp indirect
0, 0, 0, 0, // replaced with address of symbol in .got
891,7 → 1044,7
 
// Subsequent entries in the PLT for a shared object.
 
unsigned char Output_data_plt_i386::dyn_plt_entry[plt_entry_size] =
const unsigned char Output_data_plt_i386::dyn_plt_entry[plt_entry_size] =
{
0xff, 0xa3, // jmp *offset(%ebx)
0, 0, 0, 0, // replaced with offset of symbol in .got
901,6 → 1054,54
0, 0, 0, 0 // replaced with offset to start of .plt
};
 
// The .eh_frame unwind information for the PLT.
 
const unsigned char
Output_data_plt_i386::plt_eh_frame_cie[plt_eh_frame_cie_size] =
{
1, // CIE version.
'z', // Augmentation: augmentation size included.
'R', // Augmentation: FDE encoding included.
'\0', // End of augmentation string.
1, // Code alignment factor.
0x7c, // Data alignment factor.
8, // Return address column.
1, // Augmentation size.
(elfcpp::DW_EH_PE_pcrel // FDE encoding.
| elfcpp::DW_EH_PE_sdata4),
elfcpp::DW_CFA_def_cfa, 4, 4, // DW_CFA_def_cfa: r4 (esp) ofs 4.
elfcpp::DW_CFA_offset + 8, 1, // DW_CFA_offset: r8 (eip) at cfa-4.
elfcpp::DW_CFA_nop, // Align to 16 bytes.
elfcpp::DW_CFA_nop
};
 
const unsigned char
Output_data_plt_i386::plt_eh_frame_fde[plt_eh_frame_fde_size] =
{
0, 0, 0, 0, // Replaced with offset to .plt.
0, 0, 0, 0, // Replaced with size of .plt.
0, // Augmentation size.
elfcpp::DW_CFA_def_cfa_offset, 8, // DW_CFA_def_cfa_offset: 8.
elfcpp::DW_CFA_advance_loc + 6, // Advance 6 to __PLT__ + 6.
elfcpp::DW_CFA_def_cfa_offset, 12, // DW_CFA_def_cfa_offset: 12.
elfcpp::DW_CFA_advance_loc + 10, // Advance 10 to __PLT__ + 16.
elfcpp::DW_CFA_def_cfa_expression, // DW_CFA_def_cfa_expression.
11, // Block length.
elfcpp::DW_OP_breg4, 4, // Push %esp + 4.
elfcpp::DW_OP_breg8, 0, // Push %eip.
elfcpp::DW_OP_lit15, // Push 0xf.
elfcpp::DW_OP_and, // & (%eip & 0xf).
elfcpp::DW_OP_lit11, // Push 0xb.
elfcpp::DW_OP_ge, // >= ((%eip & 0xf) >= 0xb)
elfcpp::DW_OP_lit2, // Push 2.
elfcpp::DW_OP_shl, // << (((%eip & 0xf) >= 0xb) << 2)
elfcpp::DW_OP_plus, // + ((((%eip&0xf)>=0xb)<<2)+%esp+4
elfcpp::DW_CFA_nop, // Align to 32 bytes.
elfcpp::DW_CFA_nop,
elfcpp::DW_CFA_nop,
elfcpp::DW_CFA_nop
};
 
// Write out the PLT. This uses the hand-coded instructions above,
// and adjusts them as needed. This is all specified by the i386 ELF
// Processor Supplement.
914,8 → 1115,12
unsigned char* const oview = of->get_output_view(offset, oview_size);
 
const off_t got_file_offset = this->got_plt_->offset();
gold_assert(parameters->incremental_update()
|| (got_file_offset + this->got_plt_->data_size()
== this->got_irelative_->offset()));
const section_size_type got_size =
convert_to_section_size_type(this->got_plt_->data_size());
convert_to_section_size_type(this->got_plt_->data_size()
+ this->got_irelative_->data_size());
unsigned char* const got_view = of->get_output_view(got_file_offset,
got_size);
 
936,8 → 1141,16
 
unsigned char* got_pov = got_view;
 
memset(got_pov, 0, 12);
got_pov += 12;
// The first entry in the GOT is the address of the .dynamic section
// aka the PT_DYNAMIC segment. The next two entries are reserved.
// We saved space for them when we created the section in
// Target_i386::got_section.
Output_section* dynamic = this->layout_->dynamic_section();
uint32_t dynamic_addr = dynamic == NULL ? 0 : dynamic->address();
elfcpp::Swap<32, false>::writeval(got_pov, dynamic_addr);
got_pov += 4;
memset(got_pov, 0, 8);
got_pov += 8;
 
const int rel_size = elfcpp::Elf_sizes<32>::rel_size;
 
944,7 → 1157,7
unsigned int plt_offset = plt_entry_size;
unsigned int plt_rel_offset = 0;
unsigned int got_offset = 12;
const unsigned int count = this->count_;
const unsigned int count = this->count_ + this->irelative_count_;
for (unsigned int i = 0;
i < count;
++i,
981,6 → 1194,7
// the GOT to point to the actual symbol value, rather than point to
// the PLT entry. That will let the dynamic linker call the right
// function when resolving IRELATIVE relocations.
unsigned char* got_irelative_view = got_view + this->got_plt_->data_size();
for (std::vector<Global_ifunc>::const_iterator p =
this->global_ifuncs_.begin();
p != this->global_ifuncs_.end();
988,7 → 1202,7
{
const Sized_symbol<32>* ssym =
static_cast<const Sized_symbol<32>*>(p->sym);
elfcpp::Swap<32, false>::writeval(got_view + p->got_offset,
elfcpp::Swap<32, false>::writeval(got_irelative_view + p->got_offset,
ssym->value());
}
 
999,7 → 1213,7
{
const Symbol_value<32>* psymval =
p->object->local_symbol(p->local_sym_index);
elfcpp::Swap<32, false>::writeval(got_view + p->got_offset,
elfcpp::Swap<32, false>::writeval(got_irelative_view + p->got_offset,
psymval->value(p->object, 0));
}
 
1020,7 → 1234,8
// Create the GOT sections first.
this->got_section(symtab, layout);
 
this->plt_ = new Output_data_plt_i386(symtab, layout, this->got_plt_);
this->plt_ = new Output_data_plt_i386(layout, this->got_plt_,
this->got_irelative_);
layout->add_output_section_data(".plt", elfcpp::SHT_PROGBITS,
(elfcpp::SHF_ALLOC
| elfcpp::SHF_EXECINSTR),
1041,7 → 1256,7
return;
if (this->plt_ == NULL)
this->make_plt_section(symtab, layout);
this->plt_->add_entry(gsym);
this->plt_->add_entry(symtab, layout, gsym);
}
 
// Make a PLT entry for a local STT_GNU_IFUNC symbol.
1055,7 → 1270,8
return;
if (this->plt_ == NULL)
this->make_plt_section(symtab, layout);
unsigned int plt_offset = this->plt_->add_local_ifunc_entry(relobj,
unsigned int plt_offset = this->plt_->add_local_ifunc_entry(symtab, layout,
relobj,
local_sym_index);
relobj->set_local_plt_offset(local_sym_index, plt_offset);
}
1717,7 → 1933,7
// STT_GNU_IFUNC symbol. This makes a function
// address in a PIE executable match the address in a
// shared library that it links against.
Reloc_section* rel_dyn = target->rel_dyn_section(layout);
Reloc_section* rel_dyn = target->rel_irelative_section(layout);
rel_dyn->add_symbolless_global_addend(gsym,
elfcpp::R_386_IRELATIVE,
output_section,
1794,9 → 2010,24
// If this symbol is not fully resolved, we need to add a
// GOT entry with a dynamic relocation.
Reloc_section* rel_dyn = target->rel_dyn_section(layout);
 
// Use a GLOB_DAT rather than a RELATIVE reloc if:
//
// 1) The symbol may be defined in some other module.
//
// 2) We are building a shared library and this is a
// protected symbol; using GLOB_DAT means that the dynamic
// linker can use the address of the PLT in the main
// executable when appropriate so that function address
// comparisons work.
//
// 3) This is a STT_GNU_IFUNC symbol in position dependent
// code, again so that function address comparisons work.
if (gsym->is_from_dynobj()
|| gsym->is_undefined()
|| gsym->is_preemptible()
|| (gsym->visibility() == elfcpp::STV_PROTECTED
&& parameters->options().shared())
|| (gsym->type() == elfcpp::STT_GNU_IFUNC
&& parameters->options().output_is_position_independent()))
got->add_global_with_rel(gsym, GOT_TYPE_STANDARD,
2119,6 → 2350,47
uint32_t data_size = this->got_plt_->current_data_size();
symtab->get_sized_symbol<32>(sym)->set_symsize(data_size);
}
 
if (parameters->doing_static_link()
&& (this->plt_ == NULL || !this->plt_->has_irelative_section()))
{
// If linking statically, make sure that the __rel_iplt symbols
// were defined if necessary, even if we didn't create a PLT.
static const Define_symbol_in_segment syms[] =
{
{
"__rel_iplt_start", // name
elfcpp::PT_LOAD, // segment_type
elfcpp::PF_W, // segment_flags_set
elfcpp::PF(0), // segment_flags_clear
0, // value
0, // size
elfcpp::STT_NOTYPE, // type
elfcpp::STB_GLOBAL, // binding
elfcpp::STV_HIDDEN, // visibility
0, // nonvis
Symbol::SEGMENT_START, // offset_from_base
true // only_if_ref
},
{
"__rel_iplt_end", // name
elfcpp::PT_LOAD, // segment_type
elfcpp::PF_W, // segment_flags_set
elfcpp::PF(0), // segment_flags_clear
0, // value
0, // size
elfcpp::STT_NOTYPE, // type
elfcpp::STB_GLOBAL, // binding
elfcpp::STV_HIDDEN, // visibility
0, // nonvis
Symbol::SEGMENT_START, // offset_from_base
true // only_if_ref
}
};
 
symtab->define_symbols(layout, 2, syms,
layout->script_options()->saw_sections_clause());
}
}
 
// Return whether a direct absolute static relocation needs to be applied.
2210,7 → 2482,7
else if (gsym != NULL
&& gsym->use_plt_offset(Scan::get_reference_flags(r_type)))
{
symval.set_output_value(target->plt_section()->address()
symval.set_output_value(target->plt_address_for_global(gsym)
+ gsym->plt_offset());
psymval = &symval;
}
2219,7 → 2491,7
unsigned int r_sym = elfcpp::elf_r_sym<32>(rel.get_r_info());
if (object->local_has_plt_offset(r_sym))
{
symval.set_output_value(target->plt_section()->address()
symval.set_output_value(target->plt_address_for_local(object, r_sym)
+ object->local_plt_offset(r_sym));
psymval = &symval;
}
2406,7 → 2678,12
case elfcpp::R_386_TLS_GD: // Global-dynamic
if (optimized_type == tls::TLSOPT_TO_LE)
{
gold_assert(tls_segment != NULL);
if (tls_segment == NULL)
{
gold_assert(parameters->errors()->error_count() > 0
|| issue_undefined_symbol_error(gsym));
return;
}
this->tls_gd_to_le(relinfo, relnum, tls_segment,
rel, r_type, value, view,
view_size);
2432,7 → 2709,12
}
if (optimized_type == tls::TLSOPT_TO_IE)
{
gold_assert(tls_segment != NULL);
if (tls_segment == NULL)
{
gold_assert(parameters->errors()->error_count() > 0
|| issue_undefined_symbol_error(gsym));
return;
}
this->tls_gd_to_ie(relinfo, relnum, tls_segment, rel, r_type,
got_offset, view, view_size);
break;
2455,7 → 2737,12
this->local_dynamic_type_ = LOCAL_DYNAMIC_GNU;
if (optimized_type == tls::TLSOPT_TO_LE)
{
gold_assert(tls_segment != NULL);
if (tls_segment == NULL)
{
gold_assert(parameters->errors()->error_count() > 0
|| issue_undefined_symbol_error(gsym));
return;
}
this->tls_desc_gd_to_le(relinfo, relnum, tls_segment,
rel, r_type, value, view,
view_size);
2490,7 → 2777,12
}
if (optimized_type == tls::TLSOPT_TO_IE)
{
gold_assert(tls_segment != NULL);
if (tls_segment == NULL)
{
gold_assert(parameters->errors()->error_count() > 0
|| issue_undefined_symbol_error(gsym));
return;
}
this->tls_desc_gd_to_ie(relinfo, relnum, tls_segment, rel, r_type,
got_offset, view, view_size);
break;
2522,7 → 2814,12
this->local_dynamic_type_ = LOCAL_DYNAMIC_GNU;
if (optimized_type == tls::TLSOPT_TO_LE)
{
gold_assert(tls_segment != NULL);
if (tls_segment == NULL)
{
gold_assert(parameters->errors()->error_count() > 0
|| issue_undefined_symbol_error(gsym));
return;
}
this->tls_ld_to_le(relinfo, relnum, tls_segment, rel, r_type,
value, view, view_size);
break;
2553,7 → 2850,12
elfcpp::Shdr<32, false> shdr(relinfo->data_shdr);
if ((shdr.get_sh_flags() & elfcpp::SHF_EXECINSTR) != 0)
{
gold_assert(tls_segment != NULL);
if (tls_segment == NULL)
{
gold_assert(parameters->errors()->error_count() > 0
|| issue_undefined_symbol_error(gsym));
return;
}
value -= tls_segment->memsz();
}
}
2565,7 → 2867,12
case elfcpp::R_386_TLS_IE_32:
if (optimized_type == tls::TLSOPT_TO_LE)
{
gold_assert(tls_segment != NULL);
if (tls_segment == NULL)
{
gold_assert(parameters->errors()->error_count() > 0
|| issue_undefined_symbol_error(gsym));
return;
}
Target_i386::Relocate::tls_ie_to_le(relinfo, relnum, tls_segment,
rel, r_type, value, view,
view_size);
2609,7 → 2916,12
// have been created for this location, so do not apply it now.
if (!parameters->options().shared())
{
gold_assert(tls_segment != NULL);
if (tls_segment == NULL)
{
gold_assert(parameters->errors()->error_count() > 0
|| issue_undefined_symbol_error(gsym));
return;
}
value -= tls_segment->memsz();
Relocate_functions<32, false>::rel32(view, value);
}
2620,7 → 2932,12
// have been created for this location, so do not apply it now.
if (!parameters->options().shared())
{
gold_assert(tls_segment != NULL);
if (tls_segment == NULL)
{
gold_assert(parameters->errors()->error_count() > 0
|| issue_undefined_symbol_error(gsym));
return;
}
value = tls_segment->memsz() - value;
Relocate_functions<32, false>::rel32(view, value);
}
3143,7 → 3460,7
Target_i386::do_dynsym_value(const Symbol* gsym) const
{
gold_assert(gsym->is_from_dynobj() && gsym->has_plt_offset());
return this->plt_section()->address() + gsym->plt_offset();
return this->plt_address_for_global(gsym) + gsym->plt_offset();
}
 
// Return a string used to fill a code section with nops to take up
3209,6 → 3526,21
return std::string(nops[length], length);
}
 
// Return the value to use for the base of a DW_EH_PE_datarel offset
// in an FDE. Solaris and SVR4 use DW_EH_PE_datarel because their
// assembler can not write out the difference between two labels in
// different sections, so instead of using a pc-relative value they
// use an offset from the GOT.
 
uint64_t
Target_i386::do_ehframe_datarel_base() const
{
gold_assert(this->global_offset_table_ != NULL);
Symbol* sym = this->global_offset_table_;
Sized_symbol<32>* ssym = static_cast<Sized_symbol<32>*>(sym);
return ssym->value();
}
 
// Return whether SYM should be treated as a call to a non-split
// function. We don't want that to be true of a call to a
// get_pc_thunk function.
3286,7 → 3618,8
public:
Target_selector_i386()
: Target_selector_freebsd(elfcpp::EM_386, 32, false,
"elf32-i386", "elf32-i386-freebsd")
"elf32-i386", "elf32-i386-freebsd",
"elf_i386")
{ }
 
Target*
/trunk/gnu/binutils/gold/configure
605,8 → 605,6
IFUNC_FALSE
IFUNC_TRUE
RANDOM_SEED_CFLAGS
CONSTRUCTOR_PRIORITY_FALSE
CONSTRUCTOR_PRIORITY_TRUE
TLS_DESCRIPTORS_FALSE
TLS_DESCRIPTORS_TRUE
TLS_GNU2_DIALECT_FALSE
621,6 → 619,8
MCMODEL_MEDIUM_TRUE
FN_PTRS_IN_SO_WITHOUT_PIC_FALSE
FN_PTRS_IN_SO_WITHOUT_PIC_TRUE
HAVE_STATIC_FALSE
HAVE_STATIC_TRUE
NATIVE_OR_CROSS_LINKER_FALSE
NATIVE_OR_CROSS_LINKER_TRUE
GCC_FALSE
6106,6 → 6106,45
fi
 
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether static linking works" >&5
$as_echo_n "checking whether static linking works... " >&6; }
if test "${gold_cv_lib_static+set}" = set; then :
$as_echo_n "(cached) " >&6
else
LDFLAGS_hold=$LDFLAGS
LDFLAGS="$LDFLAGS -static"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
 
void f() { }
int
main ()
{
 
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gold_cv_lib_static=yes
else
gold_cv_lib_static=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$LDFLAGS_hold
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gold_cv_lib_static" >&5
$as_echo "$gold_cv_lib_static" >&6; }
if test "$gold_cv_lib_static" = "yes"; then
HAVE_STATIC_TRUE=
HAVE_STATIC_FALSE='#'
else
HAVE_STATIC_TRUE='#'
HAVE_STATIC_FALSE=
fi
 
 
if
case $target_cpu in
i?86) true;;
6314,34 → 6353,6
fi
 
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for constructor priorities" >&5
$as_echo_n "checking for constructor priorities... " >&6; }
if test "${gold_cv_c_conprio+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
void f() __attribute__ ((constructor (1)));
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
gold_cv_c_conprio=yes
else
gold_cv_c_conprio=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gold_cv_c_conprio" >&5
$as_echo "$gold_cv_c_conprio" >&6; }
 
if test "$gold_cv_c_conprio" = "yes"; then
CONSTRUCTOR_PRIORITY_TRUE=
CONSTRUCTOR_PRIORITY_FALSE='#'
else
CONSTRUCTOR_PRIORITY_TRUE='#'
CONSTRUCTOR_PRIORITY_FALSE=
fi
 
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -frandom-seed support" >&5
$as_echo_n "checking for -frandom-seed support... " >&6; }
if test "${gold_cv_c_random_seed+set}" = set; then :
7306,6 → 7317,10
as_fn_error "conditional \"NATIVE_OR_CROSS_LINKER\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${HAVE_STATIC_TRUE}" && test -z "${HAVE_STATIC_FALSE}"; then
as_fn_error "conditional \"HAVE_STATIC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${FN_PTRS_IN_SO_WITHOUT_PIC_TRUE}" && test -z "${FN_PTRS_IN_SO_WITHOUT_PIC_FALSE}"; then
as_fn_error "conditional \"FN_PTRS_IN_SO_WITHOUT_PIC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
7334,10 → 7349,6
as_fn_error "conditional \"TLS_DESCRIPTORS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${CONSTRUCTOR_PRIORITY_TRUE}" && test -z "${CONSTRUCTOR_PRIORITY_FALSE}"; then
as_fn_error "conditional \"CONSTRUCTOR_PRIORITY\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${IFUNC_TRUE}" && test -z "${IFUNC_FALSE}"; then
as_fn_error "conditional \"IFUNC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
/trunk/gnu/binutils/gold/plugin.cc
89,6 → 89,29
static enum ld_plugin_status
message(int level, const char *format, ...);
 
static enum ld_plugin_status
get_input_section_count(const void* handle, unsigned int* count);
 
static enum ld_plugin_status
get_input_section_type(const struct ld_plugin_section section,
unsigned int* type);
 
static enum ld_plugin_status
get_input_section_name(const struct ld_plugin_section section,
char** section_name_ptr);
 
static enum ld_plugin_status
get_input_section_contents(const struct ld_plugin_section section,
const unsigned char** section_contents,
size_t* len);
 
static enum ld_plugin_status
update_section_order(const struct ld_plugin_section *section_list,
unsigned int num_sections);
 
static enum ld_plugin_status
allow_section_ordering();
 
};
 
#endif // ENABLE_PLUGINS
133,7 → 156,8
sscanf(ver, "%d.%d", &major, &minor);
 
// Allocate and populate a transfer vector.
const int tv_fixed_size = 17;
const int tv_fixed_size = 23;
 
int tv_size = this->args_.size() + tv_fixed_size;
ld_plugin_tv* tv = new ld_plugin_tv[tv_size];
 
216,6 → 240,30
tv[i].tv_u.tv_set_extra_library_path = set_extra_library_path;
 
++i;
tv[i].tv_tag = LDPT_GET_INPUT_SECTION_COUNT;
tv[i].tv_u.tv_get_input_section_count = get_input_section_count;
 
++i;
tv[i].tv_tag = LDPT_GET_INPUT_SECTION_TYPE;
tv[i].tv_u.tv_get_input_section_type = get_input_section_type;
 
++i;
tv[i].tv_tag = LDPT_GET_INPUT_SECTION_NAME;
tv[i].tv_u.tv_get_input_section_name = get_input_section_name;
 
++i;
tv[i].tv_tag = LDPT_GET_INPUT_SECTION_CONTENTS;
tv[i].tv_u.tv_get_input_section_contents = get_input_section_contents;
 
++i;
tv[i].tv_tag = LDPT_UPDATE_SECTION_ORDER;
tv[i].tv_u.tv_update_section_order = update_section_order;
 
++i;
tv[i].tv_tag = LDPT_ALLOW_SECTION_ORDERING;
tv[i].tv_u.tv_allow_section_ordering = allow_section_ordering;
 
++i;
tv[i].tv_tag = LDPT_NULL;
tv[i].tv_u.tv_val = 0;
 
326,8 → 374,9
// Load all plugin libraries.
 
void
Plugin_manager::load_plugins()
Plugin_manager::load_plugins(Layout* layout)
{
this->layout_ = layout;
for (this->current_ = this->plugins_.begin();
this->current_ != this->plugins_.end();
++this->current_)
338,7 → 387,7
 
Pluginobj*
Plugin_manager::claim_file(Input_file* input_file, off_t offset,
off_t filesize)
off_t filesize, Object* elf_object)
{
if (this->in_replacement_phase_)
return NULL;
350,6 → 399,9
this->plugin_input_file_.offset = offset;
this->plugin_input_file_.filesize = filesize;
this->plugin_input_file_.handle = reinterpret_cast<void*>(handle);
if (elf_object != NULL)
this->objects_.push_back(elf_object);
this->in_claim_file_handler_ = true;
 
for (this->current_ = this->plugins_.begin();
this->current_ != this->plugins_.end();
358,9 → 410,11
if ((*this->current_)->claim_file(&this->plugin_input_file_))
{
this->any_claimed_ = true;
this->in_claim_file_handler_ = false;
 
if (this->objects_.size() > handle)
return this->objects_[handle];
if (this->objects_.size() > handle
&& this->objects_[handle]->pluginobj() != NULL)
return this->objects_[handle]->pluginobj();
 
// If the plugin claimed the file but did not call the
// add_symbols callback, we need to create the Pluginobj now.
369,6 → 423,7
}
}
 
this->in_claim_file_handler_ = false;
return NULL;
}
 
402,7 → 457,7
void
Plugin_manager::all_symbols_read(Workqueue* workqueue, Task* task,
Input_objects* input_objects,
Symbol_table* symtab, Layout* layout,
Symbol_table* symtab,
Dirsearch* dirpath, Mapfile* mapfile,
Task_token** last_blocker)
{
411,7 → 466,6
this->task_ = task;
this->input_objects_ = input_objects;
this->symtab_ = symtab;
this->layout_ = layout;
this->dirpath_ = dirpath;
this->mapfile_ = mapfile;
this->this_blocker_ = NULL;
599,12 → 653,20
Plugin_manager::make_plugin_object(unsigned int handle)
{
// Make sure we aren't asked to make an object for the same handle twice.
if (this->objects_.size() != handle)
if (this->objects_.size() != handle
&& this->objects_[handle]->pluginobj() != NULL)
return NULL;
 
Pluginobj* obj = make_sized_plugin_object(this->input_file_,
this->plugin_input_file_.offset,
this->plugin_input_file_.filesize);
 
 
// If the elf object for this file was pushed into the objects_ vector, delete
// it to make room for the Pluginobj as this file is claimed.
if (this->objects_.size() != handle)
this->objects_.pop_back();
 
this->objects_.push_back(obj);
return obj;
}
616,7 → 678,7
Plugin_manager::get_input_file(unsigned int handle,
struct ld_plugin_input_file* file)
{
Pluginobj* obj = this->object(handle);
Pluginobj* obj = this->object(handle)->pluginobj();
if (obj == NULL)
return LDPS_BAD_HANDLE;
 
634,7 → 696,11
ld_plugin_status
Plugin_manager::release_input_file(unsigned int handle)
{
Pluginobj* obj = this->object(handle);
if (this->object(handle) == NULL)
return LDPS_BAD_HANDLE;
 
Pluginobj* obj = this->object(handle)->pluginobj();
 
if (obj == NULL)
return LDPS_BAD_HANDLE;
 
642,6 → 708,23
return LDPS_OK;
}
 
// Get the elf object corresponding to the handle. Return NULL if we
// found a Pluginobj instead.
 
Object*
Plugin_manager::get_elf_object(const void* handle)
{
Object* obj = this->object(
static_cast<unsigned int>(reinterpret_cast<intptr_t>(handle)));
 
// The object should not be a Pluginobj.
if (obj == NULL
|| obj->pluginobj() != NULL)
return NULL;
 
return obj;
}
 
ld_plugin_status
Plugin_manager::get_view(unsigned int handle, const void **viewp)
{
648,7 → 731,7
off_t offset;
size_t filesize;
Input_file *input_file;
if (this->objects_.size() == handle)
if (this->in_claim_file_handler_)
{
// We are being called from the claim_file hook.
const struct ld_plugin_input_file &f = this->plugin_input_file_;
659,7 → 742,9
else
{
// An already claimed file.
Pluginobj* obj = this->object(handle);
if (this->object(handle) == NULL)
return LDPS_BAD_HANDLE;
Pluginobj* obj = this->object(handle)->pluginobj();
if (obj == NULL)
return LDPS_BAD_HANDLE;
offset = obj->offset();
1226,7 → 1311,6
this,
this->input_objects_,
this->symtab_,
this->layout_,
this->dirpath_,
this->mapfile_,
&this->this_blocker_);
1320,11 → 1404,14
get_symbols(const void* handle, int nsyms, ld_plugin_symbol* syms)
{
gold_assert(parameters->options().has_plugins());
Pluginobj* obj = parameters->options().plugins()->object(
static_cast<unsigned int>(reinterpret_cast<intptr_t>(handle)));
Object* obj = parameters->options().plugins()->object(
static_cast<unsigned int>(reinterpret_cast<intptr_t>(handle)));
if (obj == NULL)
return LDPS_ERR;
return obj->get_symbol_resolution_info(nsyms, syms);
Pluginobj* plugin_obj = obj->pluginobj();
if (plugin_obj == NULL)
return LDPS_ERR;
return plugin_obj->get_symbol_resolution_info(nsyms, syms);
}
 
// Add a new (real) input file generated by a plugin.
1384,6 → 1471,158
return LDPS_OK;
}
 
// Get the section count of the object corresponding to the handle. This
// plugin interface can only be called in the claim_file handler of the plugin.
 
static enum ld_plugin_status
get_input_section_count(const void* handle, unsigned int* count)
{
gold_assert(parameters->options().has_plugins());
 
if (!parameters->options().plugins()->in_claim_file_handler())
return LDPS_ERR;
 
Object* obj = parameters->options().plugins()->get_elf_object(handle);
 
if (obj == NULL)
return LDPS_ERR;
 
*count = obj->shnum();
return LDPS_OK;
}
 
// Get the type of the specified section in the object corresponding
// to the handle. This plugin interface can only be called in the
// claim_file handler of the plugin.
 
static enum ld_plugin_status
get_input_section_type(const struct ld_plugin_section section,
unsigned int* type)
{
gold_assert(parameters->options().has_plugins());
 
if (!parameters->options().plugins()->in_claim_file_handler())
return LDPS_ERR;
 
Object* obj
= parameters->options().plugins()->get_elf_object(section.handle);
 
if (obj == NULL)
return LDPS_BAD_HANDLE;
 
*type = obj->section_type(section.shndx);
return LDPS_OK;
}
 
// Get the name of the specified section in the object corresponding
// to the handle. This plugin interface can only be called in the
// claim_file handler of the plugin.
 
static enum ld_plugin_status
get_input_section_name(const struct ld_plugin_section section,
char** section_name_ptr)
{
gold_assert(parameters->options().has_plugins());
 
if (!parameters->options().plugins()->in_claim_file_handler())
return LDPS_ERR;
 
Object* obj
= parameters->options().plugins()->get_elf_object(section.handle);
 
if (obj == NULL)
return LDPS_BAD_HANDLE;
 
// Check if the object is locked before getting the section name.
gold_assert(obj->is_locked());
 
const std::string section_name = obj->section_name(section.shndx);
*section_name_ptr = static_cast<char*>(malloc(section_name.length() + 1));
memcpy(*section_name_ptr, section_name.c_str(), section_name.length() + 1);
return LDPS_OK;
}
 
// Get the contents of the specified section in the object corresponding
// to the handle. This plugin interface can only be called in the
// claim_file handler of the plugin.
 
static enum ld_plugin_status
get_input_section_contents(const struct ld_plugin_section section,
const unsigned char** section_contents_ptr,
size_t* len)
{
gold_assert(parameters->options().has_plugins());
 
if (!parameters->options().plugins()->in_claim_file_handler())
return LDPS_ERR;
 
Object* obj
= parameters->options().plugins()->get_elf_object(section.handle);
 
if (obj == NULL)
return LDPS_BAD_HANDLE;
 
// Check if the object is locked before getting the section contents.
gold_assert(obj->is_locked());
 
section_size_type plen;
*section_contents_ptr
= obj->section_contents(section.shndx, &plen, false);
*len = plen;
return LDPS_OK;
}
 
// Specify the ordering of sections in the final layout. The sections are
// specified as (handle,shndx) pairs in the two arrays in the order in
// which they should appear in the final layout.
 
static enum ld_plugin_status
update_section_order(const struct ld_plugin_section *section_list,
unsigned int num_sections)
{
gold_assert(parameters->options().has_plugins());
 
if (num_sections == 0)
return LDPS_OK;
 
if (section_list == NULL)
return LDPS_ERR;
 
std::map<Section_id, unsigned int> order_map;
 
for (unsigned int i = 0; i < num_sections; ++i)
{
Object* obj = parameters->options().plugins()->get_elf_object(
section_list[i].handle);
if (obj == NULL)
return LDPS_BAD_HANDLE;
unsigned int shndx = section_list[i].shndx;
Section_id secn_id(obj, shndx);
order_map[secn_id] = i + 1;
}
 
Layout* layout = parameters->options().plugins()->layout();
gold_assert (layout != NULL);
 
for (Layout::Section_list::const_iterator p = layout->section_list().begin();
p != layout->section_list().end();
++p)
(*p)->update_section_layout(order_map);
 
return LDPS_OK;
}
 
// Let the linker know that the sections could be reordered.
 
static enum ld_plugin_status
allow_section_ordering()
{
gold_assert(parameters->options().has_plugins());
Layout* layout = parameters->options().plugins()->layout();
layout->set_section_ordering_specified();
return LDPS_OK;
}
 
#endif // ENABLE_PLUGINS
 
// Allocate a Pluginobj object of the appropriate size and endianness.
/trunk/gnu/binutils/gold/symtab.cc
293,6 → 293,21
this->symsize_ = 0;
}
 
// Return an allocated string holding the symbol's name as
// name@version. This is used for relocatable links.
 
std::string
Symbol::versioned_name() const
{
gold_assert(this->version_ != NULL);
std::string ret = this->name_;
ret.push_back('@');
if (this->is_def_)
ret.push_back('@');
ret += this->version_;
return ret;
}
 
// Return true if SHNDX represents a common symbol.
 
bool
399,6 → 414,7
// externally visible, we need to add it.
if ((parameters->options().export_dynamic() || parameters->options().shared())
&& !this->is_from_dynobj()
&& !this->is_undefined()
&& this->is_externally_visible())
return true;
 
1176,12 → 1192,14
{
memcpy(symbuf, p, sym_size);
elfcpp::Sym_write<size, big_endian> sw(symbuf);
if (orig_st_shndx != elfcpp::SHN_UNDEF && is_ordinary)
if (orig_st_shndx != elfcpp::SHN_UNDEF
&& is_ordinary
&& relobj->e_type() == elfcpp::ET_REL)
{
// Symbol values in object files are section relative.
// This is normally what we want, but since here we are
// converting the symbol to absolute we need to add the
// section address. The section address in an object
// Symbol values in relocatable object files are section
// relative. This is normally what we want, but since here
// we are converting the symbol to absolute we need to add
// the section address. The section address in an object
// file is normally zero, but people can use a linker
// script to change it.
sw.put_st_value(sym.get_st_value()
1222,6 → 1240,9
is_default_version, *psym, st_shndx,
is_ordinary, orig_st_shndx);
if (is_forced_local)
this->force_local(res);
 
// If building a shared library using garbage collection, do not
// treat externally visible symbols as garbage.
if (parameters->options().gc_sections()
1228,9 → 1249,6
&& parameters->options().shared())
this->gc_mark_symbol_for_shlib(res);
 
if (is_forced_local)
this->force_local(res);
 
if (is_defined_in_discarded_section)
res->set_is_defined_in_discarded_section();
 
1867,7 → 1885,7
return sym;
}
 
if (Symbol_table::should_override_with_special(oldsym, defined))
if (Symbol_table::should_override_with_special(oldsym, type, defined))
this->override_with_special(oldsym, sym);
 
if (resolve_oldsym)
1981,7 → 1999,7
return sym;
}
 
if (Symbol_table::should_override_with_special(oldsym, defined))
if (Symbol_table::should_override_with_special(oldsym, type, defined))
this->override_with_special(oldsym, sym);
 
if (resolve_oldsym)
2100,7 → 2118,7
}
 
if (force_override
|| Symbol_table::should_override_with_special(oldsym, defined))
|| Symbol_table::should_override_with_special(oldsym, type, defined))
this->override_with_special(oldsym, sym);
 
if (resolve_oldsym)
2416,7 → 2434,10
unsigned int* pindex, off_t* poff)
{
sym->set_symtab_index(*pindex);
pool->add(sym->name(), false, NULL);
if (sym->version() == NULL || !parameters->options().relocatable())
pool->add(sym->name(), false, NULL);
else
pool->add(sym->versioned_name(), true, NULL);
++*pindex;
*poff += elfcpp::Elf_sizes<size>::sym_size;
}
2925,7 → 2946,10
unsigned char* p) const
{
elfcpp::Sym_write<size, big_endian> osym(p);
osym.put_st_name(pool->get_offset(sym->name()));
if (sym->version() == NULL || !parameters->options().relocatable())
osym.put_st_name(pool->get_offset(sym->name()));
else
osym.put_st_name(pool->get_offset(sym->versioned_name()));
osym.put_st_value(value);
// Use a symbol size of zero for undefined symbols from shared libraries.
if (shndx == elfcpp::SHN_UNDEF && sym->is_from_dynobj())
3282,6 → 3306,12
size_t relnum, off_t reloffset) const
{
gold_assert(sym->has_warning());
 
// We don't want to issue a warning for a relocation against the
// symbol in the same object file in which the symbol is defined.
if (sym->object() == relinfo->object)
return;
 
Warning_table::const_iterator p = this->warnings_.find(sym->name());
gold_assert(p != this->warnings_.end());
gold_warning_at_location(relinfo, relnum, reloffset,
/trunk/gnu/binutils/gold/symtab.h
1,6 → 1,6
// symtab.h -- the gold symbol table -*- C++ -*-
 
// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
136,6 → 136,10
set_is_default()
{ this->is_def_ = true; }
 
// Return the symbol's name as name@version (or name@@version).
std::string
versioned_name() const;
 
// Return the symbol source.
Source
source() const
534,8 → 538,9
bool
is_externally_visible() const
{
return (this->visibility_ == elfcpp::STV_DEFAULT
|| this->visibility_ == elfcpp::STV_PROTECTED);
return ((this->visibility_ == elfcpp::STV_DEFAULT
|| this->visibility_ == elfcpp::STV_PROTECTED)
&& !this->is_forced_local_);
}
 
// Return true if this symbol can be preempted by a definition in
1657,7 → 1662,8
// Whether we should override a symbol, based on flags in
// resolve.cc.
static bool
should_override(const Symbol*, unsigned int, Defined, Object*, bool*, bool*);
should_override(const Symbol*, unsigned int, elfcpp::STT, Defined,
Object*, bool*, bool*);
 
// Report a problem in symbol resolution.
static void
1675,7 → 1681,7
// Whether we should override a symbol with a special symbol which
// is automatically defined by the linker.
static bool
should_override_with_special(const Symbol*, Defined);
should_override_with_special(const Symbol*, elfcpp::STT, Defined);
 
// Override a symbol with a special symbol.
template<int size>
/trunk/gnu/binutils/gold/output.h
2615,6 → 2615,99
Relaxed_input_sections_by_id relaxed_input_sections_by_id_;
};
 
// This abstract base class defines the interface for the
// types of methods used to fill free space left in an output
// section during an incremental link. These methods are used
// to insert dummy compilation units into debug info so that
// debug info consumers can scan the debug info serially.
 
class Output_fill
{
public:
Output_fill()
: is_big_endian_(parameters->target().is_big_endian())
{ }
 
// Return the smallest size chunk of free space that can be
// filled with a dummy compilation unit.
size_t
minimum_hole_size() const
{ return this->do_minimum_hole_size(); }
 
// Write a fill pattern of length LEN at offset OFF in the file.
void
write(Output_file* of, off_t off, size_t len) const
{ this->do_write(of, off, len); }
 
protected:
virtual size_t
do_minimum_hole_size() const = 0;
 
virtual void
do_write(Output_file* of, off_t off, size_t len) const = 0;
 
bool
is_big_endian() const
{ return this->is_big_endian_; }
 
private:
bool is_big_endian_;
};
 
// Fill method that introduces a dummy compilation unit in
// a .debug_info or .debug_types section.
 
class Output_fill_debug_info : public Output_fill
{
public:
Output_fill_debug_info(bool is_debug_types)
: is_debug_types_(is_debug_types)
{ }
 
protected:
virtual size_t
do_minimum_hole_size() const;
 
virtual void
do_write(Output_file* of, off_t off, size_t len) const;
 
private:
// Version of the header.
static const int version = 4;
// True if this is a .debug_types section.
bool is_debug_types_;
};
 
// Fill method that introduces a dummy compilation unit in
// a .debug_line section.
 
class Output_fill_debug_line : public Output_fill
{
public:
Output_fill_debug_line()
{ }
 
protected:
virtual size_t
do_minimum_hole_size() const;
 
virtual void
do_write(Output_file* of, off_t off, size_t len) const;
 
private:
// Version of the header. We write a DWARF-3 header because it's smaller
// and many tools have not yet been updated to understand the DWARF-4 header.
static const int version = 3;
// Length of the portion of the header that follows the header_length
// field. This includes the following fields:
// minimum_instruction_length, default_is_stmt, line_base, line_range,
// opcode_base, standard_opcode_lengths[], include_directories, filenames.
// The standard_opcode_lengths array is 12 bytes long, and the
// include_directories and filenames fields each contain only a single
// null byte.
static const size_t header_length = 19;
};
 
// An output section. We don't expect to have too many output
// sections, so we don't bother to do a template on the size.
 
2665,6 → 2758,11
flags() const
{ return this->flags_; }
 
typedef std::map<Section_id, unsigned int> Section_layout_order;
 
void
update_section_layout(const Section_layout_order& order_map);
 
// Update the output section flags based on input section flags.
void
update_flags_for_input_section(elfcpp::Elf_Xword flags);
3427,6 → 3525,21
has_fixed_layout() const
{ return this->has_fixed_layout_; }
 
// Set flag to allow patch space for this section. Used for full
// incremental links.
void
set_is_patch_space_allowed()
{ this->is_patch_space_allowed_ = true; }
 
// Set a fill method to use for free space left in the output section
// during incremental links.
void
set_free_space_fill(Output_fill* free_space_fill)
{
this->free_space_fill_ = free_space_fill;
this->free_list_.set_min_hole_size(free_space_fill->minimum_hole_size());
}
 
// Reserve space within the fixed layout for the section. Used for
// incremental update links.
void
3890,6 → 4003,8
bool always_keeps_input_sections_ : 1;
// Whether this section has a fixed layout, for incremental update links.
bool has_fixed_layout_ : 1;
// True if we can add patch space to this section.
bool is_patch_space_allowed_ : 1;
// For SHT_TLS sections, the offset of this section relative to the base
// of the TLS segment.
uint64_t tls_offset_;
3900,6 → 4015,10
// List of available regions within the section, for incremental
// update links.
Free_list free_list_;
// Method for filling chunks of free space.
Output_fill* free_space_fill_;
// Amount added as patch space for incremental linking.
off_t patch_space_;
};
 
// An output segment. PT_LOAD segments are built from collections of
/trunk/gnu/binutils/gold/workqueue-internal.h
56,7 → 56,7
 
// Return whether to cancel the current thread.
virtual bool
should_cancel_thread() = 0;
should_cancel_thread(int thread_number) = 0;
 
protected:
// Get the Workqueue.
84,7 → 84,7
 
// Return whether to cancel a thread.
bool
should_cancel_thread();
should_cancel_thread(int thread_number);
 
// Process all tasks. This keeps running until told to cancel.
void
/trunk/gnu/binutils/gold/object.h
1912,6 → 1912,11
sized_relobj() const
{ return this; }
 
// Return the ELF file type.
int
e_type() const
{ return this->e_type_; }
 
// Return the number of symbols. This is only valid after
// Object::add_symbols has been called.
unsigned int
2220,6 → 2225,7
section_size_type view_size;
bool is_input_output_view;
bool is_postprocessing_view;
bool is_ctors_reverse_view;
};
 
typedef std::vector<View_size> Views;
2305,13 → 2311,23
// Layout an input section.
void
layout_section(Layout* layout, unsigned int shndx, const char* name,
typename This::Shdr& shdr, unsigned int reloc_shndx,
const typename This::Shdr& shdr, unsigned int reloc_shndx,
unsigned int reloc_type);
 
// Layout an input .eh_frame section.
void
layout_eh_frame_section(Layout* layout, const unsigned char* symbols_data,
section_size_type symbols_size,
const unsigned char* symbol_names_data,
section_size_type symbol_names_size,
unsigned int shndx, const typename This::Shdr&,
unsigned int reloc_shndx, unsigned int reloc_type);
 
// Write section data to the output file. Record the views and
// sizes in VIEWS for use when relocating.
void
write_sections(const unsigned char* pshdrs, Output_file*, Views*);
write_sections(const Layout*, const unsigned char* pshdrs, Output_file*,
Views*);
 
// Relocate the sections in the output file.
void
2320,6 → 2336,11
Views* pviews)
{ this->do_relocate_sections(symtab, layout, pshdrs, of, pviews); }
 
// Reverse the words in a section. Used for .ctors sections mapped
// to .init_array sections.
void
reverse_words(unsigned char*, section_size_type);
 
// Scan the input relocations for --emit-relocs.
void
emit_relocs_scan(Symbol_table*, Layout*, const unsigned char* plocal_syms,
2488,6 → 2509,9
 
// General access to the ELF file.
elfcpp::Elf_file<size, big_endian, Object> elf_file_;
// Type of ELF file (ET_REL or ET_EXEC). ET_EXEC files are allowed
// as input files only for the --just-symbols option.
int e_type_;
// Index of SHT_SYMTAB section.
unsigned int symtab_shndx_;
// The number of local symbols.
/trunk/gnu/binutils/gold/sparc.cc
1,6 → 1,6
// sparc.cc -- sparc target support for gold.
 
// Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
// Copyright 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by David S. Miller <davem@davemloft.net>.
 
// This file is part of gold.
403,6 → 403,7
false, // has_resolve
false, // has_code_fill
true, // is_default_stack_executable
false, // can_icf_inline_merge_sections
'\0', // wrap_char
"/usr/lib/ld.so.1", // dynamic_linker
0x00010000, // default_text_segment_address
426,6 → 427,7
false, // has_resolve
false, // has_code_fill
true, // is_default_stack_executable
false, // can_icf_inline_merge_sections
'\0', // wrap_char
"/usr/lib/sparcv9/ld.so.1", // dynamic_linker
0x100000, // default_text_segment_address
3479,7 → 3481,8
public:
Target_selector_sparc()
: Target_selector(elfcpp::EM_NONE, size, big_endian,
(size == 64 ? "elf64-sparc" : "elf32-sparc"))
(size == 64 ? "elf64-sparc" : "elf32-sparc"),
(size == 64 ? "elf64_sparc" : "elf32_sparc"))
{ }
 
Target* do_recognize(int machine, int, int)
/trunk/gnu/binutils/gold/resolve.cc
1,6 → 1,6
// resolve.cc -- symbol resolution for gold
 
// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
245,6 → 245,21
unsigned int orig_st_shndx,
Object* object, const char* version)
{
// It's possible for a symbol to be defined in an object file
// using .symver to give it a version, and for there to also be
// a linker script giving that symbol the same version. We
// don't want to give a multiple-definition error for this
// harmless redefinition.
bool to_is_ordinary;
if (to->source() == Symbol::FROM_OBJECT
&& to->object() == object
&& is_ordinary
&& to->is_defined()
&& to->shndx(&to_is_ordinary) == st_shndx
&& to_is_ordinary
&& to->value() == sym.get_st_value())
return;
 
if (parameters->target().has_resolve())
{
Sized_target<size, big_endian>* sized_target;
306,7 → 321,6
// inline and the other is not. (Note: not all ODR violations can
// be found this way, and not everything this finds is an ODR
// violation. But it's helpful to warn about.)
bool to_is_ordinary;
if (parameters->options().detect_odr_violations()
&& (sym.get_st_bind() == elfcpp::STB_WEAK
|| to->binding() == elfcpp::STB_WEAK)
337,8 → 351,8
bool adjust_common_sizes;
bool adjust_dyndef;
typename Sized_symbol<size>::Size_type tosize = to->symsize();
if (Symbol_table::should_override(to, frombits, OBJECT, object,
&adjust_common_sizes,
if (Symbol_table::should_override(to, frombits, sym.get_st_type(), OBJECT,
object, &adjust_common_sizes,
&adjust_dyndef))
{
elfcpp::STB tobinding = to->binding();
395,8 → 409,8
 
bool
Symbol_table::should_override(const Symbol* to, unsigned int frombits,
Defined defined, Object* object,
bool* adjust_common_sizes,
elfcpp::STT fromtype, Defined defined,
Object* object, bool* adjust_common_sizes,
bool* adjust_dyndef)
{
*adjust_common_sizes = false;
420,7 → 434,13
to->type());
}
 
// FIXME: Warn if either but not both of TO and SYM are STT_TLS.
if (to->type() == elfcpp::STT_TLS
? fromtype != elfcpp::STT_TLS
: fromtype == elfcpp::STT_TLS)
Symbol_table::report_resolve_problem(true,
_("symbol '%s' used as both __thread "
"and non-__thread"),
to, defined, object);
 
// We use a giant switch table for symbol resolution. This code is
// unwieldy, but: 1) it is efficient; 2) we definitely handle all
856,13 → 876,15
// defining special symbols.
 
bool
Symbol_table::should_override_with_special(const Symbol* to, Defined defined)
Symbol_table::should_override_with_special(const Symbol* to,
elfcpp::STT fromtype,
Defined defined)
{
bool adjust_common_sizes;
bool adjust_dyn_def;
unsigned int frombits = global_flag | regular_flag | def_flag;
bool ret = Symbol_table::should_override(to, frombits, defined, NULL,
&adjust_common_sizes,
bool ret = Symbol_table::should_override(to, frombits, fromtype, defined,
NULL, &adjust_common_sizes,
&adjust_dyn_def);
gold_assert(!adjust_common_sizes && !adjust_dyn_def);
return ret;
873,7 → 895,8
void
Symbol::override_base_with_special(const Symbol* from)
{
gold_assert(this->name_ == from->name_ || this->has_alias());
bool same_name = this->name_ == from->name_;
gold_assert(same_name || this->has_alias());
 
this->source_ = from->source_;
switch (from->source_)
895,7 → 918,16
break;
}
 
this->override_version(from->version_);
if (same_name)
{
// When overriding a versioned symbol with a special symbol, we
// may be changing the version. This will happen if we see a
// special symbol such as "_end" defined in a shared object with
// one version (from a version script), but we want to define it
// here with a different version (from a different version
// script).
this->version_ = from->version_;
}
this->type_ = from->type_;
this->binding_ = from->binding_;
this->override_visibility(from->visibility_);
/trunk/gnu/binutils/gold/dynobj.cc
1,6 → 1,6
// dynobj.cc -- dynamic object support for gold
 
// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
1483,7 → 1483,7
if (!sym->is_from_dynobj() && !sym->is_copied_from_dynobj())
{
if (parameters->options().shared())
this->add_def(sym, version, version_key);
this->add_def(dynpool, sym, version, version_key);
}
else
{
1496,7 → 1496,7
// We've found a symbol SYM defined in version VERSION.
 
void
Versions::add_def(const Symbol* sym, const char* version,
Versions::add_def(Stringpool* dynpool, const Symbol* sym, const char* version,
Stringpool::Key version_key)
{
Key k(version_key, 0);
1520,8 → 1520,12
// find a definition of a symbol with a version which is not
// in the version script.
if (parameters->options().shared())
gold_error(_("symbol %s has undefined version %s"),
sym->demangled_name().c_str(), version);
{
gold_error(_("symbol %s has undefined version %s"),
sym->demangled_name().c_str(), version);
if (this->needs_base_version_)
this->define_base_version(dynpool);
}
else
// We only insert a base version for shared library.
gold_assert(!this->needs_base_version_);
/trunk/gnu/binutils/gold/readsyms.cc
320,12 → 320,33
}
}
 
Object* elf_obj = NULL;
bool unconfigured;
bool* punconfigured = NULL;
if (is_elf)
{
// This is an ELF object.
 
unconfigured = false;
punconfigured = (input_file->will_search_for()
? &unconfigured
: NULL);
elf_obj = make_elf_object(input_file->filename(),
input_file, 0, ehdr, read_size,
punconfigured);
}
 
if (parameters->options().has_plugins())
{
Pluginobj* obj = parameters->options().plugins()->claim_file(input_file,
0, filesize);
0, filesize,
elf_obj);
if (obj != NULL)
{
// Delete the elf_obj, this file has been claimed.
if (elf_obj != NULL)
delete elf_obj;
 
// The input file was claimed by a plugin, and its symbols
// have been provided by the plugin.
 
359,14 → 380,7
{
// This is an ELF object.
 
bool unconfigured = false;
bool* punconfigured = (input_file->will_search_for()
? &unconfigured
: NULL);
Object* obj = make_elf_object(input_file->filename(),
input_file, 0, ehdr, read_size,
punconfigured);
if (obj == NULL)
if (elf_obj == NULL)
{
if (unconfigured)
{
382,7 → 396,7
}
 
Read_symbols_data* sd = new Read_symbols_data;
obj->read_symbols(sd);
elf_obj->read_symbols(sd);
 
// Opening the file locked it, so now we need to unlock it. We
// need to unlock it before queuing the Add_symbols task,
397,7 → 411,7
if (this->member_ != NULL)
{
this->member_->sd_ = sd;
this->member_->obj_ = obj;
this->member_->obj_ = elf_obj;
this->member_->arg_serial_ =
this->input_argument_->file().arg_serial();
return true;
412,7 → 426,7
this->dirindex_,
this->mapfile_,
this->input_argument_,
obj,
elf_obj,
NULL,
sd,
this->this_blocker_,
637,6 → 651,8
Task_token*
Read_member::is_runnable()
{
if (this->this_blocker_ != NULL && this->this_blocker_->is_blocked())
return this->this_blocker_;
return NULL;
}
 
/trunk/gnu/binutils/gold/script-sections.cc
3936,6 → 3936,18
 
saw_tls = true;
}
 
// If we are making a shared library, and we see a section named
// .interp then put the .interp section in a PT_INTERP segment.
// This is for GNU ld compatibility.
if (strcmp((*p)->name(), ".interp") == 0)
{
elfcpp::Elf_Word seg_flags =
Layout::section_flags_to_segment((*p)->flags());
Output_segment* oseg = layout->make_output_segment(elfcpp::PT_INTERP,
seg_flags);
oseg->add_output_section_to_nonload(*p, seg_flags);
}
}
}
 
4038,15 → 4050,37
p != this->sections_elements_->end();
++p)
{
bool orphan;
bool is_orphan;
String_list* old_phdr_names = phdr_names;
Output_section* os = (*p)->allocate_to_segment(&phdr_names, &orphan);
Output_section* os = (*p)->allocate_to_segment(&phdr_names, &is_orphan);
if (os == NULL)
continue;
 
elfcpp::Elf_Word seg_flags =
Layout::section_flags_to_segment(os->flags());
 
if (phdr_names == NULL)
{
gold_error(_("allocated section not in any segment"));
// Don't worry about empty orphan sections.
if (is_orphan && os->current_data_size() > 0)
gold_error(_("allocated section %s not in any segment"),
os->name());
 
// To avoid later crashes drop this section into the first
// PT_LOAD segment.
for (Phdrs_elements::const_iterator ppe =
this->phdrs_elements_->begin();
ppe != this->phdrs_elements_->end();
++ppe)
{
Output_segment* oseg = (*ppe)->segment();
if (oseg->type() == elfcpp::PT_LOAD)
{
oseg->add_output_section_to_load(layout, os, seg_flags);
break;
}
}
 
continue;
}
 
4061,7 → 4095,7
// PT_INTERP segment will pick up following orphan sections,
// which does not make sense. If this is not an orphan section,
// we trust the linker script.
if (orphan)
if (is_orphan)
{
// Enable PT_LOAD segments only filtering until we see another
// list of segment names.
4082,9 → 4116,6
&& r->second->type() != elfcpp::PT_LOAD)
continue;
 
elfcpp::Elf_Word seg_flags =
Layout::section_flags_to_segment(os->flags());
 
if (r->second->type() != elfcpp::PT_LOAD)
r->second->add_output_section_to_nonload(os, seg_flags);
else
/trunk/gnu/binutils/gold/po/es.po
1,29 → 1,30
 
# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
# Mensajes en español para gold 2.20.90.
# Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
# This file is distributed under the same license as the binutils package.
 
# Cristian Othón Martínez Vera <cfuga@cfuga.mx>, 2008, 2009, 2010, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: gold 2.20.1\n"
"Project-Id-Version: gold 2.20.90\n"
"Report-Msgid-Bugs-To: bug-binutils@gnu.org\n"
"POT-Creation-Date: 2010-03-03 15:08+0100\n"
"PO-Revision-Date: 2010-04-27 17:31-0500\n"
 
"PO-Revision-Date: 2011-08-24 11:49-0500\n"
"Last-Translator: Cristian Othón Martínez Vera <cfuga@cfuga.mx>\n"
"Language-Team: Spanish <es@li.org>\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
 
#: archive.cc:119
#, c-format
msgid "%s: no archive symbol table (run ranlib)"
 
msgstr "%s: no existe la tabla de símbolos de archivo (ejecute ranlib)"
 
#: archive.cc:204
#, c-format
msgid "%s: bad archive symbol table names"
 
msgstr "%s: nombres de tabla de símbolos de archivo erróneos"
 
#: archive.cc:236
#, c-format
33,7 → 34,7
#: archive.cc:256
#, c-format
msgid "%s: malformed archive header size at %zu"
 
msgstr "%s: tamaño de encabezado de archivo mal formado en %zu"
 
#: archive.cc:267
#, c-format
43,12 → 44,12
#: archive.cc:297
#, c-format
msgid "%s: bad extended name index at %zu"
 
msgstr "%s: índice de nombre extendido erróneo en %zu"
 
#: archive.cc:307
#, c-format
msgid "%s: bad extended name entry at header %zu"
 
msgstr "%s: entrada de nombre extendida errónea en el encabezado %zu"
 
#: archive.cc:404
#, c-format
83,11 → 84,11
#: x86_64.cc:1265
#, c-format
msgid "%s: unsupported reloc %u against local symbol"
 
msgstr "%s: no se admite la reubicación %u contra el símbolo local"
 
#: arm.cc:1404 powerpc.cc:1105 sparc.cc:1592 x86_64.cc:992
msgid "requires unsupported dynamic reloc; recompile with -fPIC"
 
msgstr "se requiere una reubicación dinámica no admitida; recompile con -fPIC"
 
#. These are relocations which should only be seen by the
#. dynamic linker, and should never be seen here.
96,34 → 97,34
#: x86_64.cc:1453
#, c-format
msgid "%s: unexpected reloc %u in object file"
 
msgstr "%s: reubicación %u inesperada en el fichero objeto"
 
#: arm.cc:1538 i386.cc:1171 powerpc.cc:1242 sparc.cc:1896 x86_64.cc:1279
#: x86_64.cc:1571
#, c-format
msgid "%s: unsupported reloc %u against global symbol %s"
 
msgstr "%s: no se admite la reubicación %u contra el símbolo global %s"
 
#: arm.cc:1804 i386.cc:1542
#, c-format
msgid "%s: unsupported RELA reloc section"
 
msgstr "%s: no se admite la sección de reubicación RELA"
 
#: arm.cc:2047
msgid "relocation R_ARM_MOVW_ABS_NC cannot be used when makinga shared object; recompile with -fPIC"
 
msgstr "no se puede usar la reubicación R_ARM_MOVW_ABS_NC cuando se hace un objeto compartido; recompile con -fPIC"
 
#: arm.cc:2056
msgid "relocation R_ARM_MOVT_ABS cannot be used when makinga shared object; recompile with -fPIC"
 
msgstr "no se puede usar la reubicación R_ARM_MOVT_ABS cundo se hace un objeto compartido; recompile con -fPIC"
 
#: arm.cc:2067
msgid "relocation R_ARM_THM_MOVW_ABS_NC cannot be used whenmaking a shared object; recompile with -fPIC"
 
msgstr "no se puede usar la reubicación R_ARM_THM_MOVW_ABS_NC cuando se hace un objeto compartido; recompile con -fPIC"
 
#: arm.cc:2077
msgid "relocation R_ARM_THM_MOVT_ABS cannot be used whenmaking a shared object; recompile with -fPIC"
 
msgstr "no se puede usar la reubicación R_ARM_THM_MOVT_ABS cuando se hace un objeto compartido; recompile con -fPIC"
 
#: arm.cc:2141
msgid "cannot find origin of R_ARM_BASE_PREL"
137,7 → 138,7
#: x86_64.cc:1935 x86_64.cc:2518
#, c-format
msgid "unexpected reloc %u in object file"
 
msgstr "reubicación %u inesperada en el fichero objeto"
 
#: arm.cc:2236 i386.cc:1852 i386.cc:1931 i386.cc:1983 i386.cc:2014
#: i386.cc:2076 powerpc.cc:1804 sparc.cc:2717 sparc.cc:2900 sparc.cc:2961
144,22 → 145,22
#: sparc.cc:3068 x86_64.cc:1956 x86_64.cc:2039 x86_64.cc:2094 x86_64.cc:2119
#, c-format
msgid "unsupported reloc %u"
 
msgstr "no se admite la reubicación %u"
 
#: arm.cc:2248
#, c-format
msgid "relocation overflow in relocation %u"
 
msgstr "desbordamiento de reubicación en la reubicación %u"
 
#: arm.cc:2256
#, c-format
msgid "unexpected opcode while processing relocation %u"
 
msgstr "código de operación inesperado al procesar la reubicación %u"
 
#: arm.cc:2359 i386.cc:2535
#, c-format
msgid "unsupported reloc %u in object file"
 
msgstr "no se admite la reubicación %u en el fichero objeto"
 
#: binary.cc:129
#, c-format
168,17 → 169,17
 
#: compressed_output.cc:128
msgid "not compressing section data: zlib error"
 
msgstr "no se comprime la sección de datos: erro de zlib"
 
#: cref.cc:244
#, c-format
msgid "cannot open symbol count file %s: %s"
 
msgstr "no se puede abrir el fichero de cuenta de símbolos %s: %s"
 
#: descriptors.cc:116
#, c-format
msgid "file %s was removed during the link"
 
msgstr "se borró el fichero %s durante el enlace"
 
#: descriptors.cc:169
msgid "out of file descriptors and couldn't close any"
196,27 → 197,27
 
#: dwarf_reader.cc:53 dwarf_reader.cc:84
msgid "Unusually large LEB128 decoded, debug information may be corrupted"
 
msgstr "Se decodificó un LEB128 inusualmente grande, la información de depuración puede estar corrupta"
 
#: dynobj.cc:164
#, c-format
msgid "unexpected duplicate type %u section: %u, %u"
 
msgstr "duplicado inesperado tipo %u sección: %u, %u"
 
#: dynobj.cc:200
#, c-format
msgid "unexpected link in section %u header: %u != %u"
 
msgstr "enlace inesperado en la sección %u encabezado: %u != %u"
 
#: dynobj.cc:236
#, c-format
msgid "DYNAMIC section %u link out of range: %u"
 
msgstr "enlace de la sección DYNAMIC %u fuera de rango: %u"
 
#: dynobj.cc:244
#, c-format
msgid "DYNAMIC section %u link %u is not a strtab"
 
msgstr "sección DYNAMIC %u enlace %u no es un strtab"
 
#: dynobj.cc:273
#, c-format
230,37 → 231,37
 
#: dynobj.cc:298
msgid "missing DT_NULL in dynamic segment"
 
msgstr "falta DT_NULL en el segmento dinámico"
 
#: dynobj.cc:344
#, c-format
msgid "invalid dynamic symbol table name index: %u"
 
msgstr "índice de nombre de tabla de símbolos dinámicos inválido: %u"
 
#: dynobj.cc:351
#, c-format
msgid "dynamic symbol table name section has wrong type: %u"
 
msgstr "la sección de nombre de tabla de símbolos dinámicos tiene un tipo erróneo: %u"
 
#: dynobj.cc:438 object.cc:463 object.cc:1106
#, c-format
msgid "bad section name offset for section %u: %lu"
 
msgstr "desplazamiento de nombre de sección erróneo para la sección %u: %lu"
 
#: dynobj.cc:468
#, c-format
msgid "duplicate definition for version %u"
 
msgstr "definición duplicada para la versión %u"
 
#: dynobj.cc:497
#, c-format
msgid "unexpected verdef version %u"
 
msgstr "versión verdef %u inesperada"
 
#: dynobj.cc:513
#, c-format
msgid "verdef vd_cnt field too small: %u"
 
msgstr "campo vd_cnt verdef demasiado pequeño: %u"
 
#: dynobj.cc:521
#, c-format
280,7 → 281,7
#: dynobj.cc:576
#, c-format
msgid "unexpected verneed version %u"
 
msgstr "versión verneed %u inesperada"
 
#: dynobj.cc:585
#, c-format
304,12 → 305,12
 
#: dynobj.cc:670
msgid "size of dynamic symbols is not multiple of symbol size"
 
msgstr "el tamaño de los símbolos dinámicos no es un múltiplo del tamaño de símbolo"
 
#: dynobj.cc:1435
#, c-format
msgid "symbol %s has undefined version %s"
 
msgstr "el símbolo %s tiene la versión sin definir %s"
 
#: ehframe.h:82
msgid "** eh_frame_hdr"
352,7 → 353,7
#: errors.cc:172
#, c-format
msgid "%s: %s: error: undefined reference to '%s', version '%s'\n"
 
msgstr "%s: %s: error: referencia a '%s' sin definir, versión '%s'\n"
 
#: errors.cc:182
#, c-format
362,11 → 363,11
#: expression.cc:172
#, c-format
msgid "undefined symbol '%s' referenced in expression"
 
msgstr "se hace referencia al símbolo sin definir '%s' en la expresión"
 
#: expression.cc:209
msgid "invalid reference to dot symbol outside of SECTIONS clause"
 
msgstr "referencia inválida al símbolo dot fuera de la cláusula SECTIONS"
 
#. Handle unary operators. We use a preprocessor macro as a hack to
#. capture the C operator.
392,15 → 393,15
 
#: expression.cc:575
msgid "max applied to section relative value"
 
msgstr "se aplicó max al valor relativo de la sección"
 
#: expression.cc:610
msgid "min applied to section relative value"
 
msgstr "se aplicó min al valor relativo de la sección"
 
#: expression.cc:740
msgid "aligning to section relative value"
 
msgstr "se alinea al valor relativo de la sección"
 
#: expression.cc:895
#, c-format
422,12 → 423,12
#: fileread.cc:65
#, c-format
msgid "munmap failed: %s"
 
msgstr "falló munmap: %s"
 
#: fileread.cc:129
#, c-format
msgid "%s: fstat failed: %s"
 
msgstr "%s: falló fstat: %s"
 
#: fileread.cc:169
#, c-format
437,37 → 438,37
#: fileread.cc:302
#, c-format
msgid "%s: pread failed: %s"
 
msgstr "%s: falló pread: %s"
 
#: fileread.cc:308
#, c-format
msgid "%s: file too short: read only %lld of %lld bytes at %lld"
 
msgstr "%s: el fichero era demasiado pequeño: sólo se leyeron %lld de %lld bytes en %lld"
 
#: fileread.cc:372
#, c-format
msgid "%s: attempt to map %lld bytes at offset %lld exceeds size of file; the file may be corrupt"
 
msgstr "%s: al intentar mapear %lld bytes en el desplazamiento %lld se excedió el tamaño del fichero; el fichero tal vez se corrompió"
 
#: fileread.cc:402
#, c-format
msgid "%s: mmap offset %lld size %lld failed: %s"
 
msgstr "%s: falló el desplazamiento mmap %lld tamaño %lld: %s"
 
#: fileread.cc:548
#, c-format
msgid "%s: lseek failed: %s"
 
msgstr "%s: falló lseek: %s"
 
#: fileread.cc:554
#, c-format
msgid "%s: readv failed: %s"
 
msgstr "%s: falló readv: %s"
 
#: fileread.cc:557
#, c-format
msgid "%s: file too short: read only %zd of %zd bytes at %lld"
 
msgstr "%s: el fichero era demasiado pequeño: sólo se leyeron %zd de %zd bytes en %lld"
 
#: fileread.cc:706
#, c-format
477,12 → 478,12
#: fileread.cc:708
#, c-format
msgid "%s: maximum bytes mapped for read at one time: %llu\n"
 
msgstr "%s: máximo de bytes mapeados para lectura de una sola vez: %llu\n"
 
#: fileread.cc:791
#, c-format
msgid "%s: stat failed: %s"
 
msgstr "%s: falló stat: %s"
 
#: fileread.cc:849
#, c-format
502,67 → 503,67
#: gold-threads.cc:103
#, c-format
msgid "pthead_mutextattr_init failed: %s"
 
msgstr "falló pthread_mutextattr_init: %s"
 
#: gold-threads.cc:107
#, c-format
msgid "pthread_mutextattr_settype failed: %s"
 
msgstr "falló pthread_mutextattr_settype: %s"
 
#: gold-threads.cc:112
#, c-format
msgid "pthread_mutex_init failed: %s"
 
msgstr "falló pthread_mutex_init: %s"
 
#: gold-threads.cc:116
#, c-format
msgid "pthread_mutexattr_destroy failed: %s"
 
msgstr "falló pthread_mutexattr_destroy: %s"
 
#: gold-threads.cc:123
#, c-format
msgid "pthread_mutex_destroy failed: %s"
 
msgstr "falló pthread_mutex_destroy: %s"
 
#: gold-threads.cc:131 gold-threads.cc:382
#, c-format
msgid "pthread_mutex_lock failed: %s"
 
msgstr "falló pthread_mutex_lock: %s"
 
#: gold-threads.cc:139 gold-threads.cc:394
#, c-format
msgid "pthread_mutex_unlock failed: %s"
 
msgstr "falló pthread_mutex_unlock: %s"
 
#: gold-threads.cc:220
#, c-format
msgid "pthread_cond_init failed: %s"
 
msgstr "falló pthread_cond_init: %s"
 
#: gold-threads.cc:227
#, c-format
msgid "pthread_cond_destroy failed: %s"
 
msgstr "falló pthread_cond_destroy: %s"
 
#: gold-threads.cc:236
#, c-format
msgid "pthread_cond_wait failed: %s"
 
msgstr "falló pthread_cond_wait: %s"
 
#: gold-threads.cc:244
#, c-format
msgid "pthread_cond_signal failed: %s"
 
msgstr "falló pthread_cond_signal: %s"
 
#: gold-threads.cc:252
#, c-format
msgid "pthread_cond_broadcast failed: %s"
 
msgstr "falló pthread_cond_broadcast: %s"
 
#: gold-threads.cc:388
#, c-format
msgid "pthread_once failed: %s"
 
msgstr "falló pthread_once: %s"
 
#: gold.cc:91
#, c-format
580,38 → 581,38
#: gold.cc:407
#, c-format
msgid "cannot mix -static with dynamic object %s"
 
msgstr "no se puede mezclar -static con el objeto dinámico %s"
 
#: gold.cc:411
#, c-format
msgid "cannot mix -r with dynamic object %s"
 
msgstr "no se puede mezclar -r con el objeto dinámico %s"
 
#: gold.cc:415
#, c-format
msgid "cannot use non-ELF output format with dynamic object %s"
 
msgstr "no se puede usar un formato de salida diferente a ELF con el objeto dinámico %s"
 
#: gold.cc:427
#, c-format
msgid "cannot mix split-stack '%s' and non-split-stack '%s' when using -r"
 
msgstr "no se puede mezclar la división-pila '%s' y la no-división-pila '%s' al usar -r"
 
#. FIXME: This needs to specify the location somehow.
#: i386.cc:232 i386.cc:1669 sparc.cc:234 sparc.cc:2395 x86_64.cc:237
#: x86_64.cc:1732
msgid "missing expected TLS relocation"
 
msgstr "falta la reubicación TLS esperada"
 
#: i386.cc:944 x86_64.cc:1068
#, c-format
msgid "section symbol %u has bad shndx %u"
 
msgstr "el símbolo de sección %u tiene shndx %u erróneo"
 
#: i386.cc:1036 i386.cc:1060 sparc.cc:1777 x86_64.cc:1176 x86_64.cc:1204
#, c-format
msgid "local symbol %u has bad shndx %u"
 
msgstr "el símbolo local %u tiene shndx %u erróneo"
 
#: i386.cc:1991
msgid "both SUN and GNU model TLS relocations"
620,48 → 621,48
#: i386.cc:2730 x86_64.cc:2719
#, c-format
msgid "failed to match split-stack sequence at section %u offset %0zx"
 
msgstr "falló al coincidir la secuencia dividir-pila en la sección %u desplazamiento %0zx"
 
#: icf.cc:616
#, c-format
msgid "%s: ICF Converged after %u iteration(s)"
 
msgstr "%s: Convergió ICF después de %u iteracion(es)"
 
#: icf.cc:619
#, c-format
msgid "%s: ICF stopped after %u iteration(s)"
 
msgstr "%s: Se detiene ICF después de %u iteracion(es)"
 
#: icf.cc:633
#, c-format
msgid "Could not find symbol %s to unfold\n"
 
msgstr "No se puede encontrar el símbolo %s para desincorporar\n"
 
#: incremental.cc:242
#, c-format
msgid "the link might take longer: cannot perform incremental link: %s"
 
msgstr "el enlazado puede tardar más: no se puede realizar el enlazado incremental: %s"
 
#: incremental.cc:302
msgid "no incremental data from previous build"
 
msgstr "no se encontraron datos incrementales de la compilación anterior"
 
#: incremental.cc:309 incremental.cc:332
msgid "invalid incremental build data"
 
msgstr "datos de compilación incremental inválidos"
 
#: incremental.cc:321
msgid "different version of incremental build data"
 
msgstr "versión diferente de datos de compilación incremental"
 
#: incremental.cc:338
msgid "command line changed"
 
msgstr "cambió la línea de órdenes"
 
#: incremental.cc:362
#, c-format
msgid "unsupported ELF machine number %d"
 
msgstr "no se admite el número de máquina ELF %d"
 
#: incremental.cc:387
msgid "output is not an ELF file."
686,12 → 687,12
#: layout.cc:1887
#, c-format
msgid "--build-id=uuid failed: could not open /dev/urandom: %s"
 
msgstr "falló --build-id=uuid: no se puede abrir /dev/urandom: %s"
 
#: layout.cc:1894
#, c-format
msgid "/dev/urandom: read failed: %s"
 
msgstr "/dev/urandom: falló la lectura: %s"
 
#: layout.cc:1896
#, c-format
701,7 → 702,7
#: layout.cc:1918
#, c-format
msgid "--build-id argument '%s' not a valid hex number"
 
msgstr "el argumento '%s' de --build-id no es un número hexadecimal válido"
 
#: layout.cc:1924
#, c-format
729,7 → 730,7
"Archive member included because of file (symbol)\n"
"\n"
msgstr ""
 
"Se incluyó el miembro del archivo debido al fichero (símbolo)\n"
"\n"
 
#: mapfile.cc:159
739,7 → 740,7
"Allocating common symbols\n"
msgstr ""
"\n"
 
"Se asignan los símbolos comunes\n"
 
#: mapfile.cc:161
#, c-format
747,7 → 748,7
"Common symbol size file\n"
"\n"
msgstr ""
 
"Símbolo común tamaño fichero\n"
"\n"
 
#: mapfile.cc:195
775,16 → 776,16
#: merge.cc:455
#, c-format
msgid "%s: %s merged constants size: %lu; input: %zu; output: %zu\n"
 
msgstr "%s: %s constantes mezcladas tamaño: %lu; entrada: %zu; salida: %zu\n"
 
#: merge.cc:478
msgid "mergeable string section length not multiple of character size"
 
msgstr "la longitud de la sección de cadenas mezclables no es un múltiplo del tamaño de carácter"
 
#: merge.cc:494
#, c-format
msgid "%s: last entry in mergeable string section '%s' not null terminated"
 
msgstr "%s: la última entrada en la sección de cadenas mezclables '%s' no está terminada con null"
 
#: merge.cc:613
#, c-format
801,17 → 802,17
 
#: object.cc:75
msgid "missing SHT_SYMTAB_SHNDX section"
 
msgstr "falta la sección SHT_SYMTAB_SHNDX"
 
#: object.cc:119
#, c-format
msgid "symbol %u out of range for SHT_SYMTAB_SHNDX section"
 
msgstr "el símbolo %u está fuera de rango para la sección SHT_SYMTAB_SHNDX"
 
#: object.cc:126
#, c-format
msgid "extended index for symbol %u out of range: %u"
 
msgstr "el índice extendido para el símbolo %u está fuera de rango: %u"
 
#: object.cc:148 object.cc:2331 output.cc:4052
#, c-format
821,76 → 822,76
#: object.cc:190
#, c-format
msgid "section name section has wrong type: %u"
 
msgstr "la sección de nombre de sección tiene tipo erróneo: %u"
 
#: object.cc:546
#, c-format
msgid "invalid symbol table name index: %u"
 
msgstr "índice de nombre de tabla de símbolos erróneo: %u"
 
#: object.cc:552
#, c-format
msgid "symbol table name section has wrong type: %u"
 
msgstr "la sección de nombre de tabla de símbolos tiene tipo erróneo: %u"
 
#: object.cc:641
#, c-format
msgid "section group %u info %u out of range"
 
msgstr "la sección grupo %u info %u está fuera de rango"
 
#: object.cc:660
#, c-format
msgid "symbol %u name offset %u out of range"
 
msgstr "el símbolo %u nombre desplazamiento %u está fuera de rango"
 
#: object.cc:678
#, c-format
msgid "symbol %u invalid section index %u"
 
msgstr "el símbolo %u tiene un índice de sección %u inválido"
 
#: object.cc:723
#, c-format
msgid "section %u in section group %u out of range"
 
msgstr "la sección %u en el grupo de sección %u está fuera de rango"
 
#: object.cc:731
#, c-format
msgid "invalid section group %u refers to earlier section %u"
 
msgstr "el grupo de sección %u inválido se refiere a la sección %u anterior"
 
#: object.cc:1037 reloc.cc:271 reloc.cc:838
#, c-format
msgid "relocation section %u has bad info %u"
 
msgstr "la sección de reubicación %u tiene información %u errónea"
 
#: object.cc:1231
#, c-format
msgid "%s: removing unused section from '%s' in file '%s'"
 
msgstr "%s: se borra la sección sin usar de '%s' en el fichero '%s'"
 
#: object.cc:1257
#, c-format
msgid "%s: ICF folding section '%s' in file '%s'into '%s' in file '%s'"
 
msgstr "%s: la sección de incorporación ICF '%s' en el fichero '%s' dentro de '%s' en el fichero '%s'"
 
#: object.cc:1454
msgid "size of symbols is not multiple of symbol size"
 
msgstr "el tamaño de los símbolos no es un múltiplo del tamaño de símbolo"
 
#: object.cc:1563
#, c-format
msgid "local symbol %u section name out of range: %u >= %u"
 
msgstr "el nombre de sección del símbolo local %u está fuera de rango: %u >= %u"
 
#: object.cc:1652
#, c-format
msgid "unknown section index %u for local symbol %u"
 
msgstr "índice de sección %u desconocido para el símbolo local %u"
 
#: object.cc:1661
#, c-format
msgid "local symbol %u section index %u out of range"
 
msgstr "el símbolo local %u índice de sección %u está fuera de rango"
 
#: object.cc:2169
#, c-format
900,7 → 901,7
#: object.cc:2273
#, c-format
msgid "%s: unsupported ELF machine number %d"
 
msgstr "%s: no se admite el número de máquina ELF %d"
 
#: object.cc:2283
#, c-format
910,22 → 911,22
#: object.cc:2347 plugin.cc:1019
#, c-format
msgid "%s: not configured to support 32-bit big-endian object"
 
msgstr "%s: no se configuró para admitir objetos big-endian de 32-bit"
 
#: object.cc:2363 plugin.cc:1028
#, c-format
msgid "%s: not configured to support 32-bit little-endian object"
 
msgstr "%s: no se configuró para admitir objetos little-endian de 32-bit"
 
#: object.cc:2382 plugin.cc:1040
#, c-format
msgid "%s: not configured to support 64-bit big-endian object"
 
msgstr "%s: no se configuró para admitir objetos big-endian de 64-bit"
 
#: object.cc:2398 plugin.cc:1049
#, c-format
msgid "%s: not configured to support 64-bit little-endian object"
 
msgstr "%s: no se configuró para admitir objetos little-endian de 64-bit"
 
#: options.cc:156
#, c-format
951,17 → 952,17
#: options.cc:193 options.cc:203 options.cc:213
#, c-format
msgid "%s: invalid option value (expected an integer): %s"
 
msgstr "%s: valor de opción inválido (se esperaba un entero): %s"
 
#: options.cc:223
#, c-format
msgid "%s: invalid option value (expected a floating point number): %s"
 
msgstr "%s: valor de opción inválido (se esperaba un número de coma flotante): %s"
 
#: options.cc:232
#, c-format
msgid "%s: must take a non-empty argument"
 
msgstr "%s: debe tomar un argumento que no esté vacío"
 
#: options.cc:273
#, c-format
976,17 → 977,17
#: options.cc:409
#, c-format
msgid "unable to parse script file %s"
 
msgstr "no se puede decodificar el fichero de guión %s"
 
#: options.cc:417
#, c-format
msgid "unable to parse version script file %s"
 
msgstr "no se puede decodificar el fichero de guión de versión %s"
 
#: options.cc:425
#, c-format
msgid "unable to parse dynamic-list script file %s"
 
msgstr "no se puede decodificar el fichero de guión de lista dinámica %s"
 
#: options.cc:522
#, c-format
996,7 → 997,7
#: options.cc:538
#, c-format
msgid "%s: use the --help option for usage information\n"
 
msgstr "%s: use la opción --help para información de modo de empleo\n"
 
#: options.cc:547
#, c-format
1013,17 → 1014,17
 
#: options.cc:736
msgid "unknown -z option"
 
msgstr "opción -z desconocida"
 
#: options.cc:935
#, c-format
msgid "ignoring --threads: %s was compiled without thread support"
 
msgstr "se descarta --threads: %s se compiló sin soporte para hilos"
 
#: options.cc:942
#, c-format
msgid "ignoring --thread-count: %s was compiled without thread support"
 
msgstr "se descarta --thread-count: %s se compiló sin soporte para hilos"
 
#: options.cc:981
#, c-format
1048,7 → 1049,7
 
#: options.cc:1014
msgid "-retain-symbols-file does not yet work with -r"
 
msgstr "-retain-symbols-file aún no funciona con -r"
 
#: options.cc:1020
msgid "binary output format not compatible with -shared or -pie or -r"
1057,7 → 1058,7
#: options.cc:1026
#, c-format
msgid "--hash-bucket-empty-fraction value %g out of range [0.0, 1.0)"
 
msgstr "el valor %g de --hash-bucket-empty-fraction está fuera de rango [0.0, 1.0]"
 
#: options.cc:1031
msgid "Options --incremental-changed, --incremental-unchanged, --incremental-unknown require the use of --incremental"
1074,7 → 1075,7
#. I guess it's neither a long option nor a short option.
#: options.cc:1174
msgid "unknown option"
 
msgstr "opción desconocida"
 
#: options.cc:1201
#, c-format
1083,15 → 1084,15
 
#: options.h:571
msgid "Report usage information"
 
msgstr "Muestra la información de uso"
 
#: options.h:573
msgid "Report version information"
 
msgstr "Muestra la información de la versión"
 
#: options.h:575
msgid "Report version and target information"
 
msgstr "Muestra la información de la versión y el objetivo"
 
#: options.h:584 options.h:635
msgid "Not supported"
1111,7 → 1112,7
 
#: options.h:592
msgid "Only set DT_NEEDED for shared libraries if used"
 
msgstr "Sólo establece DT_NEEDED para las bibliotecas compartidas si se usan"
 
#: options.h:593
msgid "Always DT_NEEDED for shared libraries"
1131,11 → 1132,11
 
#: options.h:609
msgid "Bind defined symbols locally"
 
msgstr "Enlaza los símbolos definidos localmente"
 
#: options.h:612
msgid "Bind defined function symbols locally"
 
msgstr "Enlaza los símbolos de función localmente"
 
#: options.h:615
msgid "Generate build ID note"
1163,11 → 1164,11
 
#: options.h:639
msgid "Define common symbols"
 
msgstr "Define símbolos comunes"
 
#: options.h:640
msgid "Do not define common symbols"
 
msgstr "No define símbolos comunes"
 
#: options.h:642 options.h:644
msgid "Alias for -d"
1175,7 → 1176,7
 
#: options.h:647
msgid "Turn on debugging"
 
msgstr "Activa la depuración"
 
#: options.h:648
msgid "[all,files,script,task][,...]"
1183,43 → 1184,43
 
#: options.h:651
msgid "Define a symbol"
 
msgstr "Define un símbolo"
 
#: options.h:651
msgid "SYMBOL=EXPRESSION"
 
msgstr "SÍMBOLO=EXPRESIÓN"
 
#: options.h:654
msgid "Demangle C++ symbols in log messages"
 
msgstr "Desenreda los símbolos C++ en los mensajes de registro"
 
#: options.h:658
msgid "Do not demangle C++ symbols in log messages"
 
msgstr "No desenreda los símbolos C++ en los mensajes de registro"
 
#: options.h:662
msgid "Try to detect violations of the One Definition Rule"
 
msgstr "Trata de detectar las violaciones de la Regla de Una Definición"
 
#: options.h:666
msgid "Delete all temporary local symbols"
 
msgstr "Borra todos los símbolos locales temporales"
 
#: options.h:669
msgid "Add data symbols to dynamic symbols"
 
msgstr "Agrega los símbolos de datos a los símbolos dinámicos"
 
#: options.h:672
msgid "Add C++ operator new/delete to dynamic symbols"
 
msgstr "Agrega el operador de C++ new/delete a los símbolos dinámicos"
 
#: options.h:675
msgid "Add C++ typeinfo to dynamic symbols"
 
msgstr "Agrega la información de tipo C++ a los símbolos dinámicos"
 
#: options.h:678
msgid "Read a list of dynamic symbols"
 
msgstr "Lee una lista de símbolos dinámicos"
 
#: options.h:678 options.h:732 options.h:766 options.h:893 options.h:921
msgid "FILE"
1227,27 → 1228,27
 
#: options.h:681
msgid "Set program start address"
 
msgstr "Establece la dirección de inicio del programa"
 
#: options.h:681 options.h:908 options.h:910 options.h:912
msgid "ADDRESS"
 
msgstr "DIRECCIÓN"
 
#: options.h:684
msgid "Exclude libraries from automatic export"
 
msgstr "Excluye las bibliotecas de la exportación automática"
 
#: options.h:688
msgid "Export all dynamic symbols"
 
msgstr "Exporta todos los símbolos dinámicos"
 
#: options.h:689
msgid "Do not export all dynamic symbols (default)"
 
msgstr "No exporta todos los símbolos dinámicos (por defecto)"
 
#: options.h:692
msgid "Create exception frame header"
 
msgstr "Crea un encabezado de marco de excepción"
 
#: options.h:695
msgid "Treat warnings as errors"
1264,7 → 1265,7
#: options.h:699 options.h:729 options.h:873 options.h:915 options.h:936
#: options.h:939
msgid "SYMBOL"
 
msgstr "SÍMBOLO"
 
#: options.h:702
msgid "Set shared library name"
1276,15 → 1277,15
 
#: options.h:705
msgid "Min fraction of empty buckets in dynamic hash"
 
msgstr "Fracción mínima de las cubos vacíos en la asociación dinámica"
 
#: options.h:706
msgid "FRACTION"
 
msgstr "FRACCIÓN"
 
#: options.h:709
msgid "Dynamic hash style"
 
msgstr "Estilo de asociación dinámica"
 
#: options.h:709
msgid "[sysv,gnu,both]"
1292,7 → 1293,7
 
#: options.h:713
msgid "Set dynamic linker path"
 
msgstr "Establece la ruta del enlazador dinámico"
 
#: options.h:713
msgid "PROGRAM"
1304,7 → 1305,7
 
#: options.h:717
msgid "Do a full build"
 
msgstr "Hace una compilación completa"
 
#: options.h:720
msgid "Assume files changed"
1324,7 → 1325,7
 
#: options.h:732
msgid "Read only symbol values from FILE"
 
msgstr "Lee sólo valores de símbolos del FICHERO"
 
#: options.h:735
msgid "Search for library LIBNAME"
1336,7 → 1337,7
 
#: options.h:738
msgid "Add directory to search path"
 
msgstr "Agrega el directorio a la ruta de búsqueda"
 
#: options.h:738 options.h:813 options.h:816 options.h:820 options.h:887
msgid "DIR"
1348,11 → 1349,11
 
#: options.h:741
msgid "EMULATION"
 
msgstr "EMULACIÓN"
 
#: options.h:744
msgid "Write map file on standard output"
 
msgstr "Escribe el fichero mapa en la salida estándar"
 
#: options.h:745
msgid "Write map file"
1368,11 → 1369,11
 
#: options.h:751
msgid "Do not page align data, do not make text readonly"
 
msgstr "No pagina los datos alineados, no hace el texto de sólo lectura"
 
#: options.h:752
msgid "Page align data, make text readonly"
 
msgstr "Pagina los datos alineados, hace el texto de sólo lectura"
 
#: options.h:755
msgid "Enable use of DT_RUNPATH and DT_FLAGS"
1384,11 → 1385,11
 
#: options.h:759
msgid "Create an output file even if errors occur"
 
msgstr "Crea un fichero de salida aún si ocurren errores"
 
#: options.h:762 options.h:958
msgid "Report undefined symbols (even with --shared)"
 
msgstr "Reporta símbolos sin definir (aún con --shared)"
 
#: options.h:766
msgid "Set output file name"
1396,7 → 1397,7
 
#: options.h:769
msgid "Optimize output file size"
 
msgstr "Optimiza el tamaño del fichero de salida"
 
#: options.h:769
msgid "LEVEL"
1412,7 → 1413,7
 
#: options.h:775 options.h:777
msgid "Create a position independent executable"
 
msgstr "Crea un ejecutable independiente de posición"
 
#: options.h:782
msgid "Load a plugin library"
1424,19 → 1425,19
 
#: options.h:784
msgid "Pass an option to the plugin"
 
msgstr "Pasa una opción al plugin"
 
#: options.h:784
msgid "OPTION"
 
msgstr "OPCIÓN"
 
#: options.h:788
msgid "Preread archive symbols when multi-threaded"
 
msgstr "Prelee los símbolos de archivo cuando es multi-hilos"
 
#: options.h:791
msgid "Print symbols defined and used for each input"
 
msgstr "Muestra los símbolos definidos y usados por cada entrada"
 
#: options.h:795
msgid "Ignored for SVR4 compatibility"
1456,7 → 1457,7
 
#: options.h:807
msgid "keep only symbols listed in this file"
 
msgstr "mantiene sólo los símbolos enlistados en este fichero"
 
#: options.h:807
msgid "[file]"
1464,43 → 1465,43
 
#: options.h:813 options.h:816
msgid "Add DIR to runtime search path"
 
msgstr "Agrega el DIRectorio a la ruta de búsqueda de tiempo de ejecución"
 
#: options.h:819
msgid "Add DIR to link time shared library search path"
 
msgstr "Agrega el DIRectorio a la ruta de búsqueda de bibliotecas compartidas en tiempo de enlace"
 
#: options.h:823
msgid "Strip all symbols"
 
msgstr "Descarta todos los símbolos"
 
#: options.h:825
msgid "Strip debugging information"
 
msgstr "Descarta la información de depuración"
 
#: options.h:827
msgid "Emit only debug line number information"
 
msgstr "Sólo emite la información de número de línea de depuración"
 
#: options.h:829
msgid "Strip debug symbols that are unused by gdb (at least versions <= 6.7)"
 
msgstr "Descarta los símbolos de depuración que no usa gdb (por lo menos las versiones <= 6.7)"
 
#: options.h:832
msgid "Strip LTO intermediate code sections"
 
msgstr "Descarta las secciones de código intermedio LTO"
 
#: options.h:835
msgid "(ARM only) The maximum distance from instructions in a group of sections to their stubs. Negative values mean stubs are always after the group. 1 means using default size.\n"
 
msgstr "(Sólo ARM) La distancia máxima de las instrucciones en un grupo de secciones a sus cabos. Los valores negativos significan que los cabos siempre van después del grupo. 1 significa usar el tamaño por defecto.\n"
 
#: options.h:838 options.h:852 options.h:956 options.h:975
msgid "SIZE"
 
msgstr "TAMAÑO"
 
#: options.h:841
msgid "Use less memory and more disk I/O (included only for compatibility with GNU ld)"
 
msgstr "Usa menos memoria y más E/S de disco (sólo se incluye por compatibilidad con ld de GNU)"
 
#: options.h:845 options.h:848
msgid "Generate shared library"
1508,7 → 1509,7
 
#: options.h:851
msgid "Stack size when -fsplit-stack function calls non-split"
 
msgstr "Tamaño de la pila cuando la función -fsplit-stack llama a algo que no está dividido"
 
#: options.h:857
msgid "Do not link against shared libraries"
1516,11 → 1517,11
 
#: options.h:860
msgid "Identical Code Folding. '--icf=safe' folds only ctors and dtors."
 
msgstr "Incorporación de Código Idéntico (ICF por sus siglas en inglés). '--icf=safe' sólo incorpora ctors y dtors."
 
#: options.h:866
msgid "Number of iterations of ICF (default 2)"
 
msgstr "Número de iteraciones de ICF (por defecto 2)"
 
#: options.h:866 options.h:899 options.h:901 options.h:903 options.h:905
msgid "COUNT"
1528,15 → 1529,15
 
#: options.h:869
msgid "List folded identical sections on stderr"
 
msgstr "Enlista las secciones idénticas incorporadas en la salida de error estándar"
 
#: options.h:870
msgid "Do not list folded identical sections"
 
msgstr "No enlista las secciones idénticas incorporadas"
 
#: options.h:873
msgid "Do not fold this symbol during ICF"
 
msgstr "No incorpora este símbolo durante ICF"
 
#: options.h:876
msgid "Remove unused sections"
1548,7 → 1549,7
 
#: options.h:880
msgid "List removed unused sections on stderr"
 
msgstr "Enlista las secciones sin uso borradas en la salida de error estándar"
 
#: options.h:881
msgid "Do not list removed unused sections"
1556,11 → 1557,11
 
#: options.h:884
msgid "Print resource usage statistics"
 
msgstr "Muestra las estadísticas de uso de recursos"
 
#: options.h:887
msgid "Set target system root directory"
 
msgstr "Establece el directorio raíz del sistema objetivo"
 
#: options.h:890
msgid "Print the name of each input file"
1568,7 → 1569,7
 
#: options.h:893
msgid "Read linker script"
 
msgstr "Lee el guión del enlazador"
 
#: options.h:896
msgid "Run the linker multi-threaded"
1580,51 → 1581,51
 
#: options.h:899
msgid "Number of threads to use"
 
msgstr "Número de hilos a usar"
 
#: options.h:901
msgid "Number of threads to use in initial pass"
 
msgstr "Número de hilos a usar en el paso inicial"
 
#: options.h:903
msgid "Number of threads to use in middle pass"
 
msgstr "Número de hilos a usar en el paso medio"
 
#: options.h:905
msgid "Number of threads to use in final pass"
 
msgstr "Número de hilos a usar en el paso final"
 
#: options.h:908
msgid "Set the address of the bss segment"
 
msgstr "Establece la dirección del segmento bss"
 
#: options.h:910
msgid "Set the address of the data segment"
 
msgstr "Establece la dirección del segmento data"
 
#: options.h:912
msgid "Set the address of the text segment"
 
msgstr "Establece la dirección del segmento text"
 
#: options.h:915
msgid "Create undefined reference to SYMBOL"
 
msgstr "Crea una referencia sin definir hacia el SÍMBOLO"
 
#: options.h:918
msgid "Synonym for --debug=files"
 
msgstr "Sinónimo para --debug=files"
 
#: options.h:921
msgid "Read version script"
 
msgstr "Lee el guión de versión"
 
#: options.h:924
msgid "Warn about duplicate common symbols"
 
msgstr "Avisa sobre símbolos comunes duplicados"
 
#: options.h:925
msgid "Do not warn about duplicate common symbols (default)"
 
msgstr "No avisa sobre símbolos comunes duplicados (por defecto)"
 
#: options.h:928
msgid "Warn when skipping an incompatible library"
1640,19 → 1641,19
 
#: options.h:933
msgid "Include only needed archive contents"
 
msgstr "Incluye sólo los contenidos del archivo necesarios"
 
#: options.h:936
msgid "Use wrapper functions for SYMBOL"
 
msgstr "Usa funciones de envoltura para el SÍMBOLO"
 
#: options.h:939
msgid "Trace references to symbol"
 
msgstr "Rastrea las referencias al símbolo"
 
#: options.h:942
msgid "Default search path for Solaris compatibility"
 
msgstr "Ruta de búsqueda por defecto para compatibilidad con Solaris"
 
#: options.h:943
msgid "PATH"
1660,23 → 1661,23
 
#: options.h:946
msgid "Start a library search group"
 
msgstr "Inicia un grupo de búsqueda de bibliotecas"
 
#: options.h:948
msgid "End a library search group"
 
msgstr "Termina un grupo de búsqueda de bibliotecas"
 
#: options.h:953
msgid "Sort dynamic relocs"
 
msgstr "Ordena las reubicaciones dinámicas"
 
#: options.h:954
msgid "Do not sort dynamic relocs"
 
msgstr "No ordena las reubicaciones dinámicas"
 
#: options.h:956
msgid "Set common page size to SIZE"
 
msgstr "Establece el tamaño de página común a TAMAÑO"
 
#: options.h:961
msgid "Mark output as requiring executable stack"
1684,7 → 1685,7
 
#: options.h:963
msgid "Mark DSO to be initialized first at runtime"
 
msgstr "Marca el DSO para inicializarse primero en tiempo de ejecución"
 
#: options.h:966
msgid "Mark object to interpose all DSOs but executable"
1692,7 → 1693,7
 
#: options.h:969
msgid "Mark object for lazy runtime binding (default)"
 
msgstr "Marca el objeto para enlazado en tiempo de ejecución laxo (por defecto)"
 
#: options.h:972
msgid "Mark object requiring immediate process"
1700,7 → 1701,7
 
#: options.h:975
msgid "Set maximum page size to SIZE"
 
msgstr "Establece el tamaño máximo de página a TAMAÑO"
 
#: options.h:978
msgid "Do not create copy relocs"
1708,11 → 1709,11
 
#: options.h:980
msgid "Mark object not to use default search paths"
 
msgstr "Marca el objeto para no usar las rutas de búsqueda por defecto"
 
#: options.h:983
msgid "Mark DSO non-deletable at runtime"
 
msgstr "Marca el DSO como no eliminable en tiempo de ejecución"
 
#: options.h:986
msgid "Mark DSO not available to dlopen"
1728,43 → 1729,43
 
#: options.h:994
msgid "Mark object for immediate function binding"
 
msgstr "Marca el objeto para enlace de función inmediato"
 
#: options.h:997
msgid "Mark DSO to indicate that needs immediate $ORIGIN processing at runtime"
 
msgstr "Marca el DSO para indicar que requiere procesamiento de $ORIGIN inmediato en tiempo de ejecución"
 
#: options.h:1000
msgid "Where possible mark variables read-only after relocation"
 
msgstr "Marca las variables como sólo lectura después de la reubicación cuando es posible"
 
#: options.h:1001
msgid "Don't mark variables read-only after relocation"
 
msgstr "No marca las variables como sólo lectura después de la reubicación"
 
#: output.cc:1132
msgid "section group retained but group element discarded"
 
msgstr "se retiene el grupo de sección pero se descarta el elemento de grupo"
 
#: output.cc:1860
#, c-format
msgid "invalid alignment %lu for section \"%s\""
 
msgstr "alineación %lu inválida para la sección \"%s\""
 
#: output.cc:3573
#, c-format
msgid "dot moves backward in linker script from 0x%llx to 0x%llx"
 
msgstr "el punto se mueve hacia atrás en el guión del enlazador de 0x%llx a 0x%llx"
 
#: output.cc:3576
#, c-format
msgid "address of section '%s' moves backward from 0x%llx to 0x%llx"
 
msgstr "la dirección de la sección '%s' se mueve hacia atrás de 0x%llx a 0x%llx"
 
#: output.cc:3755
#, c-format
msgid "nobits section %s may not precede progbits section %s in same segment"
 
msgstr "la sección nobits %s puede no preceder a la sección progbits %s en el mismo segmento"
 
#: output.cc:3907 output.cc:3975
#, c-format
1784,7 → 1785,7
#: output.cc:4085
#, c-format
msgid "%s: mmap: failed to allocate %lu bytes for output file: %s"
 
msgstr "%s: mmap: falló al reservar %lu bytes para el fichero de salida: %s"
 
#: output.cc:4096
#, c-format
1794,7 → 1795,7
#: output.cc:4115
#, c-format
msgid "%s: write: unexpected 0 return-value"
 
msgstr "%s: wirte: valor de devolución 0 inesperado"
 
#: output.cc:4117
#, c-format
1808,7 → 1809,7
 
#: output.h:520
msgid "** section headers"
 
msgstr "** encabezados de sección"
 
#: output.h:565
msgid "** segment headers"
1828,7 → 1829,7
 
#: output.h:1300
msgid "** dynamic relocs"
 
msgstr "** reubicaciones dinámicas"
 
#: output.h:1301 output.h:1637
msgid "** relocs"
1844,7 → 1845,7
 
#: output.h:1916
msgid "** dynamic"
 
msgstr "** dinámico"
 
#: output.h:2039
msgid "** symtab xindex"
1867,17 → 1868,17
 
#: plugin.cc:426
msgid "Input files added by plug-ins in --incremental mode not supported yet.\n"
 
msgstr "Aún no se admiten los ficheros de entrada agregados por plug-ins en el modo --incremental.\n"
 
#: powerpc.cc:1502 sparc.cc:2307 x86_64.cc:1632
#, c-format
msgid "%s: unsupported REL reloc section"
 
msgstr "%s: no se admite la sección de reubicación REL"
 
#: readsyms.cc:191
#, c-format
msgid "%s: file is empty"
 
msgstr "%s: el fichero está vacío"
 
#. Here we have to handle any other input file types we need.
#: readsyms.cc:575
1887,38 → 1888,38
 
#: reduced_debug_output.cc:236
msgid "Debug abbreviations extend beyond .debug_abbrev section; failed to reduce debug abbreviations"
 
msgstr "Las abreviaciones de depuración se extienden más allá de la sección .debug_abbrev; falló al reducir las abreviaciones de depuración"
 
#: reduced_debug_output.cc:322
msgid "Extremely large compile unit in debug info; failed to reduce debug info"
 
msgstr "Unidad de compilación extremadamente grande en la información de depuración; falló al reducir la información de depuración"
 
#: reduced_debug_output.cc:330
msgid "Debug info extends beyond .debug_info section;failed to reduce debug info"
 
msgstr "La información de depuración se extiende más allá de la sección .debug_info; falló al reducir la información de depuración"
 
#: reduced_debug_output.cc:350 reduced_debug_output.cc:392
msgid "Invalid DIE in debug info; failed to reduce debug info"
 
msgstr "DIE inválido en la información de depuración; falló al reducir la información de depuración"
 
#: reduced_debug_output.cc:373
msgid "Debug info extends beyond .debug_info section; failed to reduce debug info"
 
msgstr "La información de depuración se extiende más allá de la sección .debug_info; falló al reducir la información de depuración"
 
#: reloc.cc:297 reloc.cc:858
#, c-format
msgid "relocation section %u uses unexpected symbol table %u"
 
msgstr "la sección de reubicación %u usa la tabla de símbolos inesperada %u"
 
#: reloc.cc:312 reloc.cc:875
#, c-format
msgid "unexpected entsize for reloc section %u: %lu != %u"
 
msgstr "tamaño de entidad inesperado para la sección de reubicación %u: %lu != %u"
 
#: reloc.cc:321 reloc.cc:884
#, c-format
msgid "reloc section %u size %lu uneven"
 
msgstr "sección de reubicación %u tamaño %lu disparejo"
 
#: reloc.cc:1203
#, c-format
1928,19 → 1929,19
#: reloc.cc:1343
#, c-format
msgid "reloc section size %zu is not a multiple of reloc size %d\n"
 
msgstr "el tamaño de la sección de reubicación %zu no es un múltiplo del tamaño de reubicación %d\n"
 
#. We should only see externally visible symbols in the symbol
#. table.
#: resolve.cc:191
msgid "invalid STB_LOCAL symbol in external symbols"
 
msgstr "símbolo STB_LOCAL inválido en símbolos externos"
 
#. Any target which wants to handle STB_LOOS, etc., needs to
#. define a resolve method.
#: resolve.cc:197
msgid "unsupported symbol binding"
 
msgstr "no se admite el enlace de símbolos"
 
#. A dynamic object cannot reference a hidden or internal symbol
#. defined in another object.
1947,54 → 1948,54
#: resolve.cc:266
#, c-format
msgid "%s symbol '%s' in %s is referenced by DSO %s"
 
msgstr "%s símbolo '%s' en %s es referenciado por el DSO %s"
 
#: resolve.cc:326
#, c-format
msgid "common of '%s' overriding smaller common"
 
msgstr "el común de '%s' sobreescribe un común más pequeño"
 
#: resolve.cc:331
#, c-format
msgid "common of '%s' overidden by larger common"
 
msgstr "el común de '%s' es sobreescrito por un común más grande"
 
#: resolve.cc:336
#, c-format
msgid "multiple common of '%s'"
 
msgstr "comunes múltiples de '%s'"
 
#: resolve.cc:442
#, c-format
msgid "multiple definition of '%s'"
 
msgstr "definición múltiple de '%s'"
 
#: resolve.cc:481
#, c-format
msgid "definition of '%s' overriding common"
 
msgstr "la definición de '%s' sobreescribe el común"
 
#: resolve.cc:516
#, c-format
msgid "definition of '%s' overriding dynamic common definition"
 
msgstr "la definición de '%s' sobreescribe la definición común dinámica"
 
#: resolve.cc:636
#, c-format
msgid "common '%s' overridden by previous definition"
 
msgstr "el común '%s' se sobreescribe por la definición previa"
 
#: resolve.cc:766 resolve.cc:778
msgid "command line"
 
msgstr "línea de órdenes"
 
#: script-sections.cc:690
msgid "dot may not move backward"
 
msgstr "dot tal vez mueve hacia atrás"
 
#: script-sections.cc:757
msgid "** expression"
 
msgstr "** expresión"
 
#: script-sections.cc:941
msgid "fill value is not absolute"
2003,17 → 2004,17
#: script-sections.cc:1913
#, c-format
msgid "alignment of section %s is not absolute"
 
msgstr "la alineación de la sección %s no es absoluta"
 
#: script-sections.cc:1957
#, c-format
msgid "subalign of section %s is not absolute"
 
msgstr "la subalineación de la sección %s no es absoluta"
 
#: script-sections.cc:1972
#, c-format
msgid "fill of section %s is not absolute"
 
msgstr "el relleno de la sección %s no es absoluto"
 
#: script-sections.cc:2048
msgid "SPECIAL constraints are not implemented"
2021,15 → 2022,15
 
#: script-sections.cc:2090
msgid "mismatched definition for constrained sections"
 
msgstr "no coincide la definición para las secciones restringidas"
 
#: script-sections.cc:2634
msgid "DATA_SEGMENT_ALIGN may only appear once in a linker script"
 
msgstr "DATA_SEGMENT_ALIGN sólo puede aparecer una vez en un guión de enlazado"
 
#: script-sections.cc:2649
msgid "DATA_SEGMENT_RELRO_END may only appear once in a linker script"
 
msgstr "DATA_SEGMENT_RELRO_END sólo puede aparecer una vez en un guión de enlazado"
 
#: script-sections.cc:2654
msgid "DATA_SEGMENT_RELRO_END must follow DATA_SEGMENT_ALIGN"
2037,7 → 2038,7
 
#: script-sections.cc:2826
msgid "no matching section constraint"
 
msgstr "no coincide la restricción de sección"
 
#: script-sections.cc:3151
msgid "TLS sections are not adjacent"
2045,7 → 2046,7
 
#: script-sections.cc:3280
msgid "allocated section not in any segment"
 
msgstr "la sección alojada no está en ningún segmento"
 
#: script-sections.cc:3309
#, c-format
2054,37 → 2055,37
 
#: script-sections.cc:3323
msgid "section in two PT_LOAD segments"
 
msgstr "sección en dos segmentos PT_LOAD"
 
#: script-sections.cc:3330
msgid "allocated section not in any PT_LOAD segment"
 
msgstr "la sección alojada no está en ningún segmento PT_LOAD"
 
#: script-sections.cc:3358
msgid "may only specify load address for PT_LOAD segment"
 
msgstr "sólo se puede especificar dirección de carga para un segmento PT_LOAD"
 
#: script-sections.cc:3382
#, c-format
msgid "PHDRS load address overrides section %s load address"
 
msgstr "la dirección de carga PHDRS sobreescribe la dirección de carga de la sección %s"
 
#. We could support this if we wanted to.
#: script-sections.cc:3393
msgid "using only one of FILEHDR and PHDRS is not currently supported"
 
msgstr "no se admite sólo usar uno de FILEHDR y PHDRS"
 
#: script-sections.cc:3408
msgid "sections loaded on first page without room for file and program headers are not supported"
 
msgstr "no se admiten las secciones cargadas en la primera página sin espacio para ficheros y encabezados de programa"
 
#: script-sections.cc:3414
msgid "using FILEHDR and PHDRS on more than one PT_LOAD segment is not currently supported"
 
msgstr "no se admite usar FILEHDR y PHDRS en más de un segmento PT_LOAD"
 
#: script.cc:1072
msgid "invalid use of PROVIDE for dot symbol"
 
msgstr "uso inválido de PROVIDE para el símbolo dot"
 
#: script.cc:2132
#, c-format
2096,17 → 2097,17
#: script.cc:2297
#, c-format
msgid "%s:%d:%d: ignoring command OPTION; OPTION is only valid for scripts specified via -T/--script"
 
msgstr "%s:%d:%d se descarta la orden OPTION; OPTION sólo es válido para guiones especificados a través de -T/--script"
 
#: script.cc:2362
#, c-format
msgid "%s:%d:%d: ignoring SEARCH_DIR; SEARCH_DIR is only valid for scripts specified via -T/--script"
 
msgstr "%s:%d:%d: se descarta SEARCH_DIR; SEARCH_DIR sólo es válido para guiones especificados a través de -T/--script"
 
#: script.cc:2606 script.cc:2620
#, c-format
msgid "%s:%d:%d: DATA_SEGMENT_ALIGN not in SECTIONS clause"
 
msgstr "%s:%d:%d: DATA_SEGMENT_ALIGN no está en la cláusula SECTIONS"
 
#: script.cc:2739
msgid "unknown PHDR type (try integer)"
2135,12 → 2136,12
#: symtab.cc:859
#, c-format
msgid "%s: definition of %s"
 
msgstr "%s: definición de '%s'"
 
#: symtab.cc:1052
#, c-format
msgid "bad global symbol name offset %u at %zu"
 
msgstr "desplazamiento de nombres de símbol global %u erróneo en %zu"
 
#: symtab.cc:1278
msgid "--just-symbols does not make sense with a shared object"
2148,51 → 2149,51
 
#: symtab.cc:1284
msgid "too few symbol versions"
 
msgstr "faltan versiones de símbolo"
 
#: symtab.cc:1333
#, c-format
msgid "bad symbol name offset %u at %zu"
 
msgstr "desplazamiento de nombre de símbolo %u erróneno en %zu"
 
#: symtab.cc:1396
#, c-format
msgid "versym for symbol %zu out of range: %u"
 
msgstr "versym para el símbolo %zu está fuera de rango: %u"
 
#: symtab.cc:1404
#, c-format
msgid "versym for symbol %zu has no name: %u"
 
msgstr "versym para el símbolo %zu no tienen nombre: %u"
 
#: symtab.cc:2549 symtab.cc:2681
#, c-format
msgid "%s: unsupported symbol section 0x%x"
 
msgstr "%s: no se admitide la sección de símbolo 0x%x"
 
#: symtab.cc:2933
#, c-format
msgid "%s: symbol table entries: %zu; buckets: %zu\n"
 
msgstr "%s: entradas de tabla de símbolos: %zu; cubos: %zu\n"
 
#: symtab.cc:2936
#, c-format
msgid "%s: symbol table entries: %zu\n"
 
msgstr "%s: entradas de tabla de símbolo: %zu\n"
 
#: symtab.cc:3007
#, c-format
msgid "while linking %s: symbol '%s' defined in multiple places (possible ODR violation):"
 
msgstr "al enlazar %s: se definió el símbolo '%s' en varios lugares (posible violación ODR):"
 
#: target-reloc.h:259
msgid "relocation refers to discarded comdat section"
 
msgstr "la reubicación se refiere a la sección comdat descartada"
 
#: target-reloc.h:298
#, c-format
msgid "reloc has bad offset %zu"
 
msgstr "la reubicación tiene un desplazamiento %zu erróneo"
 
#: target.cc:90
#, c-format
2202,15 → 2203,15
#: target.cc:157
#, c-format
msgid "linker does not include stack split support required by %s"
 
msgstr "el enlazador no incluye el soporte de división de pila requerido por %s"
 
#: tls.h:59
msgid "TLS relocation out of range"
 
msgstr "reubicación TLS fuera de rango"
 
#: tls.h:73
msgid "TLS relocation against invalid instruction"
 
msgstr "reubicación TLS contra una instrucción inválida"
 
#. This output is intended to follow the GNU standards.
#: version.cc:65
2225,28 → 2226,28
"the GNU General Public License version 3 or (at your option) a later version.\n"
"This program has absolutely no warranty.\n"
msgstr ""
 
 
"Este programa es software libre; se puede redistribuir bajo los términos de\n"
"la Licencia Pública General de GNU versión 3 o (a su elección) una versión\n"
"posterior.\n"
 
"Este programa no tiene absolutamente ninguna garantía.\n"
 
#: workqueue-threads.cc:106
#, c-format
msgid "%s failed: %s"
 
msgstr "falló %s: %s"
 
#: x86_64.cc:2184
#, c-format
msgid "unsupported reloc type %u"
 
msgstr "no se admite el tipo de reubicación %u"
 
#: x86_64.cc:2524
#, c-format
msgid "unsupported reloc %u against local symbol"
 
msgstr "no se admite la reubicación %u contra un símbolo local"
 
#~ msgid " applied to section relative value"
 
#~ msgstr " se aplica al valor relativo a la sección"
 
#~ msgid "cannot find -l%s"
#~ msgstr "no se puede encontrar -l%s"
2255,31 → 2256,31
#~ msgstr "%s: el fichero ELF es demasiado corto"
 
#~ msgid "%s: invalid ELF version 0"
 
#~ msgstr "%s: versión ELF 0 inválida"
 
#~ msgid "%s: unsupported ELF version %d"
 
#~ msgstr "%s: no se admite la versión ELF %d"
 
#~ msgid "%s: invalid ELF class 0"
 
#~ msgstr "%s: clase ELF 0 inválida"
 
#~ msgid "%s: unsupported ELF class %d"
#~ msgstr "%s: no se admite la clase ELF %d"
 
#~ msgid "%s: invalid ELF data encoding"
 
#~ msgstr "%s: codificación de datos ELF inválida"
 
#~ msgid "%s: unsupported ELF data encoding %d"
 
#~ msgstr "%s: no se admite la codificación de datos ELF %d"
 
#~ msgid "%s: lseek: %s"
#~ msgstr "%s: lseek: %s"
 
#~ msgid "invalid assignment to dot outside of SECTIONS"
 
#~ msgstr "asignación inválida a dot fuera de SECTIONS"
 
#~ msgid "%s: undefined reference to '%s', version '%s'"
 
#~ msgstr "%s: referencia a '%s' sin definir, versión '%s'"
 
#~ msgid "%s: undefined reference to '%s'"
#~ msgstr "%s: referencia a '%s' sin definir"
/trunk/gnu/binutils/gold/po/POTFILES.in
1,5 → 1,10
archive.cc
archive.h
arm-reloc-property.cc
arm-reloc-property.h
arm.cc
attributes.cc
attributes.h
binary.cc
binary.h
common.cc
27,11 → 32,19
expression.cc
fileread.cc
fileread.h
freebsd.h
gc.cc
gc.h
gold-threads.cc
gold-threads.h
gold.cc
gold.h
i386.cc
icf.cc
icf.h
incremental.cc
int_encoding.cc
int_encoding.h
layout.cc
layout.h
mapfile.cc
46,6 → 59,8
output.h
parameters.cc
parameters.h
plugin.cc
plugin.h
powerpc.cc
readsyms.cc
readsyms.h
68,7 → 83,10
target-reloc.h
target-select.cc
target-select.h
target.cc
target.h
timer.cc
timer.h
tls.h
token.h
version.cc
/trunk/gnu/binutils/gold/x86_64.cc
1,6 → 1,6
// x86_64.cc -- x86_64 target support for gold.
 
// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
25,6 → 25,7
#include <cstring>
 
#include "elfcpp.h"
#include "dwarf.h"
#include "parameters.h"
#include "reloc.h"
#include "x86_64.h"
53,22 → 54,25
public:
typedef Output_data_reloc<elfcpp::SHT_RELA, true, 64, false> Reloc_section;
 
Output_data_plt_x86_64(Symbol_table* symtab, Layout* layout,
Output_data_got<64, false>* got,
Output_data_space* got_plt)
: Output_section_data(8), tlsdesc_rel_(NULL), got_(got), got_plt_(got_plt),
count_(0), tlsdesc_got_offset_(-1U), free_list_()
{ this->init(symtab, layout); }
Output_data_plt_x86_64(Layout* layout, Output_data_got<64, false>* got,
Output_data_space* got_plt,
Output_data_space* got_irelative)
: Output_section_data(16), layout_(layout), tlsdesc_rel_(NULL),
irelative_rel_(NULL), got_(got), got_plt_(got_plt),
got_irelative_(got_irelative), count_(0), irelative_count_(0),
tlsdesc_got_offset_(-1U), free_list_()
{ this->init(layout); }
 
Output_data_plt_x86_64(Symbol_table* symtab, Layout* layout,
Output_data_got<64, false>* got,
Output_data_plt_x86_64(Layout* layout, Output_data_got<64, false>* got,
Output_data_space* got_plt,
Output_data_space* got_irelative,
unsigned int plt_count)
: Output_section_data((plt_count + 1) * plt_entry_size, 8, false),
tlsdesc_rel_(NULL), got_(got), got_plt_(got_plt),
count_(plt_count), tlsdesc_got_offset_(-1U), free_list_()
: Output_section_data((plt_count + 1) * plt_entry_size, 16, false),
layout_(layout), tlsdesc_rel_(NULL), irelative_rel_(NULL), got_(got),
got_plt_(got_plt), got_irelative_(got_irelative), count_(plt_count),
irelative_count_(0), tlsdesc_got_offset_(-1U), free_list_()
{
this->init(symtab, layout);
this->init(layout);
 
// Initialize the free list and reserve the first entry.
this->free_list_.init((plt_count + 1) * plt_entry_size, false);
77,20 → 81,22
 
// Initialize the PLT section.
void
init(Symbol_table* symtab, Layout* layout);
init(Layout* layout);
 
// Add an entry to the PLT.
void
add_entry(Symbol* gsym);
add_entry(Symbol_table*, Layout*, Symbol* gsym);
 
// Add an entry to the PLT for a local STT_GNU_IFUNC symbol.
unsigned int
add_local_ifunc_entry(Sized_relobj_file<64, false>* relobj,
add_local_ifunc_entry(Symbol_table* symtab, Layout*,
Sized_relobj_file<64, false>* relobj,
unsigned int local_sym_index);
 
// Add the relocation for a PLT entry.
void
add_relocation(Symbol* gsym, unsigned int got_offset);
add_relocation(Symbol_table*, Layout*, Symbol* gsym,
unsigned int got_offset);
 
// Add the reserved TLSDESC_PLT entry to the PLT.
void
110,7 → 116,7
// Return the offset of the reserved TLSDESC_PLT entry.
unsigned int
get_tlsdesc_plt_offset() const
{ return (this->count_ + 1) * plt_entry_size; }
{ return (this->count_ + this->irelative_count_ + 1) * plt_entry_size; }
 
// Return the .rela.plt section data.
Reloc_section*
121,10 → 127,20
Reloc_section*
rela_tlsdesc(Layout*);
 
// Return where the IRELATIVE relocations should go in the PLT
// relocations.
Reloc_section*
rela_irelative(Symbol_table*, Layout*);
 
// Return whether we created a section for IRELATIVE relocations.
bool
has_irelative_section() const
{ return this->irelative_rel_ != NULL; }
 
// Return the number of PLT entries.
unsigned int
entry_count() const
{ return this->count_; }
{ return this->count_ + this->irelative_count_; }
 
// Return the offset of the first non-reserved PLT entry.
static unsigned int
144,6 → 160,14
(plt_index + 2) * plt_entry_size);
}
 
// Return the PLT address to use for a global symbol.
uint64_t
address_for_global(const Symbol*);
 
// Return the PLT address to use for a local symbol.
uint64_t
address_for_local(const Relobj*, unsigned int symndx);
 
protected:
void
do_adjust_output_section(Output_section* os);
160,14 → 184,20
// The first entry in the PLT.
// From the AMD64 ABI: "Unlike Intel386 ABI, this ABI uses the same
// procedure linkage table for both programs and shared objects."
static unsigned char first_plt_entry[plt_entry_size];
static const unsigned char first_plt_entry[plt_entry_size];
 
// Other entries in the PLT for an executable.
static unsigned char plt_entry[plt_entry_size];
static const unsigned char plt_entry[plt_entry_size];
 
// The reserved TLSDESC entry in the PLT for an executable.
static unsigned char tlsdesc_plt_entry[plt_entry_size];
static const unsigned char tlsdesc_plt_entry[plt_entry_size];
 
// The .eh_frame unwind information for the PLT.
static const int plt_eh_frame_cie_size = 16;
static const int plt_eh_frame_fde_size = 32;
static const unsigned char plt_eh_frame_cie[plt_eh_frame_cie_size];
static const unsigned char plt_eh_frame_fde[plt_eh_frame_fde_size];
 
// Set the final size.
void
set_final_data_size();
176,17 → 206,28
void
do_write(Output_file*);
 
// A pointer to the Layout class, so that we can find the .dynamic
// section when we write out the GOT PLT section.
Layout* layout_;
// The reloc section.
Reloc_section* rel_;
// The TLSDESC relocs, if necessary. These must follow the regular
// PLT relocs.
Reloc_section* tlsdesc_rel_;
// The IRELATIVE relocs, if necessary. These must follow the
// regular PLT relocations and the TLSDESC relocations.
Reloc_section* irelative_rel_;
// The .got section.
Output_data_got<64, false>* got_;
// The .got.plt section.
Output_data_space* got_plt_;
// The part of the .got.plt section used for IRELATIVE relocs.
Output_data_space* got_irelative_;
// The number of PLT entries.
unsigned int count_;
// Number of PLT entries with R_X86_64_IRELATIVE relocs. These
// follow the regular PLT entries.
unsigned int irelative_count_;
// Offset of the reserved TLSDESC_GOT entry when needed.
unsigned int tlsdesc_got_offset_;
// List of available regions within the section, for incremental
201,7 → 242,7
// 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 Target_freebsd<64, false>
class Target_x86_64 : public Sized_target<64, false>
{
public:
// In the x86_64 ABI (p 68), it says "The AMD64 ABI architectures
209,28 → 250,14
typedef Output_data_reloc<elfcpp::SHT_RELA, true, 64, false> Reloc_section;
 
Target_x86_64()
: Target_freebsd<64, false>(&x86_64_info),
got_(NULL), plt_(NULL), got_plt_(NULL), got_tlsdesc_(NULL),
global_offset_table_(NULL), rela_dyn_(NULL),
copy_relocs_(elfcpp::R_X86_64_COPY), dynbss_(NULL),
got_mod_index_offset_(-1U), tlsdesc_reloc_info_(),
: Sized_target<64, false>(&x86_64_info),
got_(NULL), plt_(NULL), got_plt_(NULL), got_irelative_(NULL),
got_tlsdesc_(NULL), global_offset_table_(NULL), rela_dyn_(NULL),
rela_irelative_(NULL), copy_relocs_(elfcpp::R_X86_64_COPY),
dynbss_(NULL), got_mod_index_offset_(-1U), tlsdesc_reloc_info_(),
tls_base_symbol_defined_(false)
{ }
 
// This function should be defined in targets that can use relocation
// types to determine (implemented in local_reloc_may_be_function_pointer
// and global_reloc_may_be_function_pointer)
// if a function's pointer is taken. ICF uses this in safe mode to only
// fold those functions whose pointer is defintely not taken. For x86_64
// pie binaries, safe ICF cannot be done by looking at relocation types.
inline bool
can_check_for_function_pointers() const
{ return !parameters->options().pie(); }
 
virtual bool
can_icf_inline_merge_sections () const
{ return true; }
 
// Hook for a new output section.
void
do_new_output_section(Output_section*) const;
339,14 → 366,28
do_reloc_addend(void* arg, unsigned int r_type, uint64_t addend) const;
 
// Return the PLT section.
Output_data*
do_plt_section_for_global(const Symbol*) const
{ return this->plt_section(); }
uint64_t
do_plt_address_for_global(const Symbol* gsym) const
{ return this->plt_section()->address_for_global(gsym); }
 
Output_data*
do_plt_section_for_local(const Relobj*, unsigned int) const
{ return this->plt_section(); }
uint64_t
do_plt_address_for_local(const Relobj* relobj, unsigned int symndx) const
{ return this->plt_section()->address_for_local(relobj, symndx); }
 
// This function should be defined in targets that can use relocation
// types to determine (implemented in local_reloc_may_be_function_pointer
// and global_reloc_may_be_function_pointer)
// if a function's pointer is taken. ICF uses this in safe mode to only
// fold those functions whose pointer is defintely not taken. For x86_64
// pie binaries, safe ICF cannot be done by looking at relocation types.
bool
do_can_check_for_function_pointers() const
{ return !parameters->options().pie(); }
 
// Return the base for a DW_EH_PE_datarel encoding.
uint64_t
do_ehframe_datarel_base() const;
 
// Adjust -fsplit-stack code which calls non-split-stack code.
void
do_calls_non_split(Relobj* object, unsigned int shndx,
406,7 → 447,8
 
// Register an existing PLT entry for a global symbol.
void
register_global_plt_entry(unsigned int plt_index, Symbol* gsym);
register_global_plt_entry(Symbol_table*, Layout*, unsigned int plt_index,
Symbol* gsym);
 
// Force a COPY relocation for a given symbol.
void
488,7 → 530,7
Symbol*);
 
void
check_non_pic(Relobj*, unsigned int r_type);
check_non_pic(Relobj*, unsigned int r_type, Symbol*);
 
inline bool
possible_function_pointer_reloc(unsigned int r_type);
676,6 → 718,10
Reloc_section*
rela_tlsdesc_section(Layout*) const;
 
// Get the section to use for IRELATIVE relocations.
Reloc_section*
rela_irelative_section(Layout*);
 
// Add a potential copy relocation.
void
copy_reloc(Symbol_table* symtab, Layout* layout,
726,6 → 772,8
Output_data_plt_x86_64* plt_;
// The GOT PLT section.
Output_data_space* got_plt_;
// The GOT section for IRELATIVE relocations.
Output_data_space* got_irelative_;
// The GOT section for TLSDESC relocations.
Output_data_got<64, false>* got_tlsdesc_;
// The _GLOBAL_OFFSET_TABLE_ symbol.
732,6 → 780,8
Symbol* global_offset_table_;
// The dynamic reloc section.
Reloc_section* rela_dyn_;
// The section to use for IRELATIVE relocs.
Reloc_section* rela_irelative_;
// Relocs saved to avoid a COPY reloc.
Copy_relocs<elfcpp::SHT_RELA, 64, false> copy_relocs_;
// Space for variables copied with a COPY reloc.
755,6 → 805,7
false, // has_resolve
true, // has_code_fill
true, // is_default_stack_executable
true, // can_icf_inline_merge_sections
'\0', // wrap_char
"/lib/ld64.so.1", // program interpreter
0x400000, // default_text_segment_address
787,26 → 838,39
{
gold_assert(symtab != NULL && layout != NULL);
 
// When using -z now, we can treat .got.plt as a relro section.
// Without -z now, it is modified after program startup by lazy
// PLT relocations.
bool is_got_plt_relro = parameters->options().now();
Output_section_order got_order = (is_got_plt_relro
? ORDER_RELRO
: ORDER_RELRO_LAST);
Output_section_order got_plt_order = (is_got_plt_relro
? ORDER_RELRO
: ORDER_NON_RELRO_FIRST);
 
this->got_ = new Output_data_got<64, false>();
 
layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS,
(elfcpp::SHF_ALLOC
| elfcpp::SHF_WRITE),
this->got_, ORDER_RELRO_LAST,
true);
this->got_, got_order, true);
 
this->got_plt_ = new Output_data_space(8, "** GOT PLT");
layout->add_output_section_data(".got.plt", elfcpp::SHT_PROGBITS,
(elfcpp::SHF_ALLOC
| elfcpp::SHF_WRITE),
this->got_plt_, ORDER_NON_RELRO_FIRST,
false);
this->got_plt_, got_plt_order,
is_got_plt_relro);
 
// The first three entries are reserved.
this->got_plt_->set_current_data_size(3 * 8);
 
// Those bytes can go into the relro segment.
layout->increase_relro(3 * 8);
if (!is_got_plt_relro)
{
// Those bytes can go into the relro segment.
layout->increase_relro(3 * 8);
}
 
// Define _GLOBAL_OFFSET_TABLE_ at the start of the PLT.
this->global_offset_table_ =
818,14 → 882,23
elfcpp::STV_HIDDEN, 0,
false, false);
 
// If there are any IRELATIVE relocations, they get GOT entries
// in .got.plt after the jump slot entries.
this->got_irelative_ = new Output_data_space(8, "** GOT IRELATIVE PLT");
layout->add_output_section_data(".got.plt", elfcpp::SHT_PROGBITS,
(elfcpp::SHF_ALLOC
| elfcpp::SHF_WRITE),
this->got_irelative_,
got_plt_order, is_got_plt_relro);
 
// If there are any TLSDESC relocations, they get GOT entries in
// .got.plt after the jump slot entries.
// .got.plt after the jump slot and IRELATIVE entries.
this->got_tlsdesc_ = new Output_data_got<64, false>();
layout->add_output_section_data(".got.plt", elfcpp::SHT_PROGBITS,
(elfcpp::SHF_ALLOC
| elfcpp::SHF_WRITE),
this->got_tlsdesc_,
ORDER_NON_RELRO_FIRST, false);
got_plt_order, is_got_plt_relro);
}
 
return this->got_;
847,10 → 920,33
return this->rela_dyn_;
}
 
// Get the section to use for IRELATIVE relocs, creating it if
// necessary. These go in .rela.dyn, but only after all other dynamic
// relocations. They need to follow the other dynamic relocations so
// that they can refer to global variables initialized by those
// relocs.
 
Target_x86_64::Reloc_section*
Target_x86_64::rela_irelative_section(Layout* layout)
{
if (this->rela_irelative_ == NULL)
{
// Make sure we have already created the dynamic reloc section.
this->rela_dyn_section(layout);
this->rela_irelative_ = new Reloc_section(false);
layout->add_output_section_data(".rela.dyn", elfcpp::SHT_RELA,
elfcpp::SHF_ALLOC, this->rela_irelative_,
ORDER_DYNAMIC_RELOCS, false);
gold_assert(this->rela_dyn_->output_section()
== this->rela_irelative_->output_section());
}
return this->rela_irelative_;
}
 
// Initialize the PLT section.
 
void
Output_data_plt_x86_64::init(Symbol_table* symtab, Layout* layout)
Output_data_plt_x86_64::init(Layout* layout)
{
this->rel_ = new Reloc_section(false);
layout->add_output_section_data(".rela.plt", elfcpp::SHT_RELA,
857,23 → 953,10
elfcpp::SHF_ALLOC, this->rel_,
ORDER_DYNAMIC_PLT_RELOCS, false);
 
if (parameters->doing_static_link())
{
// A statically linked executable will only have a .rela.plt
// section to hold R_X86_64_IRELATIVE relocs for STT_GNU_IFUNC
// symbols. The library will use these symbols to locate the
// IRELATIVE relocs at program startup time.
symtab->define_in_output_data("__rela_iplt_start", NULL,
Symbol_table::PREDEFINED,
this->rel_, 0, 0, elfcpp::STT_NOTYPE,
elfcpp::STB_GLOBAL, elfcpp::STV_HIDDEN,
0, false, true);
symtab->define_in_output_data("__rela_iplt_end", NULL,
Symbol_table::PREDEFINED,
this->rel_, 0, 0, elfcpp::STT_NOTYPE,
elfcpp::STB_GLOBAL, elfcpp::STV_HIDDEN,
0, true, true);
}
// Add unwind information if requested.
if (parameters->options().ld_generated_unwind_info())
layout->add_eh_frame_for_plt(this, plt_eh_frame_cie, plt_eh_frame_cie_size,
plt_eh_frame_fde, plt_eh_frame_fde_size);
}
 
void
885,7 → 968,8
// Add an entry to the PLT.
 
void
Output_data_plt_x86_64::add_entry(Symbol* gsym)
Output_data_plt_x86_64::add_entry(Symbol_table* symtab, Layout* layout,
Symbol* gsym)
{
gold_assert(!gsym->has_plt_offset());
 
893,25 → 977,47
off_t plt_offset;
section_offset_type got_offset;
 
unsigned int* pcount;
unsigned int offset;
unsigned int reserved;
Output_data_space* got;
if (gsym->type() == elfcpp::STT_GNU_IFUNC
&& gsym->can_use_relative_reloc(false))
{
pcount = &this->irelative_count_;
offset = 0;
reserved = 0;
got = this->got_irelative_;
}
else
{
pcount = &this->count_;
offset = 1;
reserved = 3;
got = this->got_plt_;
}
 
if (!this->is_data_size_valid())
{
// Note that when setting the PLT offset we skip the initial
// reserved PLT entry.
plt_index = this->count_ + 1;
// Note that when setting the PLT offset for a non-IRELATIVE
// entry we skip the initial reserved PLT entry.
plt_index = *pcount + offset;
plt_offset = plt_index * plt_entry_size;
 
++this->count_;
++*pcount;
 
got_offset = (plt_index - 1 + 3) * 8;
gold_assert(got_offset == this->got_plt_->current_data_size());
got_offset = (plt_index - offset + reserved) * 8;
gold_assert(got_offset == got->current_data_size());
 
// Every PLT entry needs a GOT entry which points back to the PLT
// entry (this will be changed by the dynamic linker, normally
// lazily when the function is called).
this->got_plt_->set_current_data_size(got_offset + 8);
got->set_current_data_size(got_offset + 8);
}
else
{
// FIXME: This is probably not correct for IRELATIVE relocs.
 
// For incremental updates, find an available slot.
plt_offset = this->free_list_.allocate(plt_entry_size, plt_entry_size, 0);
if (plt_offset == -1)
922,13 → 1028,13
// can be calculated from the PLT index, adjusting for the three
// reserved entries at the beginning of the GOT.
plt_index = plt_offset / plt_entry_size - 1;
got_offset = (plt_index - 1 + 3) * 8;
got_offset = (plt_index - offset + reserved) * 8;
}
 
gsym->set_plt_offset(plt_offset);
 
// Every PLT entry needs a reloc.
this->add_relocation(gsym, got_offset);
this->add_relocation(symtab, layout, gsym, got_offset);
 
// Note that we don't need to save the symbol. The contents of the
// PLT are independent of which symbols are used. The symbols only
940,22 → 1046,25
 
unsigned int
Output_data_plt_x86_64::add_local_ifunc_entry(
Symbol_table* symtab,
Layout* layout,
Sized_relobj_file<64, false>* relobj,
unsigned int local_sym_index)
{
unsigned int plt_offset = (this->count_ + 1) * plt_entry_size;
++this->count_;
unsigned int plt_offset = this->irelative_count_ * plt_entry_size;
++this->irelative_count_;
 
section_offset_type got_offset = this->got_plt_->current_data_size();
section_offset_type got_offset = this->got_irelative_->current_data_size();
 
// Every PLT entry needs a GOT entry which points back to the PLT
// entry.
this->got_plt_->set_current_data_size(got_offset + 8);
this->got_irelative_->set_current_data_size(got_offset + 8);
 
// Every PLT entry needs a reloc.
this->rel_->add_symbolless_local_addend(relobj, local_sym_index,
elfcpp::R_X86_64_IRELATIVE,
this->got_plt_, got_offset, 0);
Reloc_section* rela = this->rela_irelative(symtab, layout);
rela->add_symbolless_local_addend(relobj, local_sym_index,
elfcpp::R_X86_64_IRELATIVE,
this->got_irelative_, got_offset, 0);
 
return plt_offset;
}
963,12 → 1072,16
// Add the relocation for a PLT entry.
 
void
Output_data_plt_x86_64::add_relocation(Symbol* gsym, unsigned int got_offset)
Output_data_plt_x86_64::add_relocation(Symbol_table* symtab, Layout* layout,
Symbol* gsym, unsigned int got_offset)
{
if (gsym->type() == elfcpp::STT_GNU_IFUNC
&& gsym->can_use_relative_reloc(false))
this->rel_->add_symbolless_global_addend(gsym, elfcpp::R_X86_64_IRELATIVE,
this->got_plt_, got_offset, 0);
{
Reloc_section* rela = this->rela_irelative(symtab, layout);
rela->add_symbolless_global_addend(gsym, elfcpp::R_X86_64_IRELATIVE,
this->got_irelative_, got_offset, 0);
}
else
{
gsym->set_needs_dynsym_entry();
989,17 → 1102,78
layout->add_output_section_data(".rela.plt", elfcpp::SHT_RELA,
elfcpp::SHF_ALLOC, this->tlsdesc_rel_,
ORDER_DYNAMIC_PLT_RELOCS, false);
gold_assert(this->tlsdesc_rel_->output_section() ==
this->rel_->output_section());
gold_assert(this->tlsdesc_rel_->output_section()
== this->rel_->output_section());
}
return this->tlsdesc_rel_;
}
 
// Return where the IRELATIVE relocations should go in the PLT. These
// follow the JUMP_SLOT and the TLSDESC relocations.
 
Output_data_plt_x86_64::Reloc_section*
Output_data_plt_x86_64::rela_irelative(Symbol_table* symtab, Layout* layout)
{
if (this->irelative_rel_ == NULL)
{
// Make sure we have a place for the TLSDESC relocations, in
// case we see any later on.
this->rela_tlsdesc(layout);
this->irelative_rel_ = new Reloc_section(false);
layout->add_output_section_data(".rela.plt", elfcpp::SHT_RELA,
elfcpp::SHF_ALLOC, this->irelative_rel_,
ORDER_DYNAMIC_PLT_RELOCS, false);
gold_assert(this->irelative_rel_->output_section()
== this->rel_->output_section());
 
if (parameters->doing_static_link())
{
// A statically linked executable will only have a .rela.plt
// section to hold R_X86_64_IRELATIVE relocs for
// STT_GNU_IFUNC symbols. The library will use these
// symbols to locate the IRELATIVE relocs at program startup
// time.
symtab->define_in_output_data("__rela_iplt_start", NULL,
Symbol_table::PREDEFINED,
this->irelative_rel_, 0, 0,
elfcpp::STT_NOTYPE, elfcpp::STB_GLOBAL,
elfcpp::STV_HIDDEN, 0, false, true);
symtab->define_in_output_data("__rela_iplt_end", NULL,
Symbol_table::PREDEFINED,
this->irelative_rel_, 0, 0,
elfcpp::STT_NOTYPE, elfcpp::STB_GLOBAL,
elfcpp::STV_HIDDEN, 0, true, true);
}
}
return this->irelative_rel_;
}
 
// Return the PLT address to use for a global symbol.
 
uint64_t
Output_data_plt_x86_64::address_for_global(const Symbol* gsym)
{
uint64_t offset = 0;
if (gsym->type() == elfcpp::STT_GNU_IFUNC
&& gsym->can_use_relative_reloc(false))
offset = (this->count_ + 1) * plt_entry_size;
return this->address() + offset;
}
 
// Return the PLT address to use for a local symbol. These are always
// IRELATIVE relocs.
 
uint64_t
Output_data_plt_x86_64::address_for_local(const Relobj*, unsigned int)
{
return this->address() + (this->count_ + 1) * plt_entry_size;
}
 
// Set the final size.
void
Output_data_plt_x86_64::set_final_data_size()
{
unsigned int count = this->count_;
unsigned int count = this->count_ + this->irelative_count_;
if (this->has_tlsdesc_entry())
++count;
this->set_data_size((count + 1) * plt_entry_size);
1007,7 → 1181,7
 
// The first entry in the PLT for an executable.
 
unsigned char Output_data_plt_x86_64::first_plt_entry[plt_entry_size] =
const unsigned char Output_data_plt_x86_64::first_plt_entry[plt_entry_size] =
{
// From AMD64 ABI Draft 0.98, page 76
0xff, 0x35, // pushq contents of memory address
1019,7 → 1193,7
 
// Subsequent entries in the PLT for an executable.
 
unsigned char Output_data_plt_x86_64::plt_entry[plt_entry_size] =
const unsigned char Output_data_plt_x86_64::plt_entry[plt_entry_size] =
{
// From AMD64 ABI Draft 0.98, page 76
0xff, 0x25, // jmpq indirect
1032,7 → 1206,7
 
// The reserved TLSDESC entry in the PLT for an executable.
 
unsigned char Output_data_plt_x86_64::tlsdesc_plt_entry[plt_entry_size] =
const unsigned char Output_data_plt_x86_64::tlsdesc_plt_entry[plt_entry_size] =
{
// From Alexandre Oliva, "Thread-Local Storage Descriptors for IA32
// and AMD64/EM64T", Version 0.9.4 (2005-10-10).
1044,6 → 1218,54
0x40, 0
};
 
// The .eh_frame unwind information for the PLT.
 
const unsigned char
Output_data_plt_x86_64::plt_eh_frame_cie[plt_eh_frame_cie_size] =
{
1, // CIE version.
'z', // Augmentation: augmentation size included.
'R', // Augmentation: FDE encoding included.
'\0', // End of augmentation string.
1, // Code alignment factor.
0x78, // Data alignment factor.
16, // Return address column.
1, // Augmentation size.
(elfcpp::DW_EH_PE_pcrel // FDE encoding.
| elfcpp::DW_EH_PE_sdata4),
elfcpp::DW_CFA_def_cfa, 7, 8, // DW_CFA_def_cfa: r7 (rsp) ofs 8.
elfcpp::DW_CFA_offset + 16, 1,// DW_CFA_offset: r16 (rip) at cfa-8.
elfcpp::DW_CFA_nop, // Align to 16 bytes.
elfcpp::DW_CFA_nop
};
 
const unsigned char
Output_data_plt_x86_64::plt_eh_frame_fde[plt_eh_frame_fde_size] =
{
0, 0, 0, 0, // Replaced with offset to .plt.
0, 0, 0, 0, // Replaced with size of .plt.
0, // Augmentation size.
elfcpp::DW_CFA_def_cfa_offset, 16, // DW_CFA_def_cfa_offset: 16.
elfcpp::DW_CFA_advance_loc + 6, // Advance 6 to __PLT__ + 6.
elfcpp::DW_CFA_def_cfa_offset, 24, // DW_CFA_def_cfa_offset: 24.
elfcpp::DW_CFA_advance_loc + 10, // Advance 10 to __PLT__ + 16.
elfcpp::DW_CFA_def_cfa_expression, // DW_CFA_def_cfa_expression.
11, // Block length.
elfcpp::DW_OP_breg7, 8, // Push %rsp + 8.
elfcpp::DW_OP_breg16, 0, // Push %rip.
elfcpp::DW_OP_lit15, // Push 0xf.
elfcpp::DW_OP_and, // & (%rip & 0xf).
elfcpp::DW_OP_lit11, // Push 0xb.
elfcpp::DW_OP_ge, // >= ((%rip & 0xf) >= 0xb)
elfcpp::DW_OP_lit3, // Push 3.
elfcpp::DW_OP_shl, // << (((%rip & 0xf) >= 0xb) << 3)
elfcpp::DW_OP_plus, // + ((((%rip&0xf)>=0xb)<<3)+%rsp+8
elfcpp::DW_CFA_nop, // Align to 32 bytes.
elfcpp::DW_CFA_nop,
elfcpp::DW_CFA_nop,
elfcpp::DW_CFA_nop
};
 
// Write out the PLT. This uses the hand-coded instructions above,
// and adjusts them as needed. This is specified by the AMD64 ABI.
 
1056,8 → 1278,12
unsigned char* const oview = of->get_output_view(offset, oview_size);
 
const off_t got_file_offset = this->got_plt_->offset();
gold_assert(parameters->incremental_update()
|| (got_file_offset + this->got_plt_->data_size()
== this->got_irelative_->offset()));
const section_size_type got_size =
convert_to_section_size_type(this->got_plt_->data_size());
convert_to_section_size_type(this->got_plt_->data_size()
+ this->got_irelative_->data_size());
unsigned char* const got_view = of->get_output_view(got_file_offset,
got_size);
 
1084,12 → 1310,20
 
unsigned char* got_pov = got_view;
 
memset(got_pov, 0, 24);
got_pov += 24;
// The first entry in the GOT is the address of the .dynamic section
// aka the PT_DYNAMIC segment. The next two entries are reserved.
// We saved space for them when we created the section in
// Target_x86_64::got_section.
Output_section* dynamic = this->layout_->dynamic_section();
uint32_t dynamic_addr = dynamic == NULL ? 0 : dynamic->address();
elfcpp::Swap<64, false>::writeval(got_pov, dynamic_addr);
got_pov += 8;
memset(got_pov, 0, 16);
got_pov += 16;
 
unsigned int plt_offset = plt_entry_size;
unsigned int got_offset = 24;
const unsigned int count = this->count_;
const unsigned int count = this->count_ + this->irelative_count_;
for (unsigned int plt_index = 0;
plt_index < count;
++plt_index,
1147,8 → 1381,9
// Create the GOT sections first.
this->got_section(symtab, layout);
 
this->plt_ = new Output_data_plt_x86_64(symtab, layout, this->got_,
this->got_plt_);
this->plt_ = new Output_data_plt_x86_64(layout, this->got_,
this->got_plt_,
this->got_irelative_);
layout->add_output_section_data(".plt", elfcpp::SHT_PROGBITS,
(elfcpp::SHF_ALLOC
| elfcpp::SHF_EXECINSTR),
1180,7 → 1415,7
if (this->plt_ == NULL)
this->make_plt_section(symtab, layout);
 
this->plt_->add_entry(gsym);
this->plt_->add_entry(symtab, layout, gsym);
}
 
// Make a PLT entry for a local STT_GNU_IFUNC symbol.
1194,7 → 1429,8
return;
if (this->plt_ == NULL)
this->make_plt_section(symtab, layout);
unsigned int plt_offset = this->plt_->add_local_ifunc_entry(relobj,
unsigned int plt_offset = this->plt_->add_local_ifunc_entry(symtab, layout,
relobj,
local_sym_index);
relobj->set_local_plt_offset(local_sym_index, plt_offset);
}
1269,9 → 1505,17
this->got_tlsdesc_,
ORDER_NON_RELRO_FIRST, false);
 
// If there are any IRELATIVE relocations, they get GOT entries in
// .got.plt after the jump slot and TLSDESC entries.
this->got_irelative_ = new Output_data_space(0, 8, "** GOT IRELATIVE PLT");
layout->add_output_section_data(".got.plt", elfcpp::SHT_PROGBITS,
elfcpp::SHF_ALLOC | elfcpp::SHF_WRITE,
this->got_irelative_,
ORDER_NON_RELRO_FIRST, false);
 
// Create the PLT section.
this->plt_ = new Output_data_plt_x86_64(symtab, layout, this->got_,
this->got_plt_, plt_count);
this->plt_ = new Output_data_plt_x86_64(layout, this->got_, this->got_plt_,
this->got_irelative_, plt_count);
layout->add_output_section_data(".plt", elfcpp::SHT_PROGBITS,
elfcpp::SHF_ALLOC | elfcpp::SHF_EXECINSTR,
this->plt_, ORDER_PLT, false);
1378,7 → 1622,9
// Register an existing PLT entry for a global symbol.
 
void
Target_x86_64::register_global_plt_entry(unsigned int plt_index,
Target_x86_64::register_global_plt_entry(Symbol_table* symtab,
Layout* layout,
unsigned int plt_index,
Symbol* gsym)
{
gold_assert(this->plt_ != NULL);
1389,7 → 1635,7
gsym->set_plt_offset((plt_index + 1) * this->plt_entry_size());
 
unsigned int got_offset = (plt_index + 3) * 8;
this->plt_->add_relocation(gsym, got_offset);
this->plt_->add_relocation(symtab, layout, gsym, got_offset);
}
 
// Force a COPY relocation for a given symbol.
1610,10 → 1856,13
// Here we know the section is allocated, but we don't know that it is
// read-only. But we check for all the relocation types which the
// glibc dynamic linker supports, so it seems appropriate to issue an
// error even if the section is not read-only.
// error even if the section is not read-only. If GSYM is not NULL,
// it is the symbol the relocation is against; if it is NULL, the
// relocation is against a local symbol.
 
void
Target_x86_64::Scan::check_non_pic(Relobj* object, unsigned int r_type)
Target_x86_64::Scan::check_non_pic(Relobj* object, unsigned int r_type,
Symbol* gsym)
{
switch (r_type)
{
1631,13 → 1880,29
return;
 
// glibc supports these reloc types, but they can overflow.
case elfcpp::R_X86_64_PC32:
// A PC relative reference is OK against a local symbol or if
// the symbol is defined locally.
if (gsym == NULL
|| (!gsym->is_from_dynobj()
&& !gsym->is_undefined()
&& !gsym->is_preemptible()))
return;
/* Fall through. */
case elfcpp::R_X86_64_32:
case elfcpp::R_X86_64_PC32:
if (this->issued_non_pic_error_)
return;
gold_assert(parameters->options().output_is_position_independent());
object->error(_("requires dynamic reloc which may overflow at runtime; "
"recompile with -fPIC"));
if (gsym == NULL)
object->error(_("requires dynamic R_X86_64_32 reloc which may "
"overflow at runtime; recompile with -fPIC"));
else
object->error(_("requires dynamic %s reloc against '%s' which may "
"overflow at runtime; recompile with -fPIC"),
(r_type == elfcpp::R_X86_64_32
? "R_X86_64_32"
: "R_X86_64_PC32"),
gsym->name());
this->issued_non_pic_error_ = true;
return;
 
1648,8 → 1913,9
if (this->issued_non_pic_error_)
return;
gold_assert(parameters->options().output_is_position_independent());
object->error(_("requires unsupported dynamic reloc; "
"recompile with -fPIC"));
object->error(_("requires unsupported dynamic reloc %u; "
"recompile with -fPIC"),
r_type);
this->issued_non_pic_error_ = true;
return;
 
1730,7 → 1996,7
// because that is always a 64-bit relocation.
if (parameters->options().output_is_position_independent())
{
this->check_non_pic(object, r_type);
this->check_non_pic(object, r_type, NULL);
 
Reloc_section* rela_dyn = target->rela_dyn_section(layout);
unsigned int r_sym = elfcpp::elf_r_sym<64>(reloc.get_r_info());
1814,7 → 2080,7
}
else
{
this->check_non_pic(object, r_type);
this->check_non_pic(object, r_type, NULL);
 
gold_assert(lsym.get_st_type() != elfcpp::STT_SECTION);
rela_dyn->add_local(
2115,7 → 2381,8
// STT_GNU_IFUNC symbol. This makes a function
// address in a PIE executable match the address in a
// shared library that it links against.
Reloc_section* rela_dyn = target->rela_dyn_section(layout);
Reloc_section* rela_dyn =
target->rela_irelative_section(layout);
unsigned int r_type = elfcpp::R_X86_64_IRELATIVE;
rela_dyn->add_symbolless_global_addend(gsym, r_type,
output_section, object,
2135,7 → 2402,7
}
else
{
this->check_non_pic(object, r_type);
this->check_non_pic(object, r_type, gsym);
Reloc_section* rela_dyn = target->rela_dyn_section(layout);
rela_dyn->add_global(gsym, r_type, output_section, object,
data_shndx, reloc.get_r_offset(),
2163,7 → 2430,7
}
else
{
this->check_non_pic(object, r_type);
this->check_non_pic(object, r_type, gsym);
Reloc_section* rela_dyn = target->rela_dyn_section(layout);
rela_dyn->add_global(gsym, r_type, output_section, object,
data_shndx, reloc.get_r_offset(),
2194,9 → 2461,24
// If this symbol is not fully resolved, we need to add a
// dynamic relocation for it.
Reloc_section* rela_dyn = target->rela_dyn_section(layout);
 
// Use a GLOB_DAT rather than a RELATIVE reloc if:
//
// 1) The symbol may be defined in some other module.
//
// 2) We are building a shared library and this is a
// protected symbol; using GLOB_DAT means that the dynamic
// linker can use the address of the PLT in the main
// executable when appropriate so that function address
// comparisons work.
//
// 3) This is a STT_GNU_IFUNC symbol in position dependent
// code, again so that function address comparisons work.
if (gsym->is_from_dynobj()
|| gsym->is_undefined()
|| gsym->is_preemptible()
|| (gsym->visibility() == elfcpp::STV_PROTECTED
&& parameters->options().shared())
|| (gsym->type() == elfcpp::STT_GNU_IFUNC
&& parameters->options().output_is_position_independent()))
got->add_global_with_rela(gsym, GOT_TYPE_STANDARD, rela_dyn,
2518,6 → 2800,47
uint64_t data_size = this->got_plt_->current_data_size();
symtab->get_sized_symbol<64>(sym)->set_symsize(data_size);
}
 
if (parameters->doing_static_link()
&& (this->plt_ == NULL || !this->plt_->has_irelative_section()))
{
// If linking statically, make sure that the __rela_iplt symbols
// were defined if necessary, even if we didn't create a PLT.
static const Define_symbol_in_segment syms[] =
{
{
"__rela_iplt_start", // name
elfcpp::PT_LOAD, // segment_type
elfcpp::PF_W, // segment_flags_set
elfcpp::PF(0), // segment_flags_clear
0, // value
0, // size
elfcpp::STT_NOTYPE, // type
elfcpp::STB_GLOBAL, // binding
elfcpp::STV_HIDDEN, // visibility
0, // nonvis
Symbol::SEGMENT_START, // offset_from_base
true // only_if_ref
},
{
"__rela_iplt_end", // name
elfcpp::PT_LOAD, // segment_type
elfcpp::PF_W, // segment_flags_set
elfcpp::PF(0), // segment_flags_clear
0, // value
0, // size
elfcpp::STT_NOTYPE, // type
elfcpp::STB_GLOBAL, // binding
elfcpp::STV_HIDDEN, // visibility
0, // nonvis
Symbol::SEGMENT_START, // offset_from_base
true // only_if_ref
}
};
 
symtab->define_symbols(layout, 2, syms,
layout->script_options()->saw_sections_clause());
}
}
 
// Perform a relocation.
2559,7 → 2882,7
if (gsym != NULL
&& gsym->use_plt_offset(Scan::get_reference_flags(r_type)))
{
symval.set_output_value(target->plt_section()->address()
symval.set_output_value(target->plt_address_for_global(gsym)
+ gsym->plt_offset());
psymval = &symval;
}
2568,7 → 2891,7
unsigned int r_sym = elfcpp::elf_r_sym<64>(rela.get_r_info());
if (object->local_has_plt_offset(r_sym))
{
symval.set_output_value(target->plt_section()->address()
symval.set_output_value(target->plt_address_for_local(object, r_sym)
+ object->local_plt_offset(r_sym));
psymval = &symval;
}
2827,7 → 3150,12
}
if (optimized_type == tls::TLSOPT_TO_LE)
{
gold_assert(tls_segment != NULL);
if (tls_segment == NULL)
{
gold_assert(parameters->errors()->error_count() > 0
|| issue_undefined_symbol_error(gsym));
return;
}
this->tls_gd_to_le(relinfo, relnum, tls_segment,
rela, r_type, value, view,
view_size);
2853,7 → 3181,12
}
if (optimized_type == tls::TLSOPT_TO_IE)
{
gold_assert(tls_segment != NULL);
if (tls_segment == NULL)
{
gold_assert(parameters->errors()->error_count() > 0
|| issue_undefined_symbol_error(gsym));
return;
}
value = target->got_plt_section()->address() + got_offset;
this->tls_gd_to_ie(relinfo, relnum, tls_segment, rela, r_type,
value, view, address, view_size);
2882,7 → 3215,12
}
if (optimized_type == tls::TLSOPT_TO_LE)
{
gold_assert(tls_segment != NULL);
if (tls_segment == NULL)
{
gold_assert(parameters->errors()->error_count() > 0
|| issue_undefined_symbol_error(gsym));
return;
}
this->tls_desc_gd_to_le(relinfo, relnum, tls_segment,
rela, r_type, value, view,
view_size);
2917,7 → 3255,12
}
if (optimized_type == tls::TLSOPT_TO_IE)
{
gold_assert(tls_segment != NULL);
if (tls_segment == NULL)
{
gold_assert(parameters->errors()->error_count() > 0
|| issue_undefined_symbol_error(gsym));
return;
}
value = target->got_plt_section()->address() + got_offset;
this->tls_desc_gd_to_ie(relinfo, relnum, tls_segment,
rela, r_type, value, view, address,
2949,7 → 3292,12
}
if (optimized_type == tls::TLSOPT_TO_LE)
{
gold_assert(tls_segment != NULL);
if (tls_segment == NULL)
{
gold_assert(parameters->errors()->error_count() > 0
|| issue_undefined_symbol_error(gsym));
return;
}
this->tls_ld_to_le(relinfo, relnum, tls_segment, rela, r_type,
value, view, view_size);
break;
2979,7 → 3327,12
// R_X86_64_TLSLD.
if (optimized_type == tls::TLSOPT_TO_LE && is_executable)
{
gold_assert(tls_segment != NULL);
if (tls_segment == NULL)
{
gold_assert(parameters->errors()->error_count() > 0
|| issue_undefined_symbol_error(gsym));
return;
}
value -= tls_segment->memsz();
}
Relocate_functions<64, false>::rela32(view, value, addend);
2989,7 → 3342,12
// See R_X86_64_DTPOFF32, just above, for why we check for is_executable.
if (optimized_type == tls::TLSOPT_TO_LE && is_executable)
{
gold_assert(tls_segment != NULL);
if (tls_segment == NULL)
{
gold_assert(parameters->errors()->error_count() > 0
|| issue_undefined_symbol_error(gsym));
return;
}
value -= tls_segment->memsz();
}
Relocate_functions<64, false>::rela64(view, value, addend);
2998,7 → 3356,12
case elfcpp::R_X86_64_GOTTPOFF: // Initial-exec
if (optimized_type == tls::TLSOPT_TO_LE)
{
gold_assert(tls_segment != NULL);
if (tls_segment == NULL)
{
gold_assert(parameters->errors()->error_count() > 0
|| issue_undefined_symbol_error(gsym));
return;
}
Target_x86_64::Relocate::tls_ie_to_le(relinfo, relnum, tls_segment,
rela, r_type, value, view,
view_size);
3033,6 → 3396,12
break;
 
case elfcpp::R_X86_64_TPOFF32: // Local-exec
if (tls_segment == NULL)
{
gold_assert(parameters->errors()->error_count() > 0
|| issue_undefined_symbol_error(gsym));
return;
}
value -= tls_segment->memsz();
Relocate_functions<64, false>::rela32(view, value, addend);
break;
3478,7 → 3847,7
Target_x86_64::do_dynsym_value(const Symbol* gsym) const
{
gold_assert(gsym->is_from_dynobj() && gsym->has_plt_offset());
return this->plt_section()->address() + gsym->plt_offset();
return this->plt_address_for_global(gsym) + gsym->plt_offset();
}
 
// Return a string used to fill a code section with nops to take up
3563,6 → 3932,21
return psymval->value(ti.object, 0);
}
 
// Return the value to use for the base of a DW_EH_PE_datarel offset
// in an FDE. Solaris and SVR4 use DW_EH_PE_datarel because their
// assembler can not write out the difference between two labels in
// different sections, so instead of using a pc-relative value they
// use an offset from the GOT.
 
uint64_t
Target_x86_64::do_ehframe_datarel_base() const
{
gold_assert(this->global_offset_table_ != NULL);
Symbol* sym = this->global_offset_table_;
Sized_symbol<64>* ssym = static_cast<Sized_symbol<64>*>(sym);
return ssym->value();
}
 
// FNOFFSET in section SHNDX in OBJECT is the start of a function
// compiled with -fsplit-stack. The function calls non-split-stack
// code. We have to change the function so that it always ensures
3631,7 → 4015,7
public:
Target_selector_x86_64()
: Target_selector_freebsd(elfcpp::EM_X86_64, 64, false, "elf64-x86-64",
"elf64-x86-64-freebsd")
"elf64-x86-64-freebsd", "elf_x86_64")
{ }
 
Target*
/trunk/gnu/binutils/gold/output.cc
36,6 → 36,7
 
#include "libiberty.h"
 
#include "dwarf.h"
#include "parameters.h"
#include "object.h"
#include "symtab.h"
42,6 → 43,7
#include "reloc.h"
#include "merge.h"
#include "descriptors.h"
#include "layout.h"
#include "output.h"
 
// For systems without mmap support.
1346,7 → 1348,7
// RELATIVE relocation.
Symbol* gsym = this->u_.gsym;
if (this->use_plt_offset_ && gsym->has_plt_offset())
val = (parameters->target().plt_section_for_global(gsym)->address()
val = (parameters->target().plt_address_for_global(gsym)
+ gsym->plt_offset());
else
{
1380,9 → 1382,9
val = symval->value(this->u_.object, 0);
else
{
const Output_data* plt =
parameters->target().plt_section_for_local(object, lsi);
val = plt->address() + object->local_plt_offset(lsi);
uint64_t plt_address =
parameters->target().plt_address_for_local(object, lsi);
val = plt_address + object->local_plt_offset(lsi);
}
}
break;
1925,6 → 1927,140
}
}
 
// Output_fill_debug_info methods.
 
// Return the minimum size needed for a dummy compilation unit header.
 
size_t
Output_fill_debug_info::do_minimum_hole_size() const
{
// Compile unit header fields: unit_length, version, debug_abbrev_offset,
// address_size.
const size_t len = 4 + 2 + 4 + 1;
// For type units, add type_signature, type_offset.
if (this->is_debug_types_)
return len + 8 + 4;
return len;
}
 
// Write a dummy compilation unit header to fill a hole in the
// .debug_info or .debug_types section.
 
void
Output_fill_debug_info::do_write(Output_file* of, off_t off, size_t len) const
{
gold_debug(DEBUG_INCREMENTAL, "fill_debug_info(%08lx, %08lx)", off, len);
 
gold_assert(len >= this->do_minimum_hole_size());
 
unsigned char* const oview = of->get_output_view(off, len);
unsigned char* pov = oview;
 
// Write header fields: unit_length, version, debug_abbrev_offset,
// address_size.
if (this->is_big_endian())
{
elfcpp::Swap<32, true>::writeval(pov, len - 4);
elfcpp::Swap<16, true>::writeval(pov + 4, this->version);
elfcpp::Swap<32, true>::writeval(pov + 6, 0);
}
else
{
elfcpp::Swap<32, false>::writeval(pov, len - 4);
elfcpp::Swap<16, false>::writeval(pov + 4, this->version);
elfcpp::Swap<32, false>::writeval(pov + 6, 0);
}
pov += 4 + 2 + 4;
*pov++ = 4;
 
// For type units, the additional header fields -- type_signature,
// type_offset -- can be filled with zeroes.
 
// Fill the remainder of the free space with zeroes. The first
// zero should tell the consumer there are no DIEs to read in this
// compilation unit.
if (pov < oview + len)
memset(pov, 0, oview + len - pov);
 
of->write_output_view(off, len, oview);
}
 
// Output_fill_debug_line methods.
 
// Return the minimum size needed for a dummy line number program header.
 
size_t
Output_fill_debug_line::do_minimum_hole_size() const
{
// Line number program header fields: unit_length, version, header_length,
// minimum_instruction_length, default_is_stmt, line_base, line_range,
// opcode_base, standard_opcode_lengths[], include_directories, filenames.
const size_t len = 4 + 2 + 4 + this->header_length;
return len;
}
 
// Write a dummy line number program header to fill a hole in the
// .debug_line section.
 
void
Output_fill_debug_line::do_write(Output_file* of, off_t off, size_t len) const
{
gold_debug(DEBUG_INCREMENTAL, "fill_debug_line(%08lx, %08lx)", off, len);
 
gold_assert(len >= this->do_minimum_hole_size());
 
unsigned char* const oview = of->get_output_view(off, len);
unsigned char* pov = oview;
 
// Write header fields: unit_length, version, header_length,
// minimum_instruction_length, default_is_stmt, line_base, line_range,
// opcode_base, standard_opcode_lengths[], include_directories, filenames.
// We set the header_length field to cover the entire hole, so the
// line number program is empty.
if (this->is_big_endian())
{
elfcpp::Swap<32, true>::writeval(pov, len - 4);
elfcpp::Swap<16, true>::writeval(pov + 4, this->version);
elfcpp::Swap<32, true>::writeval(pov + 6, len - (4 + 2 + 4));
}
else
{
elfcpp::Swap<32, false>::writeval(pov, len - 4);
elfcpp::Swap<16, false>::writeval(pov + 4, this->version);
elfcpp::Swap<32, false>::writeval(pov + 6, len - (4 + 2 + 4));
}
pov += 4 + 2 + 4;
*pov++ = 1; // minimum_instruction_length
*pov++ = 0; // default_is_stmt
*pov++ = 0; // line_base
*pov++ = 5; // line_range
*pov++ = 13; // opcode_base
*pov++ = 0; // standard_opcode_lengths[1]
*pov++ = 1; // standard_opcode_lengths[2]
*pov++ = 1; // standard_opcode_lengths[3]
*pov++ = 1; // standard_opcode_lengths[4]
*pov++ = 1; // standard_opcode_lengths[5]
*pov++ = 0; // standard_opcode_lengths[6]
*pov++ = 0; // standard_opcode_lengths[7]
*pov++ = 0; // standard_opcode_lengths[8]
*pov++ = 1; // standard_opcode_lengths[9]
*pov++ = 0; // standard_opcode_lengths[10]
*pov++ = 0; // standard_opcode_lengths[11]
*pov++ = 1; // standard_opcode_lengths[12]
*pov++ = 0; // include_directories (empty)
*pov++ = 0; // filenames (empty)
 
// Some consumers don't check the header_length field, and simply
// start reading the line number program immediately following the
// header. For those consumers, we fill the remainder of the free
// space with DW_LNS_set_basic_block opcodes. These are effectively
// no-ops: the resulting line table program will not create any rows.
if (pov < oview + len)
memset(pov, elfcpp::DW_LNS_set_basic_block, oview + len - pov);
 
of->write_output_view(off, len, oview);
}
 
// Output_section::Input_section methods.
 
// Return the current data size. For an input section we store the size here.
2152,10 → 2288,13
is_noload_(false),
always_keeps_input_sections_(false),
has_fixed_layout_(false),
is_patch_space_allowed_(false),
tls_offset_(0),
checkpoint_(NULL),
lookup_maps_(new Output_section_lookup_maps),
free_list_()
free_list_(),
free_space_fill_(NULL),
patch_space_(0)
{
// An unallocated section has no address. Forcing this means that
// we don't need special treatment for symbols defined in debug
2270,7 → 2409,9
offset_in_section = this->free_list_.allocate(input_section_size,
addralign, 0);
if (offset_in_section == -1)
gold_fallback(_("out of patch space; relink with --incremental-full"));
gold_fallback(_("out of patch space in section %s; "
"relink with --incremental-full"),
this->name());
aligned_offset_in_section = offset_in_section;
}
else
2291,7 → 2432,7
&& (sh_flags & elfcpp::SHF_EXECINSTR) != 0
&& parameters->target().has_code_fill()
&& (parameters->target().may_relax()
|| parameters->options().section_ordering_file()))
|| layout->is_section_ordering_specified()))
{
gold_assert(this->fills_.empty());
this->generate_code_fills_at_write_ = true;
2330,10 → 2471,10
|| this->must_sort_attached_input_sections()
|| parameters->options().user_set_Map()
|| parameters->target().may_relax()
|| parameters->options().section_ordering_file())
|| layout->is_section_ordering_specified())
{
Input_section isecn(object, shndx, input_section_size, addralign);
if (parameters->options().section_ordering_file())
if (layout->is_section_ordering_specified())
{
unsigned int section_order_index =
layout->find_section_order_index(std::string(secname));
2374,8 → 2515,9
offset_in_section = this->free_list_.allocate(posd->data_size(),
posd->addralign(), 0);
if (offset_in_section == -1)
gold_fallback(_("out of patch space; "
"relink with --incremental-full"));
gold_fallback(_("out of patch space in section %s; "
"relink with --incremental-full"),
this->name());
// Finalize the address and offset now.
uint64_t addr = this->address();
off_t offset = this->offset();
2415,7 → 2557,7
 
// If the --section-ordering-file option is used to specify the order of
// sections, we need to keep track of sections.
if (parameters->options().section_ordering_file())
if (layout->is_section_ordering_specified())
{
unsigned int section_order_index =
layout->find_section_order_index(name);
2945,30 → 3087,51
void
Output_section::set_final_data_size()
{
off_t data_size;
 
if (this->input_sections_.empty())
data_size = this->current_data_size_for_child();
else
{
this->set_data_size(this->current_data_size_for_child());
return;
if (this->must_sort_attached_input_sections()
|| this->input_section_order_specified())
this->sort_attached_input_sections();
 
uint64_t address = this->address();
off_t startoff = this->offset();
off_t off = startoff + this->first_input_offset_;
for (Input_section_list::iterator p = this->input_sections_.begin();
p != this->input_sections_.end();
++p)
{
off = align_address(off, p->addralign());
p->set_address_and_file_offset(address + (off - startoff), off,
startoff);
off += p->data_size();
}
data_size = off - startoff;
}
 
if (this->must_sort_attached_input_sections()
|| this->input_section_order_specified())
this->sort_attached_input_sections();
 
uint64_t address = this->address();
off_t startoff = this->offset();
off_t off = startoff + this->first_input_offset_;
for (Input_section_list::iterator p = this->input_sections_.begin();
p != this->input_sections_.end();
++p)
// For full incremental links, we want to allocate some patch space
// in most sections for subsequent incremental updates.
if (this->is_patch_space_allowed_ && parameters->incremental_full())
{
off = align_address(off, p->addralign());
p->set_address_and_file_offset(address + (off - startoff), off,
startoff);
off += p->data_size();
double pct = parameters->options().incremental_patch();
size_t extra = static_cast<size_t>(data_size * pct);
if (this->free_space_fill_ != NULL
&& this->free_space_fill_->minimum_hole_size() > extra)
extra = this->free_space_fill_->minimum_hole_size();
off_t new_size = align_address(data_size + extra, this->addralign());
this->patch_space_ = new_size - data_size;
gold_debug(DEBUG_INCREMENTAL,
"set_final_data_size: %08lx + %08lx: section %s",
static_cast<long>(data_size),
static_cast<long>(this->patch_space_),
this->name());
data_size = new_size;
}
 
this->set_data_size(off - startoff);
this->set_data_size(data_size);
}
 
// Reset the address and file offset.
2987,8 → 3150,16
p != this->input_sections_.end();
++p)
p->reset_address_and_file_offset();
 
// Remove any patch space that was added in set_final_data_size.
if (this->patch_space_ > 0)
{
this->set_current_data_size_for_child(this->current_data_size_for_child()
- this->patch_space_);
this->patch_space_ = 0;
}
}
 
// Return true if address and file offset have the values after reset.
 
bool
3017,7 → 3188,7
// priority ordering implemented by the GNU linker, in which the
// priority becomes part of the section name and the sections are
// sorted by name. We only do this for an output section if we see an
// attached input section matching ".ctor.*", ".dtor.*",
// attached input section matching ".ctors.*", ".dtors.*",
// ".init_array.*" or ".fini_array.*".
 
class Output_section::Input_section_sort_entry
3092,6 → 3263,34
return this->section_name_.find('.', 1) != std::string::npos;
}
 
// Return the priority. Believe it or not, gcc encodes the priority
// differently for .ctors/.dtors and .init_array/.fini_array
// sections.
unsigned int
get_priority() const
{
gold_assert(this->section_has_name_);
bool is_ctors;
if (is_prefix_of(".ctors.", this->section_name_.c_str())
|| is_prefix_of(".dtors.", this->section_name_.c_str()))
is_ctors = true;
else if (is_prefix_of(".init_array.", this->section_name_.c_str())
|| is_prefix_of(".fini_array.", this->section_name_.c_str()))
is_ctors = false;
else
return 0;
char* end;
unsigned long prio = strtoul((this->section_name_.c_str()
+ (is_ctors ? 7 : 12)),
&end, 10);
if (*end != '\0')
return 0;
else if (is_ctors)
return 65535 - prio;
else
return prio;
}
 
// Return true if this an input file whose base name matches
// FILE_NAME. The base name must have an extension of ".o", and
// must be exactly FILE_NAME.o or FILE_NAME, one character, ".o".
3100,18 → 3299,8
// file name this way is a dreadful hack, but the GNU linker does it
// in order to better support gcc, and we need to be compatible.
bool
match_file_name(const char* match_file_name) const
{
const std::string& file_name(this->input_section_.relobj()->name());
const char* base_name = lbasename(file_name.c_str());
size_t match_len = strlen(match_file_name);
if (strncmp(base_name, match_file_name, match_len) != 0)
return false;
size_t base_len = strlen(base_name);
if (base_len != match_len + 2 && base_len != match_len + 3)
return false;
return memcmp(base_name + base_len - 2, ".o", 2) == 0;
}
match_file_name(const char* file_name) const
{ return Layout::match_file_name(this->input_section_.relobj(), file_name); }
 
// Returns 1 if THIS should appear before S in section order, -1 if S
// appears before THIS and 0 if they are not comparable.
3233,6 → 3422,28
if (!s1_has_priority && s2_has_priority)
return false;
 
// .ctors and .dtors sections without priority come after
// .init_array and .fini_array sections without priority.
if (!s1_has_priority
&& (s1.section_name() == ".ctors" || s1.section_name() == ".dtors")
&& s1.section_name() != s2.section_name())
return false;
if (!s2_has_priority
&& (s2.section_name() == ".ctors" || s2.section_name() == ".dtors")
&& s2.section_name() != s1.section_name())
return true;
 
// Sort by priority if we can.
if (s1_has_priority)
{
unsigned int s1_prio = s1.get_priority();
unsigned int s2_prio = s2.get_priority();
if (s1_prio < s2_prio)
return true;
else if (s1_prio > s2_prio)
return false;
}
 
// Check if a section order exists for these sections through a section
// ordering file. If sequence_num is 0, an order does not exist.
int sequence_num = s1.compare_section_ordering(s2);
3267,6 → 3478,38
return s1_secn_index < s2_secn_index;
}
 
// This updates the section order index of input sections according to the
// the order specified in the mapping from Section id to order index.
 
void
Output_section::update_section_layout(
const Section_layout_order& order_map)
{
for (Input_section_list::iterator p = this->input_sections_.begin();
p != this->input_sections_.end();
++p)
{
if (p->is_input_section()
|| p->is_relaxed_input_section())
{
Object* obj = (p->is_input_section()
? p->relobj()
: p->relaxed_input_section()->relobj());
unsigned int shndx = p->shndx();
Section_layout_order::const_iterator it
= order_map.find(Section_id(obj, shndx));
if (it == order_map.end())
continue;
unsigned int section_order_index = it->second;
if (section_order_index != 0)
{
p->set_section_order_index(section_order_index);
this->set_input_section_order_specified();
}
}
}
}
 
// Sort the input sections attached to an output section.
 
void
3309,7 → 3552,7
}
else
{
gold_assert(parameters->options().section_ordering_file());
gold_assert(this->input_section_order_specified());
std::sort(sort_list.begin(), sort_list.end(),
Input_section_sort_section_order_index_compare());
}
3349,7 → 3592,7
if (this->link_section_ != NULL)
oshdr->put_sh_link(this->link_section_->out_shndx());
else if (this->should_link_to_symtab_)
oshdr->put_sh_link(layout->symtab_section()->out_shndx());
oshdr->put_sh_link(layout->symtab_section_shndx());
else if (this->should_link_to_dynsym_)
oshdr->put_sh_link(layout->dynsym_section()->out_shndx());
else
3411,6 → 3654,26
p->write(of);
off = aligned_off + p->data_size();
}
 
// For incremental links, fill in unused chunks in debug sections
// with dummy compilation unit headers.
if (this->free_space_fill_ != NULL)
{
for (Free_list::Const_iterator p = this->free_list_.begin();
p != this->free_list_.end();
++p)
{
off_t off = p->start_;
size_t len = p->end_ - off;
this->free_space_fill_->write(of, this->offset() + off, len);
}
if (this->patch_space_ > 0)
{
off_t off = this->current_data_size_for_child() - this->patch_space_;
this->free_space_fill_->write(of, this->offset() + off,
this->patch_space_);
}
}
}
 
// If a section requires postprocessing, create the buffer to use.
4224,14 → 4487,15
(*p)->finalize_data_size();
}
 
gold_debug(DEBUG_INCREMENTAL,
"set_section_list_addresses: %08lx %08lx %s",
static_cast<long>(off),
static_cast<long>((*p)->data_size()),
((*p)->output_section() != NULL
? (*p)->output_section()->name() : "(special)"));
if (parameters->incremental_update())
gold_debug(DEBUG_INCREMENTAL,
"set_section_list_addresses: %08lx %08lx %s",
static_cast<long>(off),
static_cast<long>((*p)->data_size()),
((*p)->output_section() != NULL
? (*p)->output_section()->name() : "(special)"));
 
// We want to ignore the size of a SHF_TLS or SHT_NOBITS
// We want to ignore the size of a SHF_TLS SHT_NOBITS
// section. Such a section does not affect the size of a
// PT_LOAD segment.
if (!(*p)->is_section_flag_set(elfcpp::SHF_TLS)
/trunk/gnu/binutils/gold/plugin.h
131,6 → 131,7
: plugins_(), objects_(), deferred_layout_objects_(), input_file_(NULL),
plugin_input_file_(), rescannable_(), undefined_symbols_(),
any_claimed_(false), in_replacement_phase_(false), any_added_(false),
in_claim_file_handler_(false),
options_(options), workqueue_(NULL), task_(NULL), input_objects_(NULL),
symtab_(NULL), layout_(NULL), dirpath_(NULL), mapfile_(NULL),
this_blocker_(NULL), extra_search_path_()
153,12 → 154,23
 
// Load all plugin libraries.
void
load_plugins();
load_plugins(Layout* layout);
 
// Call the plugin claim-file handlers in turn to see if any claim the file.
Pluginobj*
claim_file(Input_file* input_file, off_t offset, off_t filesize);
claim_file(Input_file* input_file, off_t offset, off_t filesize,
Object* elf_object);
 
// Get the object associated with the handle and check if it is an elf object.
// If it is not a Pluginobj, it is an elf object.
Object*
get_elf_object(const void* handle);
 
// True if the claim_file handler of the plugins is being called.
bool
in_claim_file_handler()
{ return in_claim_file_handler_; }
 
// Let the plugin manager save an archive for later rescanning.
// This takes ownership of the Archive pointer.
void
173,7 → 185,7
void
all_symbols_read(Workqueue* workqueue, Task* task,
Input_objects* input_objects, Symbol_table* symtab,
Layout* layout, Dirsearch* dirpath, Mapfile* mapfile,
Dirsearch* dirpath, Mapfile* mapfile,
Task_token** last_blocker);
 
// Tell the plugin manager that we've a new undefined symbol which
218,8 → 230,8
Pluginobj*
make_plugin_object(unsigned int handle);
 
// Return the Pluginobj associated with the given HANDLE.
Pluginobj*
// Return the object associated with the given HANDLE.
Object*
object(unsigned int handle) const
{
if (handle >= this->objects_.size())
265,6 → 277,14
in_replacement_phase() const
{ return this->in_replacement_phase_; }
 
Input_objects*
input_objects() const
{ return this->input_objects_; }
 
Layout*
layout()
{ return this->layout_; }
 
private:
Plugin_manager(const Plugin_manager&);
Plugin_manager& operator=(const Plugin_manager&);
293,7 → 313,7
};
 
typedef std::list<Plugin*> Plugin_list;
typedef std::vector<Pluginobj*> Object_list;
typedef std::vector<Object*> Object_list;
typedef std::vector<Relobj*> Deferred_layout_list;
typedef std::vector<Rescannable> Rescannable_list;
typedef std::vector<Symbol*> Undefined_symbol_list;
340,6 → 360,9
// Whether any input files or libraries were added by a plugin.
bool any_added_;
 
// Set to true when the claim_file handler of a plugin is called.
bool in_claim_file_handler_;
 
const General_options& options_;
Workqueue* workqueue_;
Task* task_;
/trunk/gnu/binutils/gold/icf.cc
1,6 → 1,6
// icf.cc -- Identical Code Folding.
//
// Copyright 2009, 2010 Free Software Foundation, Inc.
// Copyright 2009, 2010, 2011 Free Software Foundation, Inc.
// Written by Sriraman Tallam <tmsriram@google.com>.
 
// This file is part of gold.
373,7 → 373,7
// This reloc points to a merge section. Hash the
// contents of this section.
if ((secn_flags & elfcpp::SHF_MERGE) != 0
&& parameters->target().can_icf_inline_merge_sections ())
&& parameters->target().can_icf_inline_merge_sections())
{
uint64_t entsize =
(it_v->first)->section_entsize(it_v->second);
/trunk/gnu/binutils/gold/incremental.h
46,7 → 46,6
class Incremental_binary;
class Incremental_library;
class Object;
class Script_info;
 
// Incremental input type as stored in .gnu_incremental_inputs.
 
259,9 → 258,15
{
public:
Script_info(const std::string& filename)
: filename_(filename), incremental_script_entry_(NULL)
: filename_(filename), input_file_index_(0),
incremental_script_entry_(NULL)
{ }
 
Script_info(const std::string& filename, unsigned int input_file_index)
: filename_(filename), input_file_index_(input_file_index),
incremental_script_entry_(NULL)
{ }
 
// Store a pointer to the incremental information for this script.
void
set_incremental_info(Incremental_script_entry* entry)
272,6 → 277,11
filename() const
{ return this->filename_; }
 
// Return the input file index.
unsigned int
input_file_index() const
{ return this->input_file_index_; }
 
// Return the pointer to the incremental information for this script.
Incremental_script_entry*
incremental_info() const
279,6 → 289,7
 
private:
const std::string filename_;
unsigned int input_file_index_;
Incremental_script_entry* incremental_script_entry_;
};
 
1403,12 → 1414,12
 
// Return an Incremental_library for the given input file.
Incremental_library*
get_library(unsigned int n)
get_library(unsigned int n) const
{ return this->library_map_[n]; }
 
// Return a Script_info for the given input file.
Script_info*
get_script_info(unsigned int n)
get_script_info(unsigned int n) const
{ return this->script_map_[n]; }
 
// Initialize the layout of the output file based on the existing
/trunk/gnu/binutils/gold/dirsearch.cc
66,8 → 66,9
DIR* d = opendir(this->dirname_);
if (d == NULL)
{
// We ignore directories which do not exist.
if (errno != ENOENT)
// We ignore directories which do not exist or are actually file
// names.
if (errno != ENOENT && errno != ENOTDIR)
gold::gold_error(_("%s: can not read directory: %s"),
this->dirname_, strerror(errno));
return;
/trunk/gnu/binutils/gold/freebsd.h
1,6 → 1,6
// freebsd.h -- FreeBSD support for gold -*- C++ -*-
 
// Copyright 2009 Free Software Foundation, Inc.
// Copyright 2009, 2011 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
 
// This file is part of gold.
30,67 → 30,17
{
 
// FreeBSD 4.1 and later wants the EI_OSABI field in the ELF header to
// be set to ELFOSABI_FREEBSD. This is a subclass of Sized_target
// which supports that. The real target would be a subclass of this
// one. We permit combining FreeBSD and non-FreeBSD object files.
// The effect of this target is to set the code in the output file.
// be set to ELFOSABI_FREEBSD. This is a target selector for targets
// which permit combining both FreeBSD and non-FreeBSD object files.
 
template<int size, bool big_endian>
class Target_freebsd : public Sized_target<size, big_endian>
{
public:
// Set the value to use for the EI_OSABI field in the ELF header.
void
set_osabi(elfcpp::ELFOSABI osabi)
{ this->osabi_ = osabi; }
 
protected:
Target_freebsd(const Target::Target_info* pti)
: Sized_target<size, big_endian>(pti),
osabi_(elfcpp::ELFOSABI_NONE)
{ }
 
virtual void
do_adjust_elf_header(unsigned char* view, int len) const;
 
private:
// Value to store in the EI_OSABI field of the ELF file header.
elfcpp::ELFOSABI osabi_;
};
 
// Adjust the ELF file header by storing the requested value in the
// OSABI field. This is for FreeBSD support.
 
template<int size, bool big_endian>
inline void
Target_freebsd<size, big_endian>::do_adjust_elf_header(unsigned char* view,
int len) const
{
if (this->osabi_ != elfcpp::ELFOSABI_NONE)
{
gold_assert(len == elfcpp::Elf_sizes<size>::ehdr_size);
 
elfcpp::Ehdr<size, false> ehdr(view);
unsigned char e_ident[elfcpp::EI_NIDENT];
memcpy(e_ident, ehdr.get_e_ident(), elfcpp::EI_NIDENT);
 
e_ident[elfcpp::EI_OSABI] = this->osabi_;
 
elfcpp::Ehdr_write<size, false> oehdr(view);
oehdr.put_e_ident(e_ident);
}
}
 
// A target selector for targets which permit combining both FreeBSD
// and non-FreeBSD object files.
 
class Target_selector_freebsd : public Target_selector
{
public:
Target_selector_freebsd(int machine, int size, bool is_big_endian,
const char* bfd_name,
const char* freebsd_bfd_name)
: Target_selector(machine, size, is_big_endian, NULL),
const char* freebsd_bfd_name,
const char* emulation)
: Target_selector(machine, size, is_big_endian, NULL, emulation),
bfd_name_(bfd_name), freebsd_bfd_name_(freebsd_bfd_name)
{ }
 
102,13 → 52,13
{
Target* ret = this->instantiate_target();
if (osabi == elfcpp::ELFOSABI_FREEBSD)
this->set_osabi(ret);
ret->set_osabi(static_cast<elfcpp::ELFOSABI>(osabi));
return ret;
}
// Recognize two names.
virtual Target*
do_recognize_by_name(const char* name)
do_recognize_by_bfd_name(const char* name)
{
if (strcmp(name, this->bfd_name_) == 0)
return this->instantiate_target();
115,7 → 65,7
else if (strcmp(name, this->freebsd_bfd_name_) == 0)
{
Target* ret = this->instantiate_target();
this->set_osabi(ret);
ret->set_osabi(elfcpp::ELFOSABI_FREEBSD);
return ret;
}
else
124,39 → 74,24
 
// Print both names in --help output.
virtual void
do_supported_names(std::vector<const char*>* names)
do_supported_bfd_names(std::vector<const char*>* names)
{
names->push_back(this->bfd_name_);
names->push_back(this->freebsd_bfd_name_);
}
 
private:
// Set the OSABI field. This is quite ugly.
void
set_osabi(Target* target)
// Return appropriate BFD name.
virtual const char*
do_target_bfd_name(const Target* target)
{
if (this->get_size() == 32)
{
if (this->is_big_endian())
static_cast<Target_freebsd<32, true>*>(target)->
set_osabi(elfcpp::ELFOSABI_FREEBSD);
else
static_cast<Target_freebsd<32, false>*>(target)->
set_osabi(elfcpp::ELFOSABI_FREEBSD);
}
else if (this->get_size() == 64)
{
if (this->is_big_endian())
static_cast<Target_freebsd<64, true>*>(target)->
set_osabi(elfcpp::ELFOSABI_FREEBSD);
else
static_cast<Target_freebsd<64, false>*>(target)->
set_osabi(elfcpp::ELFOSABI_FREEBSD);
}
else
gold_unreachable();
if (!this->is_our_target(target))
return NULL;
return (target->osabi() == elfcpp::ELFOSABI_FREEBSD
? this->freebsd_bfd_name_
: this->bfd_name_);
}
 
private:
// The BFD name for the non-Freebsd target.
const char* bfd_name_;
// The BFD name for the Freebsd target.
/trunk/gnu/binutils/gold/layout.cc
46,6 → 46,7
#include "ehframe.h"
#include "compressed_output.h"
#include "reduced_debug_output.h"
#include "object.h"
#include "reloc.h"
#include "descriptors.h"
#include "plugin.h"
161,6 → 162,11
 
++Free_list::num_allocates;
 
// We usually want to drop free chunks smaller than 4 bytes.
// If we need to guarantee a minimum hole size, though, we need
// to keep track of all free chunks.
const int fuzz = this->min_hole_ > 0 ? 0 : 3;
 
for (Iterator p = this->list_.begin(); p != this->list_.end(); ++p)
{
++Free_list::num_allocate_visits;
167,13 → 173,18
off_t start = p->start_ > minoff ? p->start_ : minoff;
start = align_address(start, align);
off_t end = start + len;
if (end <= p->end_)
if (end > p->end_ && p->end_ == this->length_ && this->extend_)
{
if (p->start_ + 3 >= start && p->end_ <= end + 3)
this->length_ = end;
p->end_ = end;
}
if (end == p->end_ || (end <= p->end_ - this->min_hole_))
{
if (p->start_ + fuzz >= start && p->end_ <= end + fuzz)
this->list_.erase(p);
else if (p->start_ + 3 >= start)
else if (p->start_ + fuzz >= start)
p->start_ = end;
else if (p->end_ <= end + 3)
else if (p->end_ <= end + fuzz)
p->end_ = start;
else
{
185,6 → 196,12
return start;
}
}
if (this->extend_)
{
off_t start = align_address(this->length_, align);
this->length_ = start + len;
return start;
}
return -1;
}
 
360,6 → 377,7
section_headers_(NULL),
tls_segment_(NULL),
relro_segment_(NULL),
interp_segment_(NULL),
increase_relro_(0),
symtab_section_(NULL),
symtab_xindex_(NULL),
386,11 → 404,14
any_postprocessing_sections_(false),
resized_signatures_(false),
have_stabstr_section_(false),
section_ordering_specified_(false),
incremental_inputs_(NULL),
record_output_section_data_from_script_(false),
script_output_section_data_list_(),
segment_states_(NULL),
relaxation_debug_check_(NULL),
input_section_position_(),
input_section_glob_(),
incremental_base_(NULL),
free_list_()
{
616,13 → 637,34
return NULL;
}
 
// When we put a .ctors or .dtors section with more than one word into
// a .init_array or .fini_array section, we need to reverse the words
// in the .ctors/.dtors section. This is because .init_array executes
// constructors front to back, where .ctors executes them back to
// front, and vice-versa for .fini_array/.dtors. Although we do want
// to remap .ctors/.dtors into .init_array/.fini_array because it can
// be more efficient, we don't want to change the order in which
// constructors/destructors are run. This set just keeps track of
// these sections which need to be reversed. It is only changed by
// Layout::layout. It should be a private member of Layout, but that
// would require layout.h to #include object.h to get the definition
// of Section_id.
static Unordered_set<Section_id, Section_id_hash> ctors_sections_in_init_array;
 
// Return whether OBJECT/SHNDX is a .ctors/.dtors section mapped to a
// .init_array/.fini_array section.
 
bool
Layout::is_ctors_in_init_array(Relobj* relobj, unsigned int shndx) const
{
return (ctors_sections_in_init_array.find(Section_id(relobj, shndx))
!= ctors_sections_in_init_array.end());
}
 
// Return the output section to use for section NAME with type TYPE
// and section flags FLAGS. NAME must be canonicalized in the string
// pool, and NAME_KEY is the key. IS_INTERP is true if this is the
// .interp section. IS_DYNAMIC_LINKER_SECTION is true if this section
// is used by the dynamic linker. IS_RELRO is true for a relro
// section. IS_LAST_RELRO is true for the last relro section.
// IS_FIRST_NON_RELRO is true for the first non-relro section.
// pool, and NAME_KEY is the key. ORDER is where this should appear
// in the output sections. IS_RELRO is true for a relro section.
 
Output_section*
Layout::get_output_section(const char* name, Stringpool::Key name_key,
629,6 → 671,18
elfcpp::Elf_Word type, elfcpp::Elf_Xword flags,
Output_section_order order, bool is_relro)
{
elfcpp::Elf_Word lookup_type = type;
 
// For lookup purposes, treat INIT_ARRAY, FINI_ARRAY, and
// PREINIT_ARRAY like PROGBITS. This ensures that we combine
// .init_array, .fini_array, and .preinit_array sections by name
// whatever their type in the input file. We do this because the
// types are not always right in the input files.
if (lookup_type == elfcpp::SHT_INIT_ARRAY
|| lookup_type == elfcpp::SHT_FINI_ARRAY
|| lookup_type == elfcpp::SHT_PREINIT_ARRAY)
lookup_type = elfcpp::SHT_PROGBITS;
 
elfcpp::Elf_Xword lookup_flags = flags;
 
// Ignoring SHF_WRITE and SHF_EXECINSTR here means that we combine
637,7 → 691,7
// controlling this.
lookup_flags &= ~(elfcpp::SHF_WRITE | elfcpp::SHF_EXECINSTR);
 
const Key key(name_key, std::make_pair(type, lookup_flags));
const Key key(name_key, std::make_pair(lookup_type, lookup_flags));
const std::pair<Key, Output_section*> v(key, NULL);
std::pair<Section_name_map::iterator, bool> ins(
this->section_name_map_.insert(v));
654,13 → 708,16
// there should be an option to control this.
Output_section* os = NULL;
 
if (type == elfcpp::SHT_PROGBITS)
if (lookup_type == elfcpp::SHT_PROGBITS)
{
if (flags == 0)
{
Output_section* same_name = this->find_output_section(name);
if (same_name != NULL
&& same_name->type() == elfcpp::SHT_PROGBITS
&& (same_name->type() == elfcpp::SHT_PROGBITS
|| same_name->type() == elfcpp::SHT_INIT_ARRAY
|| same_name->type() == elfcpp::SHT_FINI_ARRAY
|| same_name->type() == elfcpp::SHT_PREINIT_ARRAY)
&& (same_name->flags() & elfcpp::SHF_TLS) == 0)
os = same_name;
}
667,7 → 724,8
else if ((flags & elfcpp::SHF_TLS) == 0)
{
elfcpp::Elf_Xword zero_flags = 0;
const Key zero_key(name_key, std::make_pair(type, zero_flags));
const Key zero_key(name_key, std::make_pair(lookup_type,
zero_flags));
Section_name_map::iterator p =
this->section_name_map_.find(zero_key);
if (p != this->section_name_map_.end())
687,12 → 745,9
// RELOBJ, with type TYPE and flags FLAGS. RELOBJ may be NULL for a
// linker created section. IS_INPUT_SECTION is true if we are
// choosing an output section for an input section found in a input
// file. IS_INTERP is true if this is the .interp section.
// IS_DYNAMIC_LINKER_SECTION is true if this section is used by the
// dynamic linker. IS_RELRO is true for a relro section.
// IS_LAST_RELRO is true for the last relro section.
// IS_FIRST_NON_RELRO is true for the first non-relro section. This
// will return NULL if the input section should be discarded.
// file. ORDER is where this section should appear in the output
// sections. IS_RELRO is true for a relro section. This will return
// NULL if the input section should be discarded.
 
Output_section*
Layout::choose_output_section(const Relobj* relobj, const char* name,
820,7 → 875,7
if (is_input_section
&& !this->script_options_->saw_sections_clause()
&& !parameters->options().relocatable())
name = Layout::output_section_name(name, &len);
name = Layout::output_section_name(relobj, name, &len);
 
Stringpool::Key name_key;
name = this->namepool_.add_with_length(name, len, true, &name_key);
889,32 → 944,11
if (!this->include_section(object, name, shdr))
return NULL;
 
Output_section* os;
 
// Sometimes .init_array*, .preinit_array* and .fini_array* do not have
// correct section types. Force them here.
elfcpp::Elf_Word sh_type = shdr.get_sh_type();
if (sh_type == elfcpp::SHT_PROGBITS)
{
static const char init_array_prefix[] = ".init_array";
static const char preinit_array_prefix[] = ".preinit_array";
static const char fini_array_prefix[] = ".fini_array";
static size_t init_array_prefix_size = sizeof(init_array_prefix) - 1;
static size_t preinit_array_prefix_size =
sizeof(preinit_array_prefix) - 1;
static size_t fini_array_prefix_size = sizeof(fini_array_prefix) - 1;
 
if (strncmp(name, init_array_prefix, init_array_prefix_size) == 0)
sh_type = elfcpp::SHT_INIT_ARRAY;
else if (strncmp(name, preinit_array_prefix, preinit_array_prefix_size)
== 0)
sh_type = elfcpp::SHT_PREINIT_ARRAY;
else if (strncmp(name, fini_array_prefix, fini_array_prefix_size) == 0)
sh_type = elfcpp::SHT_FINI_ARRAY;
}
 
// In a relocatable link a grouped section must not be combined with
// any other sections.
Output_section* os;
if (parameters->options().relocatable()
&& (shdr.get_sh_flags() & elfcpp::SHF_GROUP) != 0)
{
932,16 → 966,38
}
 
// By default the GNU linker sorts input sections whose names match
// .ctor.*, .dtor.*, .init_array.*, or .fini_array.*. The sections
// are sorted by name. This is used to implement constructor
// priority ordering. We are compatible.
// .ctors.*, .dtors.*, .init_array.*, or .fini_array.*. The
// sections are sorted by name. This is used to implement
// constructor priority ordering. We are compatible. When we put
// .ctor sections in .init_array and .dtor sections in .fini_array,
// we must also sort plain .ctor and .dtor sections.
if (!this->script_options_->saw_sections_clause()
&& !parameters->options().relocatable()
&& (is_prefix_of(".ctors.", name)
|| is_prefix_of(".dtors.", name)
|| is_prefix_of(".init_array.", name)
|| is_prefix_of(".fini_array.", name)))
|| is_prefix_of(".fini_array.", name)
|| (parameters->options().ctors_in_init_array()
&& (strcmp(name, ".ctors") == 0
|| strcmp(name, ".dtors") == 0))))
os->set_must_sort_attached_input_sections();
 
// If this is a .ctors or .ctors.* section being mapped to a
// .init_array section, or a .dtors or .dtors.* section being mapped
// to a .fini_array section, we will need to reverse the words if
// there is more than one. Record this section for later. See
// ctors_sections_in_init_array above.
if (!this->script_options_->saw_sections_clause()
&& !parameters->options().relocatable()
&& shdr.get_sh_size() > size / 8
&& (((strcmp(name, ".ctors") == 0
|| is_prefix_of(".ctors.", name))
&& strcmp(os->name(), ".init_array") == 0)
|| ((strcmp(name, ".dtors") == 0
|| is_prefix_of(".dtors.", name))
&& strcmp(os->name(), ".fini_array") == 0)))
ctors_sections_in_init_array.insert(Section_id(object, shndx));
 
// FIXME: Handle SHF_LINK_ORDER somewhere.
 
elfcpp::Elf_Xword orig_flags = os->flags();
1095,11 → 1151,77
unsigned int reloc_shndx, unsigned int reloc_type,
off_t* off)
{
gold_assert(shdr.get_sh_type() == elfcpp::SHT_PROGBITS);
gold_assert(shdr.get_sh_type() == elfcpp::SHT_PROGBITS
|| shdr.get_sh_type() == elfcpp::SHT_X86_64_UNWIND);
gold_assert((shdr.get_sh_flags() & elfcpp::SHF_ALLOC) != 0);
 
const char* const name = ".eh_frame";
Output_section* os = this->choose_output_section(object, name,
Output_section* os = this->make_eh_frame_section(object);
if (os == NULL)
return NULL;
 
gold_assert(this->eh_frame_section_ == os);
 
elfcpp::Elf_Xword orig_flags = os->flags();
 
if (!parameters->incremental()
&& this->eh_frame_data_->add_ehframe_input_section(object,
symbols,
symbols_size,
symbol_names,
symbol_names_size,
shndx,
reloc_shndx,
reloc_type))
{
os->update_flags_for_input_section(shdr.get_sh_flags());
 
// A writable .eh_frame section is a RELRO section.
if ((orig_flags & (elfcpp::SHF_WRITE | elfcpp::SHF_EXECINSTR))
!= (os->flags() & (elfcpp::SHF_WRITE | elfcpp::SHF_EXECINSTR)))
{
os->set_is_relro();
os->set_order(ORDER_RELRO);
}
 
// We found a .eh_frame section we are going to optimize, so now
// we can add the set of optimized sections to the output
// section. We need to postpone adding this until we've found a
// section we can optimize so that the .eh_frame section in
// crtbegin.o winds up at the start of the output section.
if (!this->added_eh_frame_data_)
{
os->add_output_section_data(this->eh_frame_data_);
this->added_eh_frame_data_ = true;
}
*off = -1;
}
else
{
// We couldn't handle this .eh_frame section for some reason.
// Add it as a normal section.
bool saw_sections_clause = this->script_options_->saw_sections_clause();
*off = os->add_input_section(this, object, shndx, ".eh_frame", shdr,
reloc_shndx, saw_sections_clause);
this->have_added_input_section_ = true;
 
if ((orig_flags & (elfcpp::SHF_WRITE | elfcpp::SHF_EXECINSTR))
!= (os->flags() & (elfcpp::SHF_WRITE | elfcpp::SHF_EXECINSTR)))
os->set_order(this->default_section_order(os, false));
}
 
return os;
}
 
// Create and return the magic .eh_frame section. Create
// .eh_frame_hdr also if appropriate. OBJECT is the object with the
// input .eh_frame section; it may be NULL.
 
Output_section*
Layout::make_eh_frame_section(const Relobj* object)
{
// FIXME: On x86_64, this could use SHT_X86_64_UNWIND rather than
// SHT_PROGBITS.
Output_section* os = this->choose_output_section(object, ".eh_frame",
elfcpp::SHT_PROGBITS,
elfcpp::SHF_ALLOC, false,
ORDER_EHFRAME, false);
1143,47 → 1265,31
}
}
 
gold_assert(this->eh_frame_section_ == os);
return os;
}
 
if (!parameters->incremental()
&& this->eh_frame_data_->add_ehframe_input_section(object,
symbols,
symbols_size,
symbol_names,
symbol_names_size,
shndx,
reloc_shndx,
reloc_type))
// Add an exception frame for a PLT. This is called from target code.
 
void
Layout::add_eh_frame_for_plt(Output_data* plt, const unsigned char* cie_data,
size_t cie_length, const unsigned char* fde_data,
size_t fde_length)
{
if (parameters->incremental())
{
os->update_flags_for_input_section(shdr.get_sh_flags());
 
// A writable .eh_frame section is a RELRO section.
if ((shdr.get_sh_flags() & elfcpp::SHF_WRITE) != 0)
os->set_is_relro();
 
// We found a .eh_frame section we are going to optimize, so now
// we can add the set of optimized sections to the output
// section. We need to postpone adding this until we've found a
// section we can optimize so that the .eh_frame section in
// crtbegin.o winds up at the start of the output section.
if (!this->added_eh_frame_data_)
{
os->add_output_section_data(this->eh_frame_data_);
this->added_eh_frame_data_ = true;
}
*off = -1;
// FIXME: Maybe this could work some day....
return;
}
else
Output_section* os = this->make_eh_frame_section(NULL);
if (os == NULL)
return;
this->eh_frame_data_->add_ehframe_for_plt(plt, cie_data, cie_length,
fde_data, fde_length);
if (!this->added_eh_frame_data_)
{
// We couldn't handle this .eh_frame section for some reason.
// Add it as a normal section.
bool saw_sections_clause = this->script_options_->saw_sections_clause();
*off = os->add_input_section(this, object, shndx, name, shdr, reloc_shndx,
saw_sections_clause);
this->have_added_input_section_ = true;
os->add_output_section_data(this->eh_frame_data_);
this->added_eh_frame_data_ = true;
}
 
return os;
}
 
// Add POSD to an output section using NAME, TYPE, and FLAGS. Return
1251,6 → 1357,18
}
else
{
// Sometimes .init_array*, .preinit_array* and .fini_array* do
// not have correct section types. Force them here.
if (type == elfcpp::SHT_PROGBITS)
{
if (is_prefix_of(".init_array", name))
type = elfcpp::SHT_INIT_ARRAY;
else if (is_prefix_of(".preinit_array", name))
type = elfcpp::SHT_PREINIT_ARRAY;
else if (is_prefix_of(".fini_array", name))
type = elfcpp::SHT_FINI_ARRAY;
}
 
// FIXME: const_cast is ugly.
Target* target = const_cast<Target*>(&parameters->target());
os = target->make_output_section(name, type, flags);
1298,10 → 1416,12
// do the same. We need to know that this might happen before we
// attach any input sections.
if (!this->script_options_->saw_sections_clause()
&& (strcmp(name, ".ctors") == 0
|| strcmp(name, ".dtors") == 0
|| strcmp(name, ".init_array") == 0
|| strcmp(name, ".fini_array") == 0))
&& !parameters->options().relocatable()
&& (strcmp(name, ".init_array") == 0
|| strcmp(name, ".fini_array") == 0
|| (!parameters->options().ctors_in_init_array()
&& (strcmp(name, ".ctors") == 0
|| strcmp(name, ".dtors") == 0))))
os->set_may_sort_attached_input_sections();
 
// Check for .stab*str sections, as .stab* sections need to link to
1312,6 → 1432,34
&& strcmp(name + strlen(name) - 3, "str") == 0)
this->have_stabstr_section_ = true;
 
// During a full incremental link, we add patch space to most
// PROGBITS and NOBITS sections. Flag those that may be
// arbitrarily padded.
if ((type == elfcpp::SHT_PROGBITS || type == elfcpp::SHT_NOBITS)
&& order != ORDER_INTERP
&& order != ORDER_INIT
&& order != ORDER_PLT
&& order != ORDER_FINI
&& order != ORDER_RELRO_LAST
&& order != ORDER_NON_RELRO_FIRST
&& strcmp(name, ".ctors") != 0
&& strcmp(name, ".dtors") != 0
&& strcmp(name, ".jcr") != 0)
{
os->set_is_patch_space_allowed();
 
// Certain sections require "holes" to be filled with
// specific fill patterns. These fill patterns may have
// a minimum size, so we must prevent allocations from the
// free list that leave a hole smaller than the minimum.
if (strcmp(name, ".debug_info") == 0)
os->set_free_space_fill(new Output_fill_debug_info(false));
else if (strcmp(name, ".debug_types") == 0)
os->set_free_space_fill(new Output_fill_debug_info(true));
else if (strcmp(name, ".debug_line") == 0)
os->set_free_space_fill(new Output_fill_debug_line());
}
 
// If we have already attached the sections to segments, then we
// need to attach this one now. This happens for sections created
// directly by the linker.
1541,6 → 1689,20
this->make_output_segment(elfcpp::PT_GNU_RELRO, seg_flags);
this->relro_segment_->add_output_section_to_nonload(os, seg_flags);
}
 
// If we see a section named .interp, put it into a PT_INTERP
// segment. This seems broken to me, but this is what GNU ld does,
// and glibc expects it.
if (strcmp(os->name(), ".interp") == 0
&& !this->script_options_->saw_phdrs_clause())
{
if (this->interp_segment_ == NULL)
this->make_output_segment(elfcpp::PT_INTERP, seg_flags);
else
gold_warning(_("multiple '.interp' sections in input files "
"may cause confusing PT_INTERP segment"));
this->interp_segment_->add_output_section_to_nonload(os, seg_flags);
}
}
 
// Make an output section for a script.
1645,15 → 1807,20
false, ORDER_RELRO,
true);
 
this->dynamic_symbol_ =
symtab->define_in_output_data("_DYNAMIC", NULL, Symbol_table::PREDEFINED,
this->dynamic_section_, 0, 0,
elfcpp::STT_OBJECT, elfcpp::STB_LOCAL,
elfcpp::STV_HIDDEN, 0, false, false);
// A linker script may discard .dynamic, so check for NULL.
if (this->dynamic_section_ != NULL)
{
this->dynamic_symbol_ =
symtab->define_in_output_data("_DYNAMIC", NULL,
Symbol_table::PREDEFINED,
this->dynamic_section_, 0, 0,
elfcpp::STT_OBJECT, elfcpp::STB_LOCAL,
elfcpp::STV_HIDDEN, 0, false, false);
 
this->dynamic_data_ = new Output_data_dynamic(&this->dynpool_);
this->dynamic_data_ = new Output_data_dynamic(&this->dynpool_);
 
this->dynamic_section_->add_output_section_data(this->dynamic_data_);
this->dynamic_section_->add_output_section_data(this->dynamic_data_);
}
}
 
// For each output section whose name can be represented as C symbol,
1946,8 → 2113,12
// If the user set the address of the text segment, that may not be
// compatible with putting the segment headers and file headers into
// that segment.
if (parameters->options().user_set_Ttext())
load_seg = NULL;
if (parameters->options().user_set_Ttext()
&& parameters->options().Ttext() % target->common_pagesize() != 0)
{
load_seg = NULL;
phdr_seg = NULL;
}
 
gold_assert(phdr_seg == NULL
|| load_seg != NULL
2063,7 → 2234,7
}
 
// Read the sequence of input sections from the file specified with
// --section-ordering-file.
// option --section-ordering-file.
 
void
Layout::read_layout_from_file()
2079,6 → 2250,7
 
std::getline(in, line); // this chops off the trailing \n, if any
unsigned int position = 1;
this->set_section_ordering_specified();
 
while (in)
{
2163,8 → 2335,11
&versions);
 
// Create the .interp section to hold the name of the
// interpreter, and put it in a PT_INTERP segment.
if (!parameters->options().shared())
// interpreter, and put it in a PT_INTERP segment. Don't do it
// if we saw a .interp section in an input file.
if ((!parameters->options().shared()
|| parameters->options().dynamic_linker() != NULL)
&& this->interp_segment_ == NULL)
this->create_interp(target);
 
// Finish the .dynamic section to hold the dynamic data, and put
2673,7 → 2848,7
 
// Return whether SEG1 should be before SEG2 in the output file. This
// is based entirely on the segment type and flags. When this is
// called the segment addresses has normally not yet been set.
// called the segment addresses have normally not yet been set.
 
bool
Layout::segment_precedes(const Output_segment* seg1,
2799,8 → 2974,10
return (flags1 & elfcpp::PF_R) == 0;
 
// We shouldn't get here--we shouldn't create segments which we
// can't distinguish.
gold_unreachable();
// can't distinguish. Unless of course we are using a weird linker
// script.
gold_assert(this->script_options_->saw_phdrs_clause());
return false;
}
 
// Increase OFF so that it is congruent to ADDR modulo ABI_PAGESIZE.
2824,9 → 3001,11
Layout::set_segment_offsets(const Target* target, Output_segment* load_seg,
unsigned int* pshndx)
{
// Sort them into the final order.
std::sort(this->segment_list_.begin(), this->segment_list_.end(),
Layout::Compare_segments());
// Sort them into the final order. We use a stable sort so that we
// don't randomize the order of indistinguishable segments created
// by linker scripts.
std::stable_sort(this->segment_list_.begin(), this->segment_list_.end(),
Layout::Compare_segments(this));
 
// Find the PT_LOAD segments, and set their addresses and offsets
// and their section's addresses and offsets.
2878,6 → 3057,11
// the physical address.
addr = (*p)->paddr();
}
else if (parameters->options().user_set_Ttext()
&& ((*p)->flags() & elfcpp::PF_W) == 0)
{
are_addresses_set = true;
}
else if (parameters->options().user_set_Tdata()
&& ((*p)->flags() & elfcpp::PF_W) != 0
&& (!parameters->options().user_set_Tbss()
3560,20 → 3744,27
ORDER_DYNAMIC_LINKER,
false);
 
Output_section_data* odata = new Output_data_fixed_space(index * symsize,
align,
"** dynsym");
dynsym->add_output_section_data(odata);
// Check for NULL as a linker script may discard .dynsym.
if (dynsym != NULL)
{
Output_section_data* odata = new Output_data_fixed_space(index * symsize,
align,
"** dynsym");
dynsym->add_output_section_data(odata);
 
dynsym->set_info(local_symcount);
dynsym->set_entsize(symsize);
dynsym->set_addralign(align);
dynsym->set_info(local_symcount);
dynsym->set_entsize(symsize);
dynsym->set_addralign(align);
 
this->dynsym_section_ = dynsym;
this->dynsym_section_ = dynsym;
}
 
Output_data_dynamic* const odyn = this->dynamic_data_;
odyn->add_section_address(elfcpp::DT_SYMTAB, dynsym);
odyn->add_constant(elfcpp::DT_SYMENT, symsize);
if (odyn != NULL)
{
odyn->add_section_address(elfcpp::DT_SYMTAB, dynsym);
odyn->add_constant(elfcpp::DT_SYMENT, symsize);
}
 
// If there are more than SHN_LORESERVE allocated sections, we
// create a .dynsym_shndx section. It is possible that we don't
3590,20 → 3781,23
elfcpp::SHF_ALLOC,
false, ORDER_DYNAMIC_LINKER, false);
 
this->dynsym_xindex_ = new Output_symtab_xindex(index);
if (dynsym_xindex != NULL)
{
this->dynsym_xindex_ = new Output_symtab_xindex(index);
 
dynsym_xindex->add_output_section_data(this->dynsym_xindex_);
dynsym_xindex->add_output_section_data(this->dynsym_xindex_);
 
dynsym_xindex->set_link_section(dynsym);
dynsym_xindex->set_addralign(4);
dynsym_xindex->set_entsize(4);
dynsym_xindex->set_link_section(dynsym);
dynsym_xindex->set_addralign(4);
dynsym_xindex->set_entsize(4);
 
dynsym_xindex->set_after_input_sections();
dynsym_xindex->set_after_input_sections();
 
// This tells the driver code to wait until the symbol table has
// written out before writing out the postprocessing sections,
// including the .dynsym_shndx section.
this->any_postprocessing_sections_ = true;
// This tells the driver code to wait until the symbol table
// has written out before writing out the postprocessing
// sections, including the .dynsym_shndx section.
this->any_postprocessing_sections_ = true;
}
}
 
// Create the dynamic string table section.
3615,16 → 3809,24
ORDER_DYNAMIC_LINKER,
false);
 
Output_section_data* strdata = new Output_data_strtab(&this->dynpool_);
dynstr->add_output_section_data(strdata);
if (dynstr != NULL)
{
Output_section_data* strdata = new Output_data_strtab(&this->dynpool_);
dynstr->add_output_section_data(strdata);
 
dynsym->set_link_section(dynstr);
this->dynamic_section_->set_link_section(dynstr);
if (dynsym != NULL)
dynsym->set_link_section(dynstr);
if (this->dynamic_section_ != NULL)
this->dynamic_section_->set_link_section(dynstr);
 
odyn->add_section_address(elfcpp::DT_STRTAB, dynstr);
odyn->add_section_size(elfcpp::DT_STRSZ, dynstr);
if (odyn != NULL)
{
odyn->add_section_address(elfcpp::DT_STRTAB, dynstr);
odyn->add_section_size(elfcpp::DT_STRSZ, dynstr);
}
 
*pdynstr = dynstr;
*pdynstr = dynstr;
}
 
// Create the hash tables.
 
3645,12 → 3847,18
hashlen,
align,
"** hash");
hashsec->add_output_section_data(hashdata);
if (hashsec != NULL && hashdata != NULL)
hashsec->add_output_section_data(hashdata);
 
hashsec->set_link_section(dynsym);
hashsec->set_entsize(4);
if (hashsec != NULL)
{
if (dynsym != NULL)
hashsec->set_link_section(dynsym);
hashsec->set_entsize(4);
}
 
odyn->add_section_address(elfcpp::DT_HASH, hashsec);
if (odyn != NULL)
odyn->add_section_address(elfcpp::DT_HASH, hashsec);
}
 
if (strcmp(parameters->options().hash_style(), "gnu") == 0
3670,17 → 3878,23
hashlen,
align,
"** hash");
hashsec->add_output_section_data(hashdata);
if (hashsec != NULL && hashdata != NULL)
hashsec->add_output_section_data(hashdata);
 
hashsec->set_link_section(dynsym);
if (hashsec != NULL)
{
if (dynsym != NULL)
hashsec->set_link_section(dynsym);
 
// For a 64-bit target, the entries in .gnu.hash do not have a
// uniform size, so we only set the entry size for a 32-bit
// target.
if (parameters->target().get_size() == 32)
hashsec->set_entsize(4);
// For a 64-bit target, the entries in .gnu.hash do not have
// a uniform size, so we only set the entry size for a
// 32-bit target.
if (parameters->target().get_size() == 32)
hashsec->set_entsize(4);
 
odyn->add_section_address(elfcpp::DT_GNU_HASH, hashsec);
if (odyn != NULL)
odyn->add_section_address(elfcpp::DT_GNU_HASH, hashsec);
}
}
}
 
3690,7 → 3904,8
Layout::assign_local_dynsym_offsets(const Input_objects* input_objects)
{
Output_section* dynsym = this->dynsym_section_;
gold_assert(dynsym != NULL);
if (dynsym == NULL)
return;
 
off_t off = dynsym->offset();
 
3771,46 → 3986,59
ORDER_DYNAMIC_LINKER,
false);
 
unsigned char* vbuf;
unsigned int vsize;
versions->symbol_section_contents<size, big_endian>(symtab, &this->dynpool_,
local_symcount,
dynamic_symbols,
&vbuf, &vsize);
// Check for NULL since a linker script may discard this section.
if (vsec != NULL)
{
unsigned char* vbuf;
unsigned int vsize;
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,
"** versions");
Output_section_data* vdata = new Output_data_const_buffer(vbuf, vsize, 2,
"** versions");
 
vsec->add_output_section_data(vdata);
vsec->set_entsize(2);
vsec->set_link_section(this->dynsym_section_);
vsec->add_output_section_data(vdata);
vsec->set_entsize(2);
vsec->set_link_section(this->dynsym_section_);
}
 
Output_data_dynamic* const odyn = this->dynamic_data_;
odyn->add_section_address(elfcpp::DT_VERSYM, vsec);
if (odyn != NULL && vsec != NULL)
odyn->add_section_address(elfcpp::DT_VERSYM, vsec);
 
if (versions->any_defs())
{
Output_section* vdsec;
vdsec= this->choose_output_section(NULL, ".gnu.version_d",
elfcpp::SHT_GNU_verdef,
elfcpp::SHF_ALLOC,
false, ORDER_DYNAMIC_LINKER, false);
vdsec = this->choose_output_section(NULL, ".gnu.version_d",
elfcpp::SHT_GNU_verdef,
elfcpp::SHF_ALLOC,
false, ORDER_DYNAMIC_LINKER, false);
 
unsigned char* vdbuf;
unsigned int vdsize;
unsigned int vdentries;
versions->def_section_contents<size, big_endian>(&this->dynpool_, &vdbuf,
&vdsize, &vdentries);
if (vdsec != NULL)
{
unsigned char* vdbuf;
unsigned int vdsize;
unsigned int vdentries;
versions->def_section_contents<size, big_endian>(&this->dynpool_,
&vdbuf, &vdsize,
&vdentries);
 
Output_section_data* vddata =
new Output_data_const_buffer(vdbuf, vdsize, 4, "** version defs");
Output_section_data* vddata =
new Output_data_const_buffer(vdbuf, vdsize, 4, "** version defs");
 
vdsec->add_output_section_data(vddata);
vdsec->set_link_section(dynstr);
vdsec->set_info(vdentries);
vdsec->add_output_section_data(vddata);
vdsec->set_link_section(dynstr);
vdsec->set_info(vdentries);
 
odyn->add_section_address(elfcpp::DT_VERDEF, vdsec);
odyn->add_constant(elfcpp::DT_VERDEFNUM, vdentries);
if (odyn != NULL)
{
odyn->add_section_address(elfcpp::DT_VERDEF, vdsec);
odyn->add_constant(elfcpp::DT_VERDEFNUM, vdentries);
}
}
}
 
if (versions->any_needs())
3821,22 → 4049,28
elfcpp::SHF_ALLOC,
false, ORDER_DYNAMIC_LINKER, false);
 
unsigned char* vnbuf;
unsigned int vnsize;
unsigned int vnentries;
versions->need_section_contents<size, big_endian>(&this->dynpool_,
&vnbuf, &vnsize,
&vnentries);
if (vnsec != NULL)
{
unsigned char* vnbuf;
unsigned int vnsize;
unsigned int vnentries;
versions->need_section_contents<size, big_endian>(&this->dynpool_,
&vnbuf, &vnsize,
&vnentries);
 
Output_section_data* vndata =
new Output_data_const_buffer(vnbuf, vnsize, 4, "** version refs");
Output_section_data* vndata =
new Output_data_const_buffer(vnbuf, vnsize, 4, "** version refs");
 
vnsec->add_output_section_data(vndata);
vnsec->set_link_section(dynstr);
vnsec->set_info(vnentries);
vnsec->add_output_section_data(vndata);
vnsec->set_link_section(dynstr);
vnsec->set_info(vnentries);
 
odyn->add_section_address(elfcpp::DT_VERNEED, vnsec);
odyn->add_constant(elfcpp::DT_VERNEEDNUM, vnentries);
if (odyn != NULL)
{
odyn->add_section_address(elfcpp::DT_VERNEED, vnsec);
odyn->add_constant(elfcpp::DT_VERNEEDNUM, vnentries);
}
}
}
}
 
3845,6 → 4079,8
void
Layout::create_interp(const Target* target)
{
gold_assert(this->interp_segment_ == NULL);
 
const char* interp = parameters->options().dynamic_linker();
if (interp == NULL)
{
3861,14 → 4097,8
elfcpp::SHF_ALLOC,
false, ORDER_INTERP,
false);
osec->add_output_section_data(odata);
 
if (!this->script_options_->saw_phdrs_clause())
{
Output_segment* oseg = this->make_output_segment(elfcpp::PT_INTERP,
elfcpp::PF_R);
oseg->add_output_section_to_nonload(osec, elfcpp::PF_R);
}
if (osec != NULL)
osec->add_output_section_data(odata);
}
 
// Add dynamic tags for the PLT and the dynamic relocs. This is
3884,7 → 4114,8
// some targets have multiple reloc sections in PLT_REL.
 
// If DYN_REL is not NULL, it is used for DT_REL/DT_RELA,
// DT_RELSZ/DT_RELASZ, DT_RELENT/DT_RELAENT.
// DT_RELSZ/DT_RELASZ, DT_RELENT/DT_RELAENT. Again we use the output
// section.
 
// If ADD_DEBUG is true, we add a DT_DEBUG entry when generating an
// executable.
3913,13 → 4144,16
if (dyn_rel != NULL && dyn_rel->output_section() != NULL)
{
odyn->add_section_address(use_rel ? elfcpp::DT_REL : elfcpp::DT_RELA,
dyn_rel);
if (plt_rel != NULL && dynrel_includes_plt)
dyn_rel->output_section());
if (plt_rel != NULL
&& plt_rel->output_section() != NULL
&& dynrel_includes_plt)
odyn->add_section_size(use_rel ? elfcpp::DT_RELSZ : elfcpp::DT_RELASZ,
dyn_rel, plt_rel);
dyn_rel->output_section(),
plt_rel->output_section());
else
odyn->add_section_size(use_rel ? elfcpp::DT_RELSZ : elfcpp::DT_RELASZ,
dyn_rel);
dyn_rel->output_section());
const int size = parameters->target().get_size();
elfcpp::DT rel_tag;
int rel_size;
3970,7 → 4204,8
Layout::finish_dynamic_section(const Input_objects* input_objects,
const Symbol_table* symtab)
{
if (!this->script_options_->saw_phdrs_clause())
if (!this->script_options_->saw_phdrs_clause()
&& this->dynamic_section_ != NULL)
{
Output_segment* oseg = this->make_output_segment(elfcpp::PT_DYNAMIC,
(elfcpp::PF_R
3980,6 → 4215,8
}
 
Output_data_dynamic* const odyn = this->dynamic_data_;
if (odyn == NULL)
return;
 
for (Input_objects::Dynobj_iterator p = input_objects->dynobj_begin();
p != input_objects->dynobj_end();
4072,7 → 4309,8
p != this->segment_list_.end();
++p)
{
if (((*p)->flags() & elfcpp::PF_W) == 0
if ((*p)->type() == elfcpp::PT_LOAD
&& ((*p)->flags() & elfcpp::PF_W) == 0
&& (*p)->has_dynamic_reloc())
{
have_textrel = true;
4092,7 → 4330,7
{
if (((*p)->flags() & elfcpp::SHF_ALLOC) != 0
&& ((*p)->flags() & elfcpp::SHF_WRITE) == 0
&& ((*p)->has_dynamic_reloc()))
&& (*p)->has_dynamic_reloc())
{
have_textrel = true;
break;
4100,8 → 4338,18
}
}
 
// Add a DT_FLAGS entry. We add it even if no flags are set so that
// post-link tools can easily modify these flags if desired.
if (parameters->options().filter() != NULL)
odyn->add_string(elfcpp::DT_FILTER, parameters->options().filter());
if (parameters->options().any_auxiliary())
{
for (options::String_set::const_iterator p =
parameters->options().auxiliary_begin();
p != parameters->options().auxiliary_end();
++p)
odyn->add_string(elfcpp::DT_AUXILIARY, *p);
}
 
// Add a DT_FLAGS entry if necessary.
unsigned int flags = 0;
if (have_textrel)
{
4127,7 → 4375,8
}
if (parameters->options().now())
flags |= elfcpp::DF_BIND_NOW;
odyn->add_constant(elfcpp::DT_FLAGS, flags);
if (flags != 0)
odyn->add_constant(elfcpp::DT_FLAGS, flags);
 
flags = 0;
if (parameters->options().initfirst())
4152,7 → 4401,9
flags |= elfcpp::DF_1_ORIGIN;
if (parameters->options().now())
flags |= elfcpp::DF_1_NOW;
if (flags)
if (parameters->options().Bgroup())
flags |= elfcpp::DF_1_GROUP;
if (flags != 0)
odyn->add_constant(elfcpp::DT_FLAGS_1, flags);
}
 
4163,7 → 4414,11
Layout::set_dynamic_symbol_size(const Symbol_table* symtab)
{
Output_data_dynamic* const odyn = this->dynamic_data_;
if (odyn == NULL)
return;
odyn->finalize_data_size();
if (this->dynamic_symbol_ == NULL)
return;
off_t data_size = odyn->data_size();
const int size = parameters->target().get_size();
if (size == 32)
4183,8 → 4438,6
const Layout::Section_name_mapping Layout::section_name_mapping[] =
{
MAPPING_INIT(".text.", ".text"),
MAPPING_INIT(".ctors.", ".ctors"),
MAPPING_INIT(".dtors.", ".dtors"),
MAPPING_INIT(".rodata.", ".rodata"),
MAPPING_INIT(".data.rel.ro.local", ".data.rel.ro.local"),
MAPPING_INIT(".data.rel.ro", ".data.rel.ro"),
4236,7 → 4489,8
// length of NAME.
 
const char*
Layout::output_section_name(const char* name, size_t* plen)
Layout::output_section_name(const Relobj* relobj, const char* name,
size_t* plen)
{
// gcc 4.3 generates the following sorts of section names when it
// needs a section name specific to a function:
4283,9 → 4537,62
}
}
 
// As an additional complication, .ctors sections are output in
// either .ctors or .init_array sections, and .dtors sections are
// output in either .dtors or .fini_array sections.
if (is_prefix_of(".ctors.", name) || is_prefix_of(".dtors.", name))
{
if (parameters->options().ctors_in_init_array())
{
*plen = 11;
return name[1] == 'c' ? ".init_array" : ".fini_array";
}
else
{
*plen = 6;
return name[1] == 'c' ? ".ctors" : ".dtors";
}
}
if (parameters->options().ctors_in_init_array()
&& (strcmp(name, ".ctors") == 0 || strcmp(name, ".dtors") == 0))
{
// To make .init_array/.fini_array work with gcc we must exclude
// .ctors and .dtors sections from the crtbegin and crtend
// files.
if (relobj == NULL
|| (!Layout::match_file_name(relobj, "crtbegin")
&& !Layout::match_file_name(relobj, "crtend")))
{
*plen = 11;
return name[1] == 'c' ? ".init_array" : ".fini_array";
}
}
 
return name;
}
 
// Return true if RELOBJ is an input file whose base name matches
// FILE_NAME. The base name must have an extension of ".o", and must
// be exactly FILE_NAME.o or FILE_NAME, one character, ".o". This is
// to match crtbegin.o as well as crtbeginS.o without getting confused
// by other possibilities. Overall matching the file name this way is
// a dreadful hack, but the GNU linker does it in order to better
// support gcc, and we need to be compatible.
 
bool
Layout::match_file_name(const Relobj* relobj, const char* match)
{
const std::string& file_name(relobj->name());
const char* base_name = lbasename(file_name.c_str());
size_t match_len = strlen(match);
if (strncmp(base_name, match, match_len) != 0)
return false;
size_t base_len = strlen(base_name);
if (base_len != match_len + 2 && base_len != match_len + 3)
return false;
return memcmp(base_name + base_len - 2, ".o", 2) == 0;
}
 
// Check if a comdat group or .gnu.linkonce section with the given
// NAME is selected for the link. If there is already a section,
// *KEPT_SECTION is set to point to the existing section and the
4389,6 → 4696,8
this->tls_segment_ = oseg;
else if (type == elfcpp::PT_GNU_RELRO)
this->relro_segment_ = oseg;
else if (type == elfcpp::PT_INTERP)
this->interp_segment_ = oseg;
 
return oseg;
}
4403,6 → 4712,17
return 0;
}
 
// Return the section index of the normal symbol table. It may have
// been stripped by the -s/--strip-all option.
 
unsigned int
Layout::symtab_section_shndx() const
{
if (this->symtab_section_ != NULL)
return this->symtab_section_->out_shndx();
return 0;
}
 
// Write out the Output_sections. Most won't have anything to write,
// since most of the data will come from input sections which are
// handled elsewhere. But some Output_sections do have Output_data.
/trunk/gnu/binutils/gold/archive.cc
653,7 → 653,8
{
Object* obj = parameters->options().plugins()->claim_file(input_file,
memoff,
memsize);
memsize,
NULL);
if (obj != NULL)
{
// The input file was claimed by a plugin, and its symbols
/trunk/gnu/binutils/gold/workqueue.cc
110,7 → 110,7
{ gold_assert(thread_count > 0); }
 
bool
should_cancel_thread()
should_cancel_thread(int)
{ return false; }
};
 
202,9 → 202,9
// Return whether to cancel the current thread.
 
inline bool
Workqueue::should_cancel_thread()
Workqueue::should_cancel_thread(int thread_number)
{
return this->threader_->should_cancel_thread();
return this->threader_->should_cancel_thread(thread_number);
}
 
// Find a runnable task in TASKS. Return NULL if none could be found.
264,7 → 264,7
return NULL;
}
 
if (this->should_cancel_thread())
if (this->should_cancel_thread(thread_number))
return NULL;
 
gold_debug(DEBUG_TASK, "%3d sleeping", thread_number);
/trunk/gnu/binutils/gold/workqueue.h
268,7 → 268,7
 
// Return whether to cancel this thread.
bool
should_cancel_thread();
should_cancel_thread(int thread_number);
 
// Master Workqueue lock. This controls access to the following
// member variables.

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.