X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gold%2Fi386.cc;h=3779d4e2d9e9759415f15830a05a0ca45042278b;hb=6d03d481a0827abf92804f8ffaf9ab00593943be;hp=8a5558ebf37e6961b2e55abee259c708b9d3a452;hpb=7df3ce47694f5c804a9468d4c098825b5901216e;p=external%2Fbinutils.git diff --git a/gold/i386.cc b/gold/i386.cc index 8a5558e..3779d4e 100644 --- a/gold/i386.cc +++ b/gold/i386.cc @@ -1,6 +1,6 @@ // i386.cc -- i386 target support for gold. -// Copyright 2006, 2007, 2008 Free Software Foundation, Inc. +// Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc. // Written by Ian Lance Taylor . // This file is part of gold. @@ -62,6 +62,22 @@ class Target_i386 : public Sized_target<32, false> got_mod_index_offset_(-1U), tls_base_symbol_defined_(false) { } + // Process the relocations to determine unreferenced sections for + // garbage collection. + void + gc_process_relocs(const General_options& options, + Symbol_table* symtab, + Layout* layout, + Sized_relobj<32, false>* object, + unsigned int data_shndx, + unsigned int sh_type, + const unsigned char* prelocs, + size_t reloc_count, + Output_section* output_section, + bool needs_special_offset_handling, + size_t local_symbol_count, + const unsigned char* plocal_symbols); + // Scan the relocations to look for symbol adjustments. void scan_relocs(const General_options& options, @@ -1456,6 +1472,38 @@ Target_i386::Scan::global(const General_options&, } } +// Process relocations for gc. + +void +Target_i386::gc_process_relocs(const General_options& options, + Symbol_table* symtab, + Layout* layout, + Sized_relobj<32, false>* object, + unsigned int data_shndx, + unsigned int, + const unsigned char* prelocs, + size_t reloc_count, + Output_section* output_section, + bool needs_special_offset_handling, + size_t local_symbol_count, + const unsigned char* plocal_symbols) +{ + gold::gc_process_relocs<32, false, Target_i386, elfcpp::SHT_REL, + Target_i386::Scan>( + options, + symtab, + layout, + this, + object, + data_shndx, + prelocs, + reloc_count, + output_section, + needs_special_offset_handling, + local_symbol_count, + plocal_symbols); +} + // Scan relocations for a section. void