Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CFI
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
Open Source Software
CFI
Commits
fb94a5dc
Commit
fb94a5dc
authored
8 years ago
by
jdh8d
Browse files
Options
Downloads
Patches
Plain Diff
fixed bug with vdso
parent
feff70ca
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
zest_cfi_runtime/dispatch.c
+8
-2
8 additions, 2 deletions
zest_cfi_runtime/dispatch.c
with
8 additions
and
2 deletions
zest_cfi_runtime/dispatch.c
+
8
−
2
View file @
fb94a5dc
...
...
@@ -100,14 +100,13 @@ static ElfW(Addr) find_symtab_entry(const char* tofind, const ElfW(Sym) *symtab,
// we've probably exceeded the symbol table's size.
for
(
i
=
1
;
1
;
i
++
)
{
// note: st_name is ElfW(Word) which maps to uint32_t or uint64_t depending on architecture.
// thus, no lower bound check is necessary bcause it has to be >=0.
if
(
symtab
[
i
].
st_name
>=
strtabsz
)
return
0
;
const
char
*
symstring
=
strtab
+
symtab
[
i
].
st_name
;
#if
0
#if
DEBUG
write_str
(
"Checking symbol: "
);
write_str
(
symstring
);
write_str
(
"
\n
"
);
...
...
@@ -141,6 +140,10 @@ int dl_iterate_phdr_callback (struct dl_phdr_info *info, size_t size, void *data
}
const
ElfW
(
Sym
)
*
symtab
=
(
ElfW
(
Sym
)
*
)
find_dynamic_entry
(
info
,
DT_SYMTAB
,
dynamic_start
);
// apparently some modules don't have a reloc for their symtab pointer properly entry.
if
(
!
ptload_for_target_exists
(
info
,
phdr_start
,
phnum
,
(
ElfW
(
Addr
))
symtab
))
symtab
=
(
ElfW
(
Addr
))
symtab
+
(
ElfW
(
Addr
))
info
->
dlpi_addr
;
if
(
!
symtab
)
{
write_str
(
"Couldn't find symtab start. "
);
...
...
@@ -148,6 +151,9 @@ int dl_iterate_phdr_callback (struct dl_phdr_info *info, size_t size, void *data
}
const
char
*
strtab
=
(
const
char
*
)
find_dynamic_entry
(
info
,
DT_STRTAB
,
dynamic_start
);
// apparently some modules don't have a reloc for their symtab pointer properly entry.
if
(
!
ptload_for_target_exists
(
info
,
phdr_start
,
phnum
,
(
ElfW
(
Addr
))
strtab
))
strtab
=
(
ElfW
(
Addr
))
strtab
+
(
ElfW
(
Addr
))
info
->
dlpi_addr
;
if
(
!
strtab
)
{
write_str
(
"Couldn't find strtab start. "
);
...
...
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