blob: c215344402fcede75a1b567513427e78f9bcd8da (
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
|
# 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
```sh
$ make bonus
```
Or:
Set the environment variable `LIBASM_TEST_BONUS` to `yes`.
```sh
$ echo 'export LIBASM_TEST_BONUS=yes' >> ~/.zshrc
```
## Help, ft\_write and ft\_read crash for no reason
<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`
|