blob: 5b5e90133185efad2ccc94ab90e43b9dde7da611 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# libasm\_test
Test for the libasm project of school 42.

## Usage
The default path to your libasm is `../libasm`. You can modify it in the Makefile.
```sh
$ make
```
## Bonus
**You need to `make fclean` when switching from all to bonus**.
```sh
$ make bonus
```
Or:
Set the environment variable `LIBASM_TEST_BONUS` to `yes`.
```sh
$ echo 'export LIBASM_TEST_BONUS=yes' >> ~/.zshrc
```
## Common issues
### ft\_write and ft\_read crash
<https://stackoverflow.com/c/42network/questions/1494>
### Compilation on linux with gcc
To fix the `relocation R_X86_64_PC32 against symbol` error you can add inside your
libasm source code `wrt ..plt` after a call to a libc function, like example below:
```asm
...
call __errno_location wrt ..plt
...
```
Now you should be able to compile with `gcc`
|