Ask coding questions

← Back to all posts
bash / assembly : link libc
ArcticPi

Hi,

I'm trying to link the C library to an object file which calls the printf and exit functions.

Here the code :

And here what I get :

Thanks!

Voters
BhoomiHs
Highwayman
ArcticPi
Comments
hotnewtop
Highwayman

Um. Give us your compilation command, your code, and the error, not just the error.

ArcticPi

@Highwayman Thanks for the reply. I edited the post by adding the code and the assembler command.

Highwayman

@ArcticPi awesome 👍

Highwayman

@ArcticPi or wait how do you compile and execute? Is it on repl.it?

Edit: for example,
bash:

Type of thing. (Not sure if that works, but you get the idea)

ArcticPi

@Highwayman Thanks for your help. Yes it is on repl.it. I have no problems compiling, the issue is in the linking phase, also using gcc (which calls always the same linker ld).

Highwayman

@ArcticPi oops sorry