This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: How to stop --gc-sections nukeing all sections?
- To: greyham at research dot canon dot com dot au
- Subject: Re: How to stop --gc-sections nukeing all sections?
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 7 Apr 2000 09:06:03 -0700
- CC: binutils at sourceware dot cygnus dot com
- References: <20000407020753.59C313C9B0@elph.research.canon.com.au>
Date: Fri, 7 Apr 2000 12:07:53 +1000 (EST)
From: greyham@research.canon.com.au (Graham Stoney)
The kernel uses a nasty ha^H^H^H^H^H^H^H^Hneat trick to trap bad user space
accesses. This relies on incrementally building up two tables containing
references to instructions which attempt user space accesses, in sections
named .fixup and __ex_table sections. These tables must be ordered in the same
order as the code they refer to, because a binary search is done on the
__ex_table and this search requires that the entries are in ascending order.
Geeze, can't we do this in a way which doesn't rely on undocumented
linker features? C++ exception handling manages to solve a similar
problem without a similar drawback.
Ian