* nlmconv.c (main): Warn about an attempt to use a shared library
authorIan Lance Taylor <ian@airs.com>
Fri, 14 Jan 1994 20:58:43 +0000 (20:58 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 14 Jan 1994 20:58:43 +0000 (20:58 +0000)
with uninitialized data.

binutils/ChangeLog
binutils/nlmconv.c

index 68466a4c1635e20cf6301e3d7a25aaf2b4f1dd21..7c51761bca43758e3b8f09ea680c89ce62eaf375 100644 (file)
@@ -1,5 +1,8 @@
 Fri Jan 14 14:42:48 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
 
+       * nlmconv.c (main): Warn about an attempt to use a shared library
+       with uninitialized data.
+
        * nlmconv.c (setup_sections): Make sure that we align the
        output_offset of each input section appropriately.
 
index 94d36580240e568475aaa12ecf8a988f2e6c8289..812fe8b590578d0a294e94f7b0bc8b9a8819c95c 100644 (file)
@@ -723,6 +723,13 @@ main (argc, argv)
                 need.  However, we would have to figure out the sizes
                 of the external and public information, and that can
                 not be done without reading through them.  */
+             if (sharedhdr.uninitializedDataSize > 0)
+               {
+                 /* There is no place to record this information.  */
+                 fprintf (stderr,
+                          "%s:%s: warning: shared libraries can not have uninitialized data\n",
+                          program_name, sharelib_file);
+               }
              shared_offset = st.st_size;
              if (shared_offset > sharedhdr.codeImageOffset)
                shared_offset = sharedhdr.codeImageOffset;