Skip to content

Instantly share code, notes, and snippets.

View pczarn's full-sized avatar
🇵🇱
Proland

Peter Blackson pczarn

🇵🇱
Proland
  • Poland
  • 04:01 (UTC +02:00)
View GitHub Profile
make CFG_HOST=x86_64-unknown-linux-gnu CFG_BUILD=x86_64-unknown-linux-gnu CFG_TARGET="x86_64-unknown-linux-gnu arm-linux-noeabi" rustc-stage1
make -C "`pwd`/src/compiler-rt" ProjSrcRoot="`pwd`/src/compiler-rt" ProjObjRoot="`pwd`/arm-linux-noeabi/rt/compiler-rt" CC="arm-none-eabi-gcc" AR="arm-none-eabi-ar" RANLIB="arm-none-eabi-ar s" CFLAGS="-Wall -Werror -g -fPIC -D_YUGA_LITTLE_ENDIAN=1 -D_YUGA_BIG_ENDIAN=0 -march=armv6" TargetTriple="arm-linux-noeabi" triple-builtins
cp arm-linux-noeabi/rt/compiler-rt/triple/builtins/libcompiler_rt.a arm-linux-noeabi/rt/
rustc-stage1 --target arm-linux-noeabi -O src/libcore/lib.rs
mkdir -p x86_64-unknown-linux-gnu/stage1/lib/rustlib/arm-linux-noeabi/lib/
mv libcore-c5ed6fb4-0.11.0-pre.rlib x86_64-unknown-linux-gnu/stage1/lib/rustlib/arm-linux-noeabi/lib/libcore-c5ed6fb4-0.11.0-pre.rlib
@pczarn
pczarn / README.md
Last active August 29, 2015 14:01
Layout analysis of Rust's structs

Struct layout: total space occupied by padding

(including drop flags and tail padding)

total padding (bytes) number of structs
0 641
1 6
2 7
3 15
enum GPIO {
GPIO0,
GPIO1,
}
static GPIO0_ADDR: *mut Regs = 0xDEADBEEF as *mut Regs;
static GPIO1_ADDR: *mut Regs = 0xBEEFDEAD as *mut Regs;
impl GPIO {
fn get_addr(self) -> *mut Regs {
@pczarn
pczarn / lazylink.rb
Last active August 29, 2015 13:57 — forked from ttscoff/lazylink.rb