public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Errors resolving stat64/lstat64... a bug?
@ 1999-11-30 12:21 Kutulu
  1999-11-30 23:28 ` Kutulu
  0 siblings, 1 reply; 2+ messages in thread
From: Kutulu @ 1999-11-30 12:21 UTC (permalink / raw)
  To: gcc-help

I'm not sure if this is a problem with gcc, or with glibc, so please direct
me to the right place if I'm not there already :)

I just upgraded my system (Linux 2.2.13) to gcc 2.95.2, and glibc 2.1.2.
I'm recompiling all of my existing applications that are still linked to
glibc2.0.6, mainly because I'm bored.  So far, I seem to be consistantly
having the same problem, with applications that use stat or lstat.

The most glaring example is the fileutils package, trying to compile cp, mv,
etc.  But any source file where I'm trying to assign 'stat' or 'lstat' to a
pointer variable, and dereference it later, ends up generating "undefined
symbol" errors when gcc attempts the linking phase.

All references to 'stat' are preprocessed to 'stat64', which looks right,
via sys/stat.h.  Any function calls directly to stat or lstat compile fine,
and the resulting object file ends up referencing _[l]xstat64, which is
exported by libc.  However, when I have something like this, from cp.c:

x.xstat = stat;

Where xstat is declared as: int (*xstat) ();

The preprocessor turns 'stat' into 'stat64', but the linker then tries to
resolve the 'stat64' symbol, which is *not* exported anywhere, and fails to
link.  This same code compiled successfully before the various upgrades, so
I'm sure it's either a compiler or library problem.  But, to confuse me even
further, dumping the symbols of the existing binaries, which are actually
linked to the libc-2.1.2 library at runtime, shows that "stat64" and
"lstat64" are *not* undefined external references, rather, they are resolved
within the binary itself, but I can't find any place in the source that
defines them,
just a couple of places where they are declared.

Help?

--Kutulu


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Errors resolving stat64/lstat64... a bug?
  1999-11-30 12:21 Errors resolving stat64/lstat64... a bug? Kutulu
@ 1999-11-30 23:28 ` Kutulu
  0 siblings, 0 replies; 2+ messages in thread
From: Kutulu @ 1999-11-30 23:28 UTC (permalink / raw)
  To: gcc-help

I'm not sure if this is a problem with gcc, or with glibc, so please direct
me to the right place if I'm not there already :)

I just upgraded my system (Linux 2.2.13) to gcc 2.95.2, and glibc 2.1.2.
I'm recompiling all of my existing applications that are still linked to
glibc2.0.6, mainly because I'm bored.  So far, I seem to be consistantly
having the same problem, with applications that use stat or lstat.

The most glaring example is the fileutils package, trying to compile cp, mv,
etc.  But any source file where I'm trying to assign 'stat' or 'lstat' to a
pointer variable, and dereference it later, ends up generating "undefined
symbol" errors when gcc attempts the linking phase.

All references to 'stat' are preprocessed to 'stat64', which looks right,
via sys/stat.h.  Any function calls directly to stat or lstat compile fine,
and the resulting object file ends up referencing _[l]xstat64, which is
exported by libc.  However, when I have something like this, from cp.c:

x.xstat = stat;

Where xstat is declared as: int (*xstat) ();

The preprocessor turns 'stat' into 'stat64', but the linker then tries to
resolve the 'stat64' symbol, which is *not* exported anywhere, and fails to
link.  This same code compiled successfully before the various upgrades, so
I'm sure it's either a compiler or library problem.  But, to confuse me even
further, dumping the symbols of the existing binaries, which are actually
linked to the libc-2.1.2 library at runtime, shows that "stat64" and
"lstat64" are *not* undefined external references, rather, they are resolved
within the binary itself, but I can't find any place in the source that
defines them,
just a couple of places where they are declared.

Help?

--Kutulu


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-11-30 23:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-30 12:21 Errors resolving stat64/lstat64... a bug? Kutulu
1999-11-30 23:28 ` Kutulu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).