Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Other Programming > BOOK: Professional Assembly Language
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
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.
Reply With Quote
  #2 (permalink)  
Old January 10th, 2010, 06: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!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking Access to Active Directory Brendan Bartley Access 2 November 28th, 2007 04:42 AM
Call or linking to external .jar file tony_s Java Basics 0 December 16th, 2006 04: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



All times are GMT -4. The time now is 02:17 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.