* nlmconv.c (main): Warn about an attempt to use a shared library
with uninitialized data.
This commit is contained in:
parent
8a432746ae
commit
1edb7335e6
2 changed files with 10 additions and 0 deletions
|
@ -1,5 +1,8 @@
|
||||||
Fri Jan 14 14:42:48 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
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
|
* nlmconv.c (setup_sections): Make sure that we align the
|
||||||
output_offset of each input section appropriately.
|
output_offset of each input section appropriately.
|
||||||
|
|
||||||
|
|
|
@ -723,6 +723,13 @@ main (argc, argv)
|
||||||
need. However, we would have to figure out the sizes
|
need. However, we would have to figure out the sizes
|
||||||
of the external and public information, and that can
|
of the external and public information, and that can
|
||||||
not be done without reading through them. */
|
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;
|
shared_offset = st.st_size;
|
||||||
if (shared_offset > sharedhdr.codeImageOffset)
|
if (shared_offset > sharedhdr.codeImageOffset)
|
||||||
shared_offset = sharedhdr.codeImageOffset;
|
shared_offset = sharedhdr.codeImageOffset;
|
||||||
|
|
Loading…
Reference in a new issue