This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: [patch] Fix oddity in personality routine
Jack Howarth wrote:
> On Thu, Dec 03, 2009 at 10:25:30AM +0000, Andrew Haley wrote:
>> Jack Howarth wrote:
>>> On Wed, Dec 02, 2009 at 09:34:33AM +0000, Andrew Haley wrote:
>>>> Jack Howarth wrote:
>>>>> On Tue, Dec 01, 2009 at 05:24:29PM +0000, Andrew Haley wrote:
>>>>>> Jack Howarth wrote:
>>>>>>> On Tue, Dec 01, 2009 at 09:29:36AM +0000, Andrew Haley wrote:
>>>
>>> What do you make of the bad assembly at 0x103f05dd1?
>> There is no bad assembly: there's a jump at 0x103f05dc5.
>>
>> I know what's going on.
>>
>> The OS forbids execution of memory in the heap. But, there is an extra
>> flag, -Wl,-allow_stack_execute, that allows this permission. This is
>> a misnamed flag, since we never execute code on the stack. I think it's
>> really controlling heap execution, not stack execution.
>>
>> We need to pass this flag everywhere, whenever a program is compiled by
>> gcj.
>>
>> Andrew.
>
> Andrew,
> This sounds like the patch that Andreas proposed in...
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41991#c3
>
> which didn't solve the problem on my MacPro or MacBook Pro
> under darwin9 or darwin10. He also ran into the issue again
> later...
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41991#c17
>
> Do you think that -Wl,-allow_stack_execute needs to be passed
> even more widely than on just ecjx_LDFLAGS? Any suggestions as
> to where I should be passing it? Perhaps on something like
> LIBJAVA_LDFLAGS_NOUNDEF at the toplevel of libjava? Or should
> we even be building libffi and boehm-gc with that as well?
I don't see =-Wl,-allow_stack_execute passed to anything except
when linking gij. That's why IMO gij works but nothing else does.
This needs to be everywhere, for all programs. I think SYSTEMSPEC
would do it, or add a new linker configure variable.
Andrew.