This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: Warning relocs against discarded functions


On Thu, Nov 01, 2001 at 03:54:11PM -0800, Geoff Keating wrote:
>> Of course, this raises an interesting question: why not just use the
> c preprocessor to prevent the functions for this section being
> compiled in the first place?

Mainly source pollution.  It is a lot cleaner to mark a function as
__exit_call or mark data as __exitdata and have the linker discard them
as required.  To use cpp we would have to wrap #ifdef/#endif around
each definition.  Linus does not like that ;).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]