Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Side by Side Diff: gold/reloc.cc

Issue 10252012: [MIPS] Initial checkin for MIPS changes for GOLD. (Closed)
Patch Set: Updated MIPS code w/ SH_RELA. Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gold/output.cc ('k') | gold/symtab.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // reloc.cc -- relocate input files for gold. 1 // reloc.cc -- relocate input files for gold.
2 2
3 // Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. 3 // Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
4 // Written by Ian Lance Taylor <iant@google.com>. 4 // Written by Ian Lance Taylor <iant@google.com>.
5 5
6 // This file is part of gold. 6 // This file is part of gold.
7 7
8 // This program is free software; you can redistribute it and/or modify 8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by 9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 3 of the License, or 10 // the Free Software Foundation; either version 3 of the License, or
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 const Output_section* os = out_sections[i]; 736 const Output_section* os = out_sections[i];
737 if (os == NULL) 737 if (os == NULL)
738 continue; 738 continue;
739 Address output_offset = out_offsets[i]; 739 Address output_offset = out_offsets[i];
740 740
741 typename This::Shdr shdr(p); 741 typename This::Shdr shdr(p);
742 742
743 if (shdr.get_sh_type() == elfcpp::SHT_NOBITS) 743 if (shdr.get_sh_type() == elfcpp::SHT_NOBITS)
744 continue; 744 continue;
745 745
746 // For MIPS .reginfo section there is no need to do anything
747 if (shdr.get_sh_type() == elfcpp::SHT_MIPS_REGINFO)
748 continue;
749
746 if ((parameters->options().relocatable() 750 if ((parameters->options().relocatable()
747 || parameters->options().emit_relocs()) 751 || parameters->options().emit_relocs())
748 && (shdr.get_sh_type() == elfcpp::SHT_REL 752 && (shdr.get_sh_type() == elfcpp::SHT_REL
749 || shdr.get_sh_type() == elfcpp::SHT_RELA) 753 || shdr.get_sh_type() == elfcpp::SHT_RELA)
750 && (shdr.get_sh_flags() & elfcpp::SHF_ALLOC) == 0) 754 && (shdr.get_sh_flags() & elfcpp::SHF_ALLOC) == 0)
751 { 755 {
752 // This is a reloc section in a relocatable link or when 756 // This is a reloc section in a relocatable link or when
753 // emitting relocs. We don't need to read the input file. 757 // emitting relocs. We don't need to read the input file.
754 // The size and file offset are stored in the 758 // The size and file offset are stored in the
755 // Relocatable_relocs structure. 759 // Relocatable_relocs structure.
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1904 template 1908 template
1905 class Track_relocs<64, false>; 1909 class Track_relocs<64, false>;
1906 #endif 1910 #endif
1907 1911
1908 #ifdef HAVE_TARGET_64_BIG 1912 #ifdef HAVE_TARGET_64_BIG
1909 template 1913 template
1910 class Track_relocs<64, true>; 1914 class Track_relocs<64, true>;
1911 #endif 1915 #endif
1912 1916
1913 } // End namespace gold. 1917 } // End namespace gold.
OLDNEW
« no previous file with comments | « gold/output.cc ('k') | gold/symtab.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698