Search found 1 match

by katherineamt
Sat Nov 17, 2018 5:25 pm
Forum: C and ASM Programming
Topic: Segmentation fault on push inside a function x86_64 GAS
Replies: 1
Views: 15173

Segmentation fault on push inside a function x86_64 GAS

I have a little program that just adds an item to the stack and then enters a function to add another one. The problem is that it has a weird behaviour every time you execute it.

Here is the function:

.section .data

.section .text

.globl _start
_start:
# Push
push $1
# Function call
call ...