Preliminaries

You will use the following code to test and you will compiled the second one in 32bit format $> cc easy_test.c -o test_facile $> cc not_so_easy_test.c -o not_so_easy_test $> cc -m32 not_so_easy_test.c -o not_so_easy_test_32-bit $> In case you dont know, to identify the type and architecture of a file: man 1 file If you ve got issue to find a universal binary, a search in the PATH: (IFS=$'\n'; for d in ${PATH//:/$IFS}; do find "$d" -type f -exec file '{}' \+ | grep -i -A3 universal ; done) To create a universal binary: clang/gcc: -m32 pour cross-compile a 32-bit lipo -create -output <universel> <binaire arch. 1> <binaire arch. 2> ... If you cant find a dynamic library (.so, .dylib): find /usr/lib -type f -iname '*\.dylib' 2>/dev/null

Preliminary tests


Please check the following first:

- Are the files in the right place in the git repo
- The Makefile work as intended and compile the binary
- No cheat (no forbidden functions, the student can explain his code...)

If something doesnt follow the subject, the mark for the evaluation will stop there.
But you can keep evaluating and you are strongly suggested to talk about the project a bit further


tests

nm error tests


Test ft_nm with error files. A few can be found in the header of the evaluation,
but you can forge your own.
If the program quits in an unexpected manner, the evaluation stops here.

Nm easy test


Test ft_nm with the binary easy_test. The output should be
in accordance with the true nm.

Test less easy


Test ft_nm on the not_so_easy binaries. On the 32 and 64 bits binaries
the ft_nm output should be the same as nm
Make sure that the symbols list output is exactly the same compared to the system nm.
The rest can differ a bit.

Other Test


ft_nm output is always equal to the real nm output, with any test.

Make sure that the symbols list output is exactly the same compared to the system nm.
The rest can differ a bit.

Multiples arguments


ft_nm can take multiple arguments

Object files


Test ft_nm with 32 and 64 bits object files (.o).
Order can differ with the real nm.

Dynamic library


Test ft_nm with a dynamic library (*.dylib *.so)
(Look in /usr/lib/). The output should look like the real nm output but
the symbol order can be arbitrary

Universal binary


Test ft_nm on a universal binary (example:/usr/bin/python). Dont forget to use the command "file ".
The output should be the same as the real nm. But the order of the symbols can differ.


Bonus

Options


Count one point per bonus from the following options
- a
- g
- u
- r
- p

Rate it from 0 (failed) through 5 (excellent)

Ratings

Don’t forget to check the flag corresponding to the defense

Conclusion

Leave a comment on this evaluation