This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: SOFUN_ADDRESS_MAYBE_MISSING
- From: Jim Blandy <jimb at redhat dot com>
- To: Mark Kettenis <kettenis at chello dot nl>
- Cc: gdb at sources dot redhat dot com
- Date: 06 Oct 2003 23:23:04 -0500
- Subject: Re: SOFUN_ADDRESS_MAYBE_MISSING
- References: <200310061242.h96CgtiA000454@elgar.kettenis.dyndns.org>
Mark Kettenis <kettenis@chello.nl> writes:
> I'm wondering what to do with SOFUN_ADDRESS_MAYBE_MISSING. It started
> out (and still largely is) a hack to work around a problem with
> stabs-in-ELF with Sun's C compiler. Later it also got enabled on some
> Linux variants, to work around a bug in HJ's Linux binutils IIRC.
Not that this is germane to the issue you're trying to fix, but:
SOFUN_ADDRESS_MAYBE_MISSING isn't a bug --- it's a feature. Sun made
various adjustments to make fewer stabs require relocation, to reduce
link time. That's why line number stabs are relative to the beginning
of the function, for example. Since every function has a linker
symbol for its entry point, and there are STT_FILE symbols for the
compilation units (I think I've got that right), there's no real need
to put the address in the SO and FUN stabs, too.