|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef ELF_SECTION_HEADER_H |
|
17 #define ELF_SECTION_HEADER_H |
|
18 |
|
19 #include "elftools/inc/elfdefs.h" |
|
20 #include <stdint.h> |
|
21 |
|
22 namespace elf |
|
23 { |
|
24 class Section_header |
|
25 { |
|
26 public: |
|
27 Section_header(const char*, const char*); |
|
28 |
|
29 uint32_t get_name(); |
|
30 |
|
31 bool is_type_null() const; |
|
32 bool is_type_progbits() const; |
|
33 bool is_type_symtab() const; |
|
34 bool is_type_dynsym() const; |
|
35 bool is_type_strtab() const; |
|
36 bool is_type_rela() const; |
|
37 bool is_type_nobits() const; |
|
38 bool is_type_rel() const; |
|
39 |
|
40 bool is_flags_write() const; |
|
41 bool is_flags_alloc() const; |
|
42 bool is_flags_execinstr() const; |
|
43 |
|
44 uint32_t get_addr(); |
|
45 uint32_t get_offset() const; |
|
46 uint32_t get_size() const; |
|
47 uint32_t get_link(); |
|
48 uint32_t get_info(); |
|
49 uint32_t get_addralign(); |
|
50 uint32_t get_entsize() const; |
|
51 |
|
52 private: |
|
53 const Elf32_Shdr* m_data; |
|
54 }; |
|
55 |
|
56 } // namespace elf |
|
57 |
|
58 |
|
59 #endif |
|
60 |