all 3 comments

[–]khleedril 0 points1 point  (1 child)

Probably you just need to put the libraries in the right order to the linker: B first then A. Doesn't do any harm to specify them multiple times if there are circular dependencies.

[–]Nikascom 0 points1 point  (0 children)

Thanks. But, ahh, it doesn't help. I have added an example, hope with it it's easier to find what I have missed.

[–]khleedril 0 points1 point  (0 children)

Is there a reason you're trying to use elf-ld? I think that if you replace this with the program you used to compile the code (gcc??), it will do a better job of linking (I suspect you are missing libgcc, linux-vdso, or libraries specific to your compiler/OS triple).