checking binaries for linker warnings?

checking binaries for linker warnings?

Post by Wayne Scot » Sat, 18 Dec 1999 04:00:00



Hi Folks:

When I compile and link shared images and executables, the linker
tells when there are warnings and errors in the files.  When I
specify the /map option, I can search the .map files for "link-".
But if I don't watch the linker output and have no .map file,
how can I check the binary for cleanliness?  Oh yeah, and in DCL?

There must be a way, but I don't see it in Hoff's shared image
cookbook file; nor do I see anything obvious in the librarian
help text.  Where should I be looking?

Thanks,
Wayne

 
 
 

checking binaries for linker warnings?

Post by Bob Koehl » Sat, 18 Dec 1999 04:00:00



> Hi Folks:

> When I compile and link shared images and executables, the linker
> tells when there are warnings and errors in the files.  When I
> specify the /map option, I can search the .map files for "link-".
> But if I don't watch the linker output and have no .map file,
> how can I check the binary for cleanliness?  Oh yeah, and in DCL?

LINK will tell you it's own errors and record them in the map file
if it cannot link the objects.  It will also report if a compiler
created an object but reported a warning or error and so noted in
the object file.  In the latter case you're best off looking in the
compiler's listing file to find the problem.

----------------------------------------------------------------------
Bob Koehler                     | Computer Sciences Corporation
Hubble Space Telescope Payload  | Federal Sector, Civil Group
 Flight Software Team           | please remove ".aspm" when replying

 
 
 

checking binaries for linker warnings?

Post by Phil Howel » Tue, 21 Dec 1999 04:00:00



>Hi Folks:

>When I compile and link shared images and executables, the linker
>tells when there are warnings and errors in the files.  When I
>specify the /map option, I can search the .map files for "link-".
>But if I don't watch the linker output and have no .map file,
>how can I check the binary for cleanliness?  Oh yeah, and in DCL?

If you link a known "clean" module with a shared image that has errors or
warnings in it, it will give you a warning message.
something like link-w-?????  module had compilation errors
Phil
 
 
 

checking binaries for linker warnings?

Post by Hoff Hoffm » Wed, 22 Dec 1999 04:00:00


:When I compile and link shared images and executables, the linker
:tells when there are warnings and errors in the files.  When I
:specify the /map option, I can search the .map files for "link-".
:But if I don't watch the linker output and have no .map file,
:how can I check the binary for cleanliness?  Oh yeah, and in DCL?

  If you want to try this approach, you can look directly at the object
  language for the platform...  Specifically, you'll need to dig out the
  End Of Module (EOM or EEOM, VAX or Alpha, respectively) or the End Of
  Module Word (EOMW or EEOMW) record, and check the error severity field.  

  The object language is documented in the LINKER manual.

  For a peek at the EOM/EEOM/EOMW/EEOMW record, see:

    $ ANALYZE/OBJECT/EOM object.obj

  As for examining the shareable images, you get to look for the EOMWARN
  error signaled from lib$find_image_symbol or similar such.  (I'd have
  to dig out where this is retrieved from, but it would not surprise me
  to learn it is basically from the same *EOM* record referenced above.)

 --------------------------- pure personal opinion ---------------------------
   Hoff (Stephen) Hoffman   OpenVMS Engineering   hoffman#xdelta.zko.dec.com

 
 
 

1. C++ compiler and linker warnings

Hello,

I've installed an actual C++ compiler (V6.3-020) and the actual
DECwindow software (V1.2-6)
on a OpenVMS 7.2-1 system, but when I try to compile a C++ program, I
get
compiler and linker warnings.

A simple C++ example source code is:

#include <stdio.h>
#include <stdlib.h>
#include <Xm/Xm.h>

int main (unsigned int argc, char *argv[], char *envp[])
{
 exit (0);

$ CXX test.cxx

extern XActivateScreenSaver(
......^
%CXX-W-NOSIMPINT, omission of explicit type is nonstandard ("int"
assumed)
at line number 2000 in file SYS$COMMON:[DECW$INCLUDE]XLIB.H;1

extern XAddHost(
......^
%CXX-W-NOSIMPINT, omission of explicit type is nonstandard ("int"
assumed)
at line number 2006 in file SYS$COMMON:[DECW$INCLUDE]XLIB.H;1

extern XAddHosts(
......^
%CXX-W-NOSIMPINT, omission of explicit type is nonstandard ("int"
assumed)
at line number 2013 in file SYS$COMMON:[DECW$INCLUDE]XLIB.H;1

...

$ LINK test.obj
%LINK-W-NUDFSYMS, 1 undefined symbol:
%LINK-I-UDFSYM,         CXXL$V60_MAIN_DISPATCH

On an older OpenVMS system V6.1 the compilation is without warnings.

Can anyone help me?

Thanks
W.Angenendt

  angenendt.vcf
< 1K Download

2. GNUS 3.11: A GNU Emacs newsreader (7 of 9)

3. Linker-Warnings in VMS 7.3

4. Suggested readings comp.par/comp.sys.super (24/28) FAQ

5. Linker MULDEF warning

6. Beaming categories :-(

7. A warning to use bounds checking in BASIC(?)

8. Conversion of VMS binary files to Sun OS Unix binary files

9. C++ V6.5 linker performance optimization?

10. VAX linker /$objdef documentation inconsistency.

11. Alpha versus Vax linker PSECT addresses