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

Side by Side Diff: sandbox/linux/seccomp/library.h

Issue 597023: linux: turn on -Wextra (Closed)
Patch Set: more Created 10 years, 9 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 | « chrome/common/extensions/extension.h ('k') | sandbox/linux/seccomp/library.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef LIBRARY_H__ 5 #ifndef LIBRARY_H__
6 #define LIBRARY_H__ 6 #define LIBRARY_H__
7 7
8 #include <elf.h> 8 #include <elf.h>
9 #include <functional> 9 #include <functional>
10 #include <map> 10 #include <map>
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 return false; 119 return false;
120 } 120 }
121 *reinterpret_cast<T *>( 121 *reinterpret_cast<T *>(
122 reinterpret_cast<char *>(iter->second.start) + offset) = *value; 122 reinterpret_cast<char *>(iter->second.start) + offset) = *value;
123 return true; 123 return true;
124 } 124 }
125 125
126 bool parseElf(); 126 bool parseElf();
127 const Elf_Ehdr* getEhdr(); 127 const Elf_Ehdr* getEhdr();
128 const Elf_Shdr* getSection(const string& section); 128 const Elf_Shdr* getSection(const string& section);
129 const int getSectionIndex(const string& section); 129 int getSectionIndex(const string& section);
130 void makeWritable(bool state) const; 130 void makeWritable(bool state) const;
131 void patchSystemCalls(); 131 void patchSystemCalls();
132 bool isVDSO() const { return isVDSO_; } 132 bool isVDSO() const { return isVDSO_; }
133 133
134 protected: 134 protected:
135 bool parseSymbols(); 135 bool parseSymbols();
136 136
137 private: 137 private:
138 class GreaterThan : public std::binary_function<Elf_Addr, Elf_Addr, bool> { 138 class GreaterThan : public std::binary_function<Elf_Addr, Elf_Addr, bool> {
139 // We create the RangeMap with a GreaterThan rather than the default 139 // We create the RangeMap with a GreaterThan rather than the default
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 char* image_; 190 char* image_;
191 size_t image_size_; 191 size_t image_size_;
192 static char* __kernel_vsyscall; 192 static char* __kernel_vsyscall;
193 static char* __kernel_sigreturn; 193 static char* __kernel_sigreturn;
194 static char* __kernel_rt_sigreturn; 194 static char* __kernel_rt_sigreturn;
195 }; 195 };
196 196
197 } // namespace 197 } // namespace
198 198
199 #endif // LIBRARY_H__ 199 #endif // LIBRARY_H__
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | sandbox/linux/seccomp/library.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698