This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: converting function pointers to/from object pointers
- From: Josef Wolf <jw at raven dot inka dot de>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 26 Aug 2015 12:22:42 +0200
- Subject: Re: converting function pointers to/from object pointers
- Authentication-results: sourceware.org; auth=none
- References: <20150824144924 dot GI29006 at raven dot inka dot de> <55DB4C04 dot 9080408 at gmail dot com> <20150824194837 dot GB29262 at raven dot inka dot de> <20150824210647 dot GB24846 at gate dot crashing dot org>
On Mo, Aug 24, 2015 at 04:06:47 -0500, Segher Boessenkool wrote:
> On Mon, Aug 24, 2015 at 09:48:38PM +0200, Josef Wolf wrote:
> > So the question is: how can I ensure the ordering of the functions?
>
> There is -fno-toplevel-reorder.
When I originally stumbled over the problem (about 5 years ago), I tried to
fix it with -fno-reorder-functions. But that did not have the desired effect.
First question is: why are functions reordered when -fno-reorder-functions is
given? What am I missing here?
Now, when I use -no-toplevel.reorder, the linker complains that .text.startup
and .text.unlikely are not loaded
So, how comes that omitting toplevel-reorder creates sections for reordering?
--
Josef Wolf
jw@raven.inka.de