Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Logical Link Error?!

Posted on 1998-06-08
3
Medium Priority
?
212 Views
Last Modified: 2010-04-01
Dear All,
    What are the possible reasons for a module not included in the EXE even though I know I have linked it up using tlink? -> tlink 123.obj 1.obj 2.obj
in this case, 2.obj is not included. (I checked it with a hexeditor)






0
Comment
Question by:whluk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:whluk
ID: 1165408
For Supplement for the question above,
      I have linked the program (2.obj) such as
mov ah,4ch
int 21h
 
The hexcode for these two statements are for example
EA 4C
CD 21
And I have linked it up with other modules like this
tlink 123.obj 1.obj 2.obj
After linking, I used hexeditor to view the exe file
and I found that the 2 statements are lost somewhere or even not found in the whole program. when i checked it with td, the instruction for instance was call 0060. but the 0060 address was rubbish or in other words, the 0060 address was pointing to the data segment...
CAn you help?

The best
Jacky


0
 

Author Comment

by:whluk
ID: 1165409
Another Comment,
     The statement call 0060 was a statement pointing to the 2 lost statements.... ie mov ah, 4ch and int 21h

So when i Steped thru call 0060, the content over there was data segment's.



0
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 200 total points
ID: 1165410
If there are no references to a particular module, then the module will never be loaded. You should put a reference to the symbol by using an extern statement in your other module.

For example, if you created the module with a public symbol (hopefully a function), then you can use

extern void F();

to make a reference to it. Then you need to create a dummy function that makes a call into F:

void Dummy()
{
  F();
}

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question