Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
elfio mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Third Party Mirrors
elfio mirror
Commits
b2901a51
Commit
b2901a51
authored
2 years ago
by
Serge Lamikhov-Center
Browse files
Options
Downloads
Patches
Plain Diff
Add missed implementation function for insert_data()
parent
974e1252
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.vscode/settings.json
+2
-1
2 additions, 1 deletion
.vscode/settings.json
elfio/elfio_section.hpp
+19
-17
19 additions, 17 deletions
elfio/elfio_section.hpp
with
21 additions
and
18 deletions
.vscode/settings.json
+
2
−
1
View file @
b2901a51
...
...
@@ -99,5 +99,6 @@
]
},
"gtest-adapter.debugConfig"
:
"Run ELFIO Tests"
,
"gtest-adapter.supportLocation"
:
true
"gtest-adapter.supportLocation"
:
true
,
"sonarlint.pathToCompileCommands"
:
"${workspaceFolder}/build/compile_commands.json"
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
elfio/elfio_section.hpp
+
19
−
17
View file @
b2901a51
...
...
@@ -50,19 +50,16 @@ class section
ELFIO_GET_SET_ACCESS_DECL
(
Elf_Word
,
name_string_offset
);
ELFIO_GET_ACCESS_DECL
(
Elf64_Off
,
offset
);
virtual
const
char
*
get_data
()
const
noexcept
=
0
;
virtual
void
set_data
(
const
char
*
raw_data
,
Elf_Word
size
)
noexcept
=
0
;
virtual
void
set_data
(
const
std
::
string
&
data
)
noexcept
=
0
;
virtual
void
append_data
(
const
char
*
raw_data
,
Elf_Word
size
)
noexcept
=
0
;
virtual
void
append_data
(
const
std
::
string
&
data
)
noexcept
=
0
;
virtual
void
insert_data
(
Elf_Word
pos
,
const
char
*
raw_data
,
Elf_Word
size
)
noexcept
=
0
;
virtual
void
insert_data
(
Elf_Word
pos
,
const
std
::
string
&
data
)
noexcept
=
0
;
virtual
size_t
get_stream_size
()
const
noexcept
=
0
;
virtual
void
set_stream_size
(
size_t
value
)
noexcept
=
0
;
virtual
const
char
*
get_data
()
const
=
0
;
virtual
void
set_data
(
const
char
*
raw_data
,
Elf_Word
size
)
=
0
;
virtual
void
set_data
(
const
std
::
string
&
data
)
=
0
;
virtual
void
append_data
(
const
char
*
raw_data
,
Elf_Word
size
)
=
0
;
virtual
void
append_data
(
const
std
::
string
&
data
)
=
0
;
virtual
void
insert_data
(
Elf_Xword
pos
,
const
char
*
raw_data
,
Elf_Word
size
)
=
0
;
virtual
void
insert_data
(
Elf_Xword
pos
,
const
std
::
string
&
data
)
=
0
;
virtual
size_t
get_stream_size
()
const
=
0
;
virtual
void
set_stream_size
(
size_t
value
)
=
0
;
protected:
ELFIO_SET_ACCESS_DECL
(
Elf64_Off
,
offset
);
...
...
@@ -171,9 +168,8 @@ template <class T> class section_impl : public section
}
//------------------------------------------------------------------------------
void
insert_data
(
Elf_Word
pos
,
const
char
*
raw_data
,
Elf_Word
size
)
noexcept
override
void
insert_data
(
Elf_Xword
pos
,
const
char
*
raw_data
,
Elf_Word
size
)
override
{
if
(
get_type
()
!=
SHT_NOBITS
)
{
if
(
get_size
()
+
size
<
data_size
)
{
...
...
@@ -207,7 +203,13 @@ template <class T> class section_impl : public section
}
}
size_t
get_stream_size
()
const
noexcept
override
{
return
stream_size
;
}
//------------------------------------------------------------------------------
void
insert_data
(
Elf_Xword
pos
,
const
std
::
string
&
str_data
)
override
{
return
insert_data
(
pos
,
str_data
.
c_str
(),
(
Elf_Word
)
str_data
.
size
()
);
}
size_t
get_stream_size
()
const
override
{
return
stream_size
;
}
//------------------------------------------------------------------------------
void
set_stream_size
(
size_t
value
)
override
{
stream_size
=
value
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment