Re: error no such file or directory B

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



siretb <siretb@xxxxxxx> writes:

> I am new at programming in assembler  (platform linux   SUSE 10.2)
> I have a main routine in C that call ASM
> I compile the C as   gcc -c   caller.c
> I compile the asm as   nasm -f aout   callee.c
> I link as  ld caller.o callee.o -o callx.out

Link using the gcc driver, not by calling ld directly.  For example:
    gcc -o callx.out caller.o callee.o

> There are  no errors , no warnings.  I do get a non zero length callx.out
> 
> trouble is that the command ./callx.out returns  error:no such file or
> directory.

Yes, it's a very confusing error.  It most likely occurs because when
you use the gcc driver it automatically passes the correct
-dynamic-linker option to the linker.  Without that option, the name
of the dynamic linker stored in the executable by ld is incorrect and
the file does not exist.  When the kernel tries to invoke the dynamic
linker, it fails.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux