-
Notifications
You must be signed in to change notification settings - Fork 566
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#1569 AArch64: Add drsyms/libelftc-aarch64/.
Review-URL: https://codereview.appspot.com/283430043
- Loading branch information
1 parent
f3789ab
commit f57285f
Showing
6 changed files
with
60 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
How To Build libelf.a, libelftc.a, and libdwarf.a for AArch64 | ||
by Edmund Grimley Evans based on version for ARM by Qin Zhao | ||
|
||
# Native build: | ||
|
||
Tested on Debian arm64 stretch on 2016-03-02 | ||
|
||
sudo apt-get install bison build-essential flex libarchive-dev m4 pmake zlib1g-dev | ||
sudo apt-get install lsb-release subversion | ||
|
||
svn co svn://svn.code.sf.net/p/elftoolchain/code/trunk elftc | ||
# Checked out revision 3424. | ||
cd elftc/ | ||
cp /PATH/TO/DYNAMORIO/ext/drsyms/libelftc-aarch64/native-elf-format.h common/ | ||
( cd libelf && CFLAGS="-O2 -g -fPIC" pmake libelf.a ) | ||
( cd libelftc && CFLAGS="-O2 -g -fPIC" pmake libelftc.a ) | ||
( cd libdwarf && CFLAGS="-O2 -g -fPIC" pmake libdwarf.a ) | ||
|
||
Then copy the resulting libelf.a, libelftc.a, and libdwarf.a into the | ||
DynamoRIO source tree at ext/drsyms/libelftc-aarch64/lib64/. | ||
|
||
# Cross-compiling: | ||
|
||
Tested on Debian amd64 stretch on 2016-03-02 | ||
|
||
Install required packages: | ||
$ sudo apt-get install bison build-essential flex libarchive-dev m4 pmake zlib1g-dev | ||
$ sudo apt-get install lsb-release subversion | ||
$ sudo apt-get install gcc-aarch64-linux-gnu | ||
|
||
I have cross compiler aarch64-linux-gnu-gcc | ||
$ aarch64-linux-gnu-gcc --version | ||
aarch64-linux-gnu-gcc (Debian 5.3.1-8) 5.3.1 20160205 | ||
|
||
Check out the sources: | ||
$ svn co svn://svn.code.sf.net/p/elftoolchain/code/trunk "${elftc_dir}" | ||
I have r3424. | ||
|
||
Now build: | ||
$ export CC=aarch64-linux-gnu-gcc | ||
$ export LD=aarch64-linux-gnu-ld | ||
$ export AR=aarch64-linux-gnu-ar | ||
$ export RANLIB=aarch64-linux-gnu-ranlib | ||
$ cd common | ||
$ cp /PATH/TO/DYNAMORIO/ext/drsyms/libelftc-aarch64/native-elf-format.h native-elf-format.h | ||
$ cd ../libelf | ||
$ pmake clean | ||
$ CFLAGS="-O2 -g -fPIC" pmake libelf.a | ||
$ cd ../libdwarf | ||
$ pmake clean | ||
$ CFLAGS="-O2 -g -fPIC" pmake libdwarf.a | ||
$ cd ../libelftc | ||
$ pmake clean | ||
$ CFLAGS="-O2 -g -fPIC" pmake libelftc.a | ||
|
||
Then copy the resulting libelf.a, libelftc.a, and libdwarf.a into the | ||
DynamoRIO source tree at ext/drsyms/libelftc-aarch64/lib64/. |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#define ELFTC_CLASS ELFCLASS64 | ||
#define ELFTC_ARCH EM_AARCH64 | ||
#define ELFTC_BYTEORDER ELFDATA2LSB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters