Here\'s my assembly code and my main subroutine. Here are my macros and constants:
.text
fmt: .string \"x \\t\\t ln(x)\\n\"
sfmt: .st
Turns out your main
is in the .bss
section, not .text
where it belongs, so it can only contain all-zero bytes. (And it won't be executable).
GDB normally only wants to disassemble code in the .text
section so that also explains GDB being weird.
This is why you should reduce your code to a MCVE (Minimal / complete / verifiable example) to make it as small as possible while still containing the problem.