Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
Zipr Toolchain
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
Container Registry
Model registry
Operate
Environments
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
Zipr Toolchain
Commits
12c75888
Commit
12c75888
authored
8 years ago
by
jdh8d
Browse files
Options
Downloads
Patches
Plain Diff
jdh approved fixes for building on vagrant/cgc vms.
parent
3dc0751c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
SConstruct
+1
-1
1 addition, 1 deletion
SConstruct
src/elfwrite.cpp
+5
-4
5 additions, 4 deletions
src/elfwrite.cpp
with
6 additions
and
5 deletions
SConstruct
+
1
−
1
View file @
12c75888
...
...
@@ -8,7 +8,7 @@ env=Environment()
# default build options
env
.
Replace
(
CFLAGS
=
"
-fPIC
"
)
env
.
Replace
(
CXXFLAGS
=
"
-std=c++
0x
-fPIC
"
)
env
.
Replace
(
CXXFLAGS
=
"
-std=c++
11
-fPIC
"
)
env
.
Replace
(
LINKFLAGS
=
"
-fPIC
"
)
# parse arguments
...
...
This diff is collapsed.
Click to expand it.
src/elfwrite.cpp
+
5
−
4
View file @
12c75888
...
...
@@ -602,9 +602,10 @@ bool ElfWriterImpl<T_Elf_Ehdr,T_Elf_Phdr,T_Elf_Addr,T_Elf_Shdr>::CreateNewPhdrs_
{
if
(
phdr
.
p_type
==
PT_LOAD
)
{
auto
do_relro
=
[
this
,
phdr
,
&
relro_phdrs
](
const
virtual_offset_t
start
,
const
virtual_offset_t
end
)
//auto do_relro=[&this,phdr,&relro_phdrs](const virtual_offset_t start, const virtual_offset_t end)
auto
do_relro
=
[
&
](
virtual_offset_t
start
,
virtual_offset_t
end
)
{
if
(
!
pagemap
[
start
]
.
is_relro
)
if
(
!
(
pagemap
.
at
(
start
))
.
is_relro
)
return
;
cout
<<
"Creating relro for "
<<
hex
<<
start
<<
"-"
<<
end
<<
endl
;
...
...
@@ -625,11 +626,11 @@ bool ElfWriterImpl<T_Elf_Ehdr,T_Elf_Phdr,T_Elf_Addr,T_Elf_Shdr>::CreateNewPhdrs_
virtual_offset_t
prev_i
=
phdr
.
p_vaddr
,
i
=
0
;
for
(
i
=
phdr
.
p_vaddr
;
i
<
phdr
.
p_vaddr
+
phdr
.
p_memsz
;
i
+=
PAGE_SIZE
)
{
if
(
prev_relro
!=
pagemap
[
i
]
.
is_relro
)
if
(
prev_relro
!=
pagemap
.
at
(
i
)
.
is_relro
)
{
do_relro
(
prev_i
,
i
-
1
);
prev_i
=
i
;
prev_relro
=
pagemap
[
i
]
.
is_relro
;
prev_relro
=
pagemap
.
at
(
i
)
.
is_relro
;
}
}
...
...
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