From 1edb7335e650dd488ced3ad2d440297e8810cc58 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 14 Jan 1994 20:58:43 +0000 Subject: [PATCH] * nlmconv.c (main): Warn about an attempt to use a shared library with uninitialized data. --- binutils/ChangeLog | 3 +++ binutils/nlmconv.c | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 68466a4..7c51761 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -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. diff --git a/binutils/nlmconv.c b/binutils/nlmconv.c index 94d3658..812fe8b 100644 --- a/binutils/nlmconv.c +++ b/binutils/nlmconv.c @@ -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; -- 2.7.4