mirror of
https://github.com/Noratrieb/uwucc.git
synced 2026-01-14 16:45:07 +01:00
do some registers
This commit is contained in:
parent
a363b7c6d1
commit
e28469fcc0
9 changed files with 227 additions and 97 deletions
|
|
@ -1,3 +1,4 @@
|
|||
mod registers;
|
||||
mod x86_64;
|
||||
|
||||
use std::process::Stdio;
|
||||
|
|
@ -18,6 +19,13 @@ pub fn generate<'cx>(lcx: &'cx LoweringCx<'cx>, ir: &Ir<'cx>) -> Result<()> {
|
|||
object::Endianness::Little,
|
||||
);
|
||||
|
||||
// GNU linkers have this awesome thing where they'll mark your stack as executable unless you tell them not to.
|
||||
obj.add_section(
|
||||
Vec::new(),
|
||||
b".note.GNU-stack".to_vec(),
|
||||
object::SectionKind::Note,
|
||||
);
|
||||
|
||||
let text = obj.add_section(Vec::new(), b".text".to_vec(), object::SectionKind::Text);
|
||||
|
||||
for func in ir.funcs.values() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue