I am doing this on a raspberry pi 3 (B+ i think) running netbsd 10.1
gdb said to report this as a bug but the link it gives says to contact the distributor directly instead. I have never reported a bug directly and I don't know how to check if this has been already reported. If someone could let me know who to report it to or how that would be great.
Code:
rpi$ uname -a
NetBSD rpi 10.1 NetBSD 10.1 (RPI2) #0: Mon Dec 16 13:08:11 UTC 2024 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/evbarm/compile/RPI2 evbarm
rpi$ cat test.s
.section .text
.global _start
_start:
mov r7, #1 // Syscall number for exit
mov r0, #0 // Exit status
svc #0 // Make the syscall
rpi$ as -march=armv6 -o test.o test.s
rpi$ ld -o test test.o --dynamic-linker /libexec/ld.elf_so
rpi$ chmod +x test
rpi$ ./test
-sh: Cannot execute ELF binary ./test
rpi$ file test
test: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, not stripped
rpi$ gdb test
GNU gdb (GDB) 11.0.50.20200914-git
[...]
Type "apropos word" to search for commands related to "word"...
Reading symbols from test...
(No debugging symbols found in test)
(gdb) break _start
Breakpoint 1 at 0x10054
(gdb) run
Starting program: /home/NSA/TEMP.d/asm.d/hw.d/test
exec: Cannot execute ELF binary /home/NSA/TEMP.d/asm.d/hw.d/test
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/target.c:2144: internal-error: void target_mourn_inferior(ptid_t): Assertion `ptid == inferior_ptid'
failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y
This is a bug, please report it. For instructions, see:
<https://www.gnu.org/software/gdb/bugs/>.
/usr/src/external/gpl3/gdb/lib/libgdb/../../dist/gdb/target.c:2144: internal-error: void target_mourn_inferior(ptid_t): Assertion `ptid == inferior_ptid'
failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) y
[1] Abort trap (core dumped) gdb test
rpi$
maybe I am using as or ld with incorrect flags?
thanks for any help