Witam
Problem jest następujący:
Piszę program w assemblerze (NASM), najprostszy jaki tylko może być - w celach testowych po upgrade z NetBSD 1.6.1 do 2.0. Kompiluję, linkuję, uruchamiam - i segmentation fault :blink: . Wygląda toto tak:
section .data msg db 'blebleble', 0ah len equ $ - msgsection .text global _start_start: push len push msg push 1 mov eax,4 call kernel push 0 mov eax,1 call kernelkernel: int 80h retKompiluję i linkuję go standardowo:
bash-3.00$ nasm -f elf program1.asm bash-3.00$ ld -s program1.o -o program1 bash-3.00$ ./program1 Naruszenie ochrony pamięci (core dumped)gdb:
Program terminated with signal 11, Segmentation fault.#0 0x08048080 in ?? ()Dzieje się tak z każdym programem napisanym w assemblerze, gdy używałem NetBSD 1.6.1 nie było takich problemów, te same programy działały tam bez sprzeciwu. Wersja nasm: 0.98.39 a ld: 2.14, arch to oczywiście x86. Jakieś pomysły, czemu tak się dzieje?
Pozdrawiam