Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-09-2008, 12:38 PM   #1
LQ Newbie
Registered: Nov 2006
Posts: 16

Rep: Reputation: 0
Question Disable execstack while compiling a specific program

Hi Guys,

I would like to disable the Linux feature "kernel.exec-shield" for a particular program while compiling it.I have tried the following and it doesn't seem to help.(Note:I do not want to do this at the kernel level,but for that specific compiled code)

setarch i386 <program>
gcc -ggdb3 -o <output> -Wa,--noexecstack <source_code>

Can anyone tell,how to achieve this?

Kernel version:2.6.9-55

Old 10-04-2008, 03:16 PM   #2
Registered: May 2004
Distribution: Gentoo, Debian, OpenBSD, NetBSD
Posts: 158

Rep: Reputation: 16
Its a kernel feature. You have to disable it at the "kernel level". You could run a system command from the app, running as root, to echo something to whatever /proc does the exec-shield stuff.
Old 10-04-2015, 03:55 AM   #3
LQ Newbie
Registered: Nov 2014
Posts: 2

Rep: Reputation: Disabled

You can try like this:
"gcc -g -o test test.c -z execstack",means add "-z execstack",you can "man ld" to see more.


regarding, stack

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
disable outbound sendmail for specific To recipients walidaly Linux - Software 1 12-16-2007 10:36 PM
is it possible to disable specific driver which is rezzie Linux - Newbie 1 09-13-2005 10:17 AM
Fire wall configuration...disable firewall or open a specific port naveenViador Linux - Security 2 04-13-2004 03:36 PM
Is there a debian specific kernal compiling guide? jimdaworm Debian 7 02-28-2004 10:51 AM
How to disable auto fsck during boot for specific volumes mansonmuni Linux - General 5 12-21-2003 09:54 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:57 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration