Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > BOOK: Professional Assembly Language
| Search | Today's Posts | Mark Forums Read
BOOK: Professional Assembly Language
This is the forum to discuss the Wrox book Professional Assembly Language by Richard Blum; ISBN: 9780764579011
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Assembly Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 29th, 2007, 10:03 AM
Registered User
 
Join Date: Oct 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default No such file or directory error for wrong linking

This is regarding the code in chap04 - cpuid2.s

If I have a call to printf from the asm code and I link it like this:-

ld -lc -o cpuid2 cpuid2.o

and execute

./cpuid2

I get error:-

bash: ./cpuid2: No such file or directory.

Why such a strange error for dynamic linking problem? If a file "a" contains garbage, then the error looks like this:- ./a: line 1: asdfasfsdaf: command not found. So why not a similar error for my linked executable? If I use --dynamic-linker /lib/ld-linux.so.2 while linking, of course it runs fine. But I wonder why it would say "no such file" if I do not link it properly.
 
Old January 10th, 2010, 07:44 AM
Authorized User
 
Join Date: Jan 2010
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by awotta View Post
This is regarding the code in chap04 - cpuid2.s

If I have a call to printf from the asm code and I link it like this:-

ld -lc -o cpuid2 cpuid2.o

and execute

./cpuid2

I get error:-

bash: ./cpuid2: No such file or directory.

Why such a strange error for dynamic linking problem? If a file "a" contains garbage, then the error looks like this:- ./a: line 1: asdfasfsdaf: command not found. So why not a similar error for my linked executable? If I use --dynamic-linker /lib/ld-linux.so.2 while linking, of course it runs fine. But I wonder why it would say "no such file" if I do not link it properly.
Prolly just a quirk of the Linux flava you are using. I use Fedora 12 and have no such problems. Try switching over to Fedora - Linus Torvald uses it!




Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking Access to Active Directory Brendan Bartley Access 2 November 28th, 2007 05:42 AM
Call or linking to external .jar file tony_s Java Basics 0 December 16th, 2006 05:20 PM
Linking To Excel - Error timmaher Access 2 August 22nd, 2005 07:36 AM
linking to external vbscript file fs22 Javascript 2 April 20th, 2004 03:38 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.