Closed Z4JC closed 6 months ago
Please strip the generated executable. There are multiple DEBUG hunks which do cause problems. (The stabs debug file format was removed and the now used format is not yet processed correctly)
Also note, that clock_gettime
can't be used with vamos since the DOSBases`s TimerDevice is not available.
Also note, that
clock_gettime
can't be used with vamos since the DOSBase`s TimerDevice is not available.
I updated my cloned vamos repo:
vamos -C20 build-files/tests/test_getcwd.exe
[==========] Running 1 test cases.
[ RUN ] getcwd_tests.einval_size_0
[ OK ] getcwd_tests.einval_size_0 (0ns)
[==========] 1 test cases ran.
[ PASSED ] 1 tests.
Love it! :) Awesome! 👍 💯
If you don't hate it, could be potentially used to test the libnix stuff / document regressions..
I pushed the fixed version of broken_utest branch.
I am probably missing something here:
The only way I could get stripping to work is to explicitly add it as a Makefile step, so it does:
m68k-amigaos-strip --strip-debug build-files/getcwd.o
Placing -s on the gcc line did not work no matter where I put it (did not strip anyting), and neither did -Wl,-s
or similar.
Any ideas of how to pass this down to line to linker/stripper? Totally cool if it's not working/worth it for now..
strip the executable:
m68k-amigaos-strip build-files/tests/test_getcwd.exe
the new debug hunks are treated as normal code for now... ... 13.2 is still alpha
All good, stripped the .o file and the .exe.
Sent you a pull request for getcwd.c
under Kickstart V34 (probably works on older too?), the other stuff TBA.
Trying to minimally invade/touch/change the libnix repo and hopefully just add stuff that makes it more fun to hack on this..
you have to strip the file.
While preparing a new pull request for libnix13, I ran into a problem once I tried to include a unittesting framework. As a sidenote, I think the implementation of getcwd for Kickstart 1.3 is solid, so it's yours if you want it ;)
Repro steps (using amiga13.2 branch):
This should create the following objects:
m68k-amigaos-gcc -Os -m68000 -mcrt=nix13 -Iinclude/ -c getcwd.c -o build-files/getcwd.o
m68k-amigaos-gcc -Os -m68000 -mcrt=nix13 -Iinclude/ -c tests/test_main.c -o build-files/tests/test_main.o
m68k-amigaos-gcc -Os -m68000 -mcrt=nix13 -Iinclude/ -c tests/test_getcwd.c -o build-files/tests/test_getcwd.o
and then finally link:
m68k-amigaos-gcc -Os -m68000 -mcrt=nix13 -Iinclude/ build-files/tests/test_main.o build-files/tests/test_getcwd.o build-files/getcwd.o -o build-files/tests/test_getcwd.exe -lm
However, the resultant exe is broken:
Amiga will refuse to execute this file, but it will load with vamos (but not really run all the way).
The culprit is
test_main.c
that just includes a (mostly) straightforwardutest.h
I am attaching the built files so you can take a look: build-files.zip
What's hunk_ext 33? What in your gcc branch deals with hunk generation? (I can take a look myself)