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
b3bb18ec
Commit
b3bb18ec
authored
1 year ago
by
Jason Hiser
Browse files
Options
Downloads
Patches
Plain Diff
Adjust to use aarch64 tools while xforming aarch64 programs on x86
parent
7b1e386a
No related branches found
Branches containing commit
No related tags found
1 merge request
!43
Add libc test
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cicd_testing/do-prot-bins.sh
+3
-1
3 additions, 1 deletion
cicd_testing/do-prot-bins.sh
set_command_envs
+1
-0
1 addition, 0 deletions
set_command_envs
tools/eh_frame_tools/eh_to_bin.sh
+3
-3
3 additions, 3 deletions
tools/eh_frame_tools/eh_to_bin.sh
with
7 additions
and
4 deletions
cicd_testing/do-prot-bins.sh
+
3
−
1
View file @
b3bb18ec
...
...
@@ -12,7 +12,7 @@ popd
install_deps
()
{
sudo
apt-get
install
-y
binutils-aarch64-linux-gnu
sudo
apt-get
install
-y
binutils-aarch64-linux-gnu
gcc-aarch64-linux-gnu
}
main
()
...
...
@@ -20,6 +20,8 @@ main()
install_deps
export
PS_OBJDUMP
=
$(
which aarch64-linux-gnu-objdump
)
export
PS_READELF
=
$(
which aarch64-linux-gnu-readelf
)
export
PS_GCC
=
$(
which aarch64-linux-gnu-gcc
)
export
PS_OBJCOPY
=
$(
which aarch64-linux-gnu-objcopy
)
mkdir
-p
artifacts/protected_binaries
...
...
This diff is collapsed.
Click to expand it.
set_command_envs
+
1
−
0
View file @
b3bb18ec
...
...
@@ -8,4 +8,5 @@ if [[ -z $PS_TAR ]] ; then export PS_TAR=tar; fi
if [[ -z $PS_MD5SUM ]] ; then export PS_MD5SUM=md5sum; fi
if [[ -z $PS_TIMEOUT ]] ; then export PS_TIMEOUT=timeout; fi
if [[ -z $PS_GREP ]] ; then export PS_GREP=grep; fi
if [[ -z $PS_GCC ]] ; then export PS_GCC=gcc; fi
This diff is collapsed.
Click to expand it.
tools/eh_frame_tools/eh_to_bin.sh
+
3
−
3
View file @
b3bb18ec
...
...
@@ -8,10 +8,10 @@ outfile=$3
# so then try normal gcc
# and if both fail, then we exit with an error code
gcc
$infile
-nostdlib
-Wl
,--section-start
-Wl
,eh_frame_hdr
=
$addr
-Wl
,-e
-Wl
,0x1000
-Wl
,--build-id
=
none
-Wl
,-T
-Wl
,
${
PEASOUP_HOME
}
/tools/eh_frame_tools/eh_frame.ls
-o
$outfile
-Wl
,-Map,
$outfile
.map
-static
-no-pie
-fno-PIC
||
\
gcc
$infile
-nostdlib
-Wl
,--section-start
-Wl
,eh_frame_hdr
=
$addr
-Wl
,-e
-Wl
,0x1000
-Wl
,--build-id
=
none
-Wl
,-T
-Wl
,
${
PEASOUP_HOME
}
/tools/eh_frame_tools/eh_frame.ls
-o
$outfile
-Wl
,-Map,
$outfile
.map
-static
||
\
$PS_GCC
$infile
-nostdlib
-Wl
,--section-start
-Wl
,eh_frame_hdr
=
$addr
-Wl
,-e
-Wl
,0x1000
-Wl
,--build-id
=
none
-Wl
,-T
-Wl
,
${
PEASOUP_HOME
}
/tools/eh_frame_tools/eh_frame.ls
-o
$outfile
-Wl
,-Map,
$outfile
.map
-static
-no-pie
-fno-PIC
||
\
$PS_GCC
$infile
-nostdlib
-Wl
,--section-start
-Wl
,eh_frame_hdr
=
$addr
-Wl
,-e
-Wl
,0x1000
-Wl
,--build-id
=
none
-Wl
,-T
-Wl
,
${
PEASOUP_HOME
}
/tools/eh_frame_tools/eh_frame.ls
-o
$outfile
-Wl
,-Map,
$outfile
.map
-static
||
\
exit
1
#eu-readelf -S ./a.out
objcopy
--rename-section
eh_frame_hdr
=
.eh_frame_hdr
--rename-section
eh_frame
=
.eh_frame
--rename-section
gcc_except_table
=
.gcc_except_table
$outfile
$PS_OBJCOPY
--rename-section
eh_frame_hdr
=
.eh_frame_hdr
--rename-section
eh_frame
=
.eh_frame
--rename-section
gcc_except_table
=
.gcc_except_table
$outfile
#eu-readelf -S -w ./b.out
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