präprozessor und linkerfehler gefixt
This commit is contained in:
parent
c8490df248
commit
382203559c
48
1_Grundlagen/Vorbereitungsaufgaben/laufzeitfehler.s
Normal file
48
1_Grundlagen/Vorbereitungsaufgaben/laufzeitfehler.s
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
.file "laufzeitfehler.cpp"
|
||||||
|
.text
|
||||||
|
#APP
|
||||||
|
.globl _ZSt21ios_base_library_initv
|
||||||
|
.section .rodata
|
||||||
|
.LC0:
|
||||||
|
.string "\n"
|
||||||
|
#NO_APP
|
||||||
|
.text
|
||||||
|
.globl main
|
||||||
|
.type main, @function
|
||||||
|
main:
|
||||||
|
.LFB1984:
|
||||||
|
.cfi_startproc
|
||||||
|
pushq %rbp
|
||||||
|
.cfi_def_cfa_offset 16
|
||||||
|
.cfi_offset 6, -16
|
||||||
|
movq %rsp, %rbp
|
||||||
|
.cfi_def_cfa_register 6
|
||||||
|
subq $16, %rsp
|
||||||
|
movl $0, -16(%rbp)
|
||||||
|
movl $1, -12(%rbp)
|
||||||
|
movl $2, -8(%rbp)
|
||||||
|
movl $0, -4(%rbp)
|
||||||
|
jmp .L2
|
||||||
|
.L3:
|
||||||
|
movl -4(%rbp), %eax
|
||||||
|
cltq
|
||||||
|
movl -16(%rbp,%rax,4), %eax
|
||||||
|
movl %eax, %esi
|
||||||
|
movl $_ZSt4cout, %edi
|
||||||
|
call _ZNSolsEi
|
||||||
|
movl $.LC0, %esi
|
||||||
|
movq %rax, %rdi
|
||||||
|
call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
|
||||||
|
addl $1, -4(%rbp)
|
||||||
|
.L2:
|
||||||
|
cmpl $9, -4(%rbp)
|
||||||
|
jle .L3
|
||||||
|
movl $0, %eax
|
||||||
|
leave
|
||||||
|
.cfi_def_cfa 7, 8
|
||||||
|
ret
|
||||||
|
.cfi_endproc
|
||||||
|
.LFE1984:
|
||||||
|
.size main, .-main
|
||||||
|
.ident "GCC: (GNU) 15.2.1 20260123 (Red Hat 15.2.1-7)"
|
||||||
|
.section .note.GNU-stack,"",@progbits
|
||||||
@ -1,2 +1,3 @@
|
|||||||
|
|
||||||
int addtwo(int s1, int s2)
|
int addtwo(int s1, int s2)
|
||||||
|
{}
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
#include "link.h"
|
|
||||||
#include <iostream>
|
void addtwo();
|
||||||
|
|
||||||
int main(){
|
int main(){
|
||||||
int a = 1;
|
int a = 1;
|
||||||
int b = 2;
|
int b = 2;
|
||||||
addtwo(a, b);
|
addtwo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
|
#include <iostream>
|
||||||
void function();
|
using namespace std
|
||||||
|
#include <eror.h>
|
||||||
|
|
||||||
int main(){
|
int main(){
|
||||||
function();
|
a = 1 + 2;
|
||||||
|
cout << a << "\n";
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user