[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <yw1xzjlw58dc.fsf@unicorn.mansr.com>
Date: Wed, 12 Feb 2014 21:27:59 +0000
From: Måns Rullgård <mans@...sr.com>
To: Behan Webster <behanw@...verseincode.com>
Cc: Christoph Hellwig <hch@...radead.org>, dl9pf@....de,
David Woodhouse <David.Woodhouse@...el.com>,
Matthew Garrett <matthew.garrett@...ula.com>,
ibm-acpi-devel@...ts.sourceforge.net,
platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86, acpi: LLVMLinux: Remove nested functions from Thinkpad ACPI
Behan Webster <behanw@...verseincode.com> writes:
> On 02/12/14 13:11, Christoph Hellwig wrote:
>> On Wed, Feb 12, 2014 at 09:58:46PM +0100, dl9pf@....de wrote:
>>> being able to compile the Linux kernel with Clang. The use of nested functions
>>> blocks this effort.
>> Is there any good way to make gcc warn about the use of nested functions?
> Interesting idea.
>
> '-Wtrampolines'
> Warn about trampolines generated for pointers to nested functions.
>
> A trampoline is a small piece of data or code that is created at
> run time on the stack when the address of a nested function is
> taken, and is used to call the nested function indirectly. For
> some targets, it is made up of data only and thus requires no
> special treatment. But, for most targets, it is made up of code
> and thus requires the stack to be made executable in order for the
> program to work properly.
>
> That might work.
That sounds like it will only warn if a trampoline is needed. A nested
function whose address isn't taken, as is the case here, wouldn't
trigger this warning.
--
Måns Rullgård
mans@...sr.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists