You Are Here:

Community: Wiki

This page was last modified on 31 October 2008, at 16:40.

KIS001076 - Open C: Specifying only PROT EXEC in mmap no longer supported

From Forum Nokia Wiki



ID KIS001076 Creation date August 20, 2008
Platform S60 3rd Edition Devices All (S60 3rd Ed)
Category Open C Subcategory IPC, Compatibility


Keywords (APIs, classes, methods, functions):

Overview

To improve the performance and better adhere to POSIX standards, the next release of Open C will undergo some changes in the architecture. Some of the changes will also affect the binary compatibility with previous releases.

Description

Memory execution is not supported by the platform (Symbian OS does not support executable buffers). Therefore, specifying PROC_EXEC only (setting only the eXecute part in file permissions) is not supported and returns with ENOSUP.

If any other parts (such as read/write) are specified along with the PROC_EXEC, the permission to execute is simply ignored.

How to reproduce

int fd = -1; 
char* mapaddr;
int len = getpagesize();
int prot = PROT_EXEC; /* not supported */
 
if((fd = open("c:\\Test.txt", O_RDWR | O_CREAT, 0666)) < 0) {
printf("file open failed\n");
}
/* returns with errno = 45 */
mapaddr = (char*)mmap((void*)0, len, prot, MAP_SHARED, fd, 0);

Solution

No solution.

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia