From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 28 Aug 2001 10:48:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 28 Aug 2001 10:48:17 -0400 Received: from burdell.cc.gatech.edu ([130.207.3.207]:23812 "EHLO burdell.cc.gatech.edu") by vger.kernel.org with ESMTP id ; Tue, 28 Aug 2001 10:48:09 -0400 Message-ID: <3B8BAF1C.EC336B17@cc.gatech.edu> Date: Tue, 28 Aug 2001 10:47:56 -0400 From: Josh Fryman Organization: CoC, GaTech X-Mailer: Mozilla 4.77 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: linux-kernel@vger.kernel.org Subject: Re: silly memory question ... In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org hi all, thanks to all of you for your suggestions... it turns out this is an ARM-specific issue, and maybe some other platforms as well. (or maybe just my specific ARM kernel/glibc combo. ;) it turns out x86 ignores some "modes" for pages in memory. or maybe ld.so doesn't bother to set them. anyway, the code snippet below "fixes" the pages i need fixed to become R/W/X. on *my* ARM, you can't default execute data pages; you can't write text pages; etc, etc. (my kernel is 2.4.0 with glibc 2.1.2.) i don't know what other platforms enforce this, but hopefully this is as educational for those suggesting solutions as it has been for me. if i had specified i was running on ARM originally, it may have made things clearer. thanks again, josh // fix permissions on __app_code - we need R/W/X, not just R/X ... // ARM-specific problem, but this fix should work on ALL platform targets printf("Fixing TEXT segment permissions for R/W/X....\n"); for (i=0; i