Debugging a Program With dbx

Reasons for Full Relinks

ild Deferred-Link Messages

The message `ild: calling ld to finish link' . . . means that ild cannot complete the link, and is deferring the link request to ld for completion.

By default, these messages are displayed as needed. You can suppress these messages by using the -z i_quiet option.

ild: calling ld to finish link -- cannot handle shared libraries in archive library name

This message is suppressed if ild is implicitly requested (-g), but is displayed if -xildon is on the command line. This message is displayed in all cases if you use the -z i_verbose option, and never displayed if you use the -z i_quiet option.

ild: calling ld to finish link -- cannot handle keyword Keyword

ild: calling ld to finish link -- cannot handle -d Keyword

ild: calling ld to finish link -- cannot handle -z keyword

ild: calling ld to finish link -- cannot handle argument keyword

ild Relink Messages

The message `ild: (Performing full relink)' . . . means that for some reason ild cannot do an incremental link and must do a full relink. This is not an error. It is to inform you that this link will take longer than an incremental link (see "How ild Works", for more details). ild messages can be controlled by ild options -z i_quiet and -z i_verbose. Some messages have a verbose mode with more descriptive text.

You can suppress all of these messages by using the ild option -z i_quiet. If the default message has a verbose mode, the message ends with an ellipsis ([...]) indicating more information is available. You can view the additional information by using the -z i_verbose option. Example messages are shown with the -z i_verbose option selected.

Example 1: internal free space exhausted

The most common of the full relink messages is the internal free space exhausted message:


    
 $ cat test1.c 
    
 int main() { return 0; }
    
 $ rm a.out
# This creates test1.o
 $ cc -xildon -c -g test1.c
# This creates a.out with minimal debugging information.
 $ cc -xildon -z i_verbose -g test1.o
# A one-line compile and link puts all debugging information into a.out.
 $ cc -xildon -z i_verbose -g test1.c
    
 ild: (Performing full relink) internal free space in output file exhausted (sections)
    
$

These commands show that going from a one-line compile to a two-line compile causes debugging information to grow in the executable. This growth causes ild to run out of space and do an full relink.

Example 2: running strip

Another problem arises when you run strip. Continuing from Example 1:

# Strip a.out $ strip a.out
# Try to do an incremental link $ cc -xildon -z i_verbose -g test1.c
       ild: (Performing full relink) a.out has been a altered since the last incremental link -- maybe you ran strip or mcs on it?
      $

Example 3: ild version

When a new version of ild is run on an executable created by an older version of ild, you see the following error message:

# Assume old_executable was created by an earlier version of ild $ cc -xildon -z i_verbose foo.o -o old_executable
      ild: (Performing full relink) an updated ild has been installed since a.out was last linked (2/16)


Note -

The numbers (2/16) are used only for internal reporting.


Example 4: too many files changed

Sometimes ild determines that it will be faster to do a full relink than an incremental link. For example:

$ rm a.out
$ cc -xildon -z i_verbose \
x0.o x1.o x2.o x3.o x4.o x5.o x6.o x7.o x8.o test2.o
$ touch x0.o x1.o x2.o x3.o x4.o x5.o x6.o x7.o x8.o
$ cc -xildon -z i_verbose \
x0.o x1.o x2.o x3.o x4.o x5.o x6.o x7.o x8.o test2.o
ild: (Performing full relink) too many files changed

Here, use of the touch command causes ild to determine that files x0.o through x8.o have changed and that a full relink will be faster than incrementally relinking all nine object files.

Example 5: full relink

There are certain conditions that can cause a full relink on the next link, as compared to the previous examples that cause a full relink on this link.

The next time you try to link that program, you see the message:

# ild detects previous error and does a full relink$ cc -xildon -z i_verbose broken.o
ild: (Performing full relink) cannot do incremental relink due to problems in the previous link

A full relink occurs.

Example 6: new working directory

     % cd /tmp
     % cat y.c
      int main(){ return 0;}
     % cc -c y.c
     % rm -f a.out
# initial link with cwd equal to /tmp% cc -xildon -z i_verbose y.o -o a.out
     % mkdir junk
     % mv y.o y.c a.out junk
     % cd junk
# incremental link, cwd is now /tmp/junk% cc -xildon -z i_verbose y.o -o a.out
     ild: (Performing full relink) current directory has changed from `/tmp' to `/tmp/junk'
      %