Skip to content

coloredmarble/pamarox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

state: you can print text + wooo

notes for readers

  1. do not set optimzation level to more than 0. my guess is that optimization are meant for bins
  2. compability with other libc is not a goal
  3. when using build.sh/run.sh (i fucking suck at bash) make sure u r on the project root
  4. sometime the type may be different (returning bool as i32) and treating it as such (the difference is usually inconseqeuntial) (correct me if im wrong)
  5. if you are interested in reading the source code. check out src/ctypes.rs:toascii
  6. never use llvm assembly. trust me
  7. rust_eh_personality fix in top answer's replies from Miaao
  8. if you have any idea how to switch to a linux target without a libc. tell me
  9. miaao i fucking thank you

list of problems:

  1. stuff are not working (atoi) (and it is likely arcane magic causing it)
  2. rust_eh_personality (causes the fucking C test part to not compile)
  3. exported lib symbols are null (fuck if i know)
  4. rust_eh_personality (yeah i know your personality sucks stfu)
  5. dogshit llvm assembly syntax
  6. rust fucking hates .btw.
  7. any optimization turns the whole thing into shit
  8. had no fucking idea alignment matters because cpus can only read their size

fix for .btw problem

[profile.dev]
codegen-units = 1  

miaao's workaround

// handler
#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {
    // fuck you
    loop {}
}

// dummy symbol
#[lang = "eh_personality"]
fn wawa(){
    loop {}
}

balls

  1. minimal dependency on C libraries

todos:

  1. impl more

self notes:

  1. wawa
  2. av
  3. try not to use mod.rs
  4. sysv abi
  5. registers
  6. one byte mov
  7. reg == 0
  8. how many times can you xor?
  9. test is preferable over cmp
  10. ffff
  11. what the fuck is a vdso
  12. default int size is isize

About

wawa

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published