X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gold%2Fdefstd.cc;h=cee68a03ed7f961dc417ed6d981a11a200dea238;hb=231c5d93b0c0af68e5274b21a6fa82b67adb9291;hp=568ab4a7c09da29f62983c1ed01ca93d9aee71af;hpb=6cb15b7f89d59fb61780b01ad3de2340f33c3728;p=platform%2Fupstream%2Fbinutils.git diff --git a/gold/defstd.cc b/gold/defstd.cc index 568ab4a..cee68a0 100644 --- a/gold/defstd.cc +++ b/gold/defstd.cc @@ -1,6 +1,6 @@ // defstd.cc -- define standard symbols for gold. -// Copyright 2006, 2007 Free Software Foundation, Inc. +// Copyright (C) 2006-2014 Free Software Foundation, Inc. // Written by Ian Lance Taylor . // This file is part of gold. @@ -23,6 +23,7 @@ #include "gold.h" #include "symtab.h" +#include "layout.h" #include "defstd.h" // This is a simple file which defines the standard symbols like @@ -106,7 +107,19 @@ const Define_symbol_in_section in_section[] = 0, // nonvis true, // offset_is_from_end true // only_if_ref - } + }, + { + "__stack", // name + ".stack", // output_section + 0, // value + 0, // size + elfcpp::STT_NOTYPE, // type + elfcpp::STB_GLOBAL, // binding + elfcpp::STV_DEFAULT, // visibility + 0, // nonvis + false, // offset_is_from_end + true // only_if_ref + }, }; const int in_section_count = sizeof in_section / sizeof in_section[0]; @@ -128,6 +141,20 @@ const Define_symbol_in_segment in_segment[] = true // only_if_ref }, { + "__ehdr_start", // name + elfcpp::PT_LOAD, // segment_type + elfcpp::PF(0), // 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 + }, + { "etext", // name elfcpp::PT_LOAD, // segment_type elfcpp::PF_X, // segment_flags_set @@ -237,7 +264,7 @@ const Define_symbol_in_segment in_segment[] = elfcpp::STV_DEFAULT, // visibility 0, // nonvis Symbol::SEGMENT_END, // offset_from_base - false // only_if_ref + true // only_if_ref } }; @@ -249,11 +276,13 @@ namespace gold { void -define_standard_symbols(Symbol_table* symtab, const Layout* layout, - Target* target) +define_standard_symbols(Symbol_table* symtab, const Layout* layout) { - symtab->define_symbols(layout, target, in_section_count, in_section); - symtab->define_symbols(layout, target, in_segment_count, in_segment); + bool saw_sections_clause = layout->script_options()->saw_sections_clause(); + symtab->define_symbols(layout, in_section_count, in_section, + saw_sections_clause); + symtab->define_symbols(layout, in_segment_count, in_segment, + saw_sections_clause); } } // End namespace gold.