- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
When compiling a program, "undefined reference to `asub_'" might occur. I know where the problem is, and pretty sure that the execution flow will not invoke `asub_' for debugging or testing. Is there any compiler options that I can ignore or circumvent those undefined references?
Thank you!
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My present trick is to write a dummy subroutine, and the compiler can link the dummy. However, it would be good, if there is a more handy approache.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The compiler just creates object files and passes those off to 'ld' to do the linking (xild if -pgo is set, but same idea).
You'd need a linker option from 'ld' to support that. I don't know of any such option, so the stub or dummy subroutine is the only option I know of.
ron
You'd need a linker option from 'ld' to support that. I don't know of any such option, so the stub or dummy subroutine is the only option I know of.
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you!
After man ld, find this:-Wl,--warn-unresolved-symbols

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page