bug-gzip
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch/rfc] handle GNU stack markings


From: Mike Frysinger
Subject: [patch/rfc] handle GNU stack markings
Date: Thu, 7 Dec 2006 08:40:25 -0500
User-agent: KMail/1.9.5

the asm match code does not include GNU stack markings which can cause gzip to 
require an executable stack on some linux architectures

i know the attached patch [which comes from Fedora] is not the right solution, 
but i'm not entirely sure which direction you guys want to go ... some 
projects add configure tests to see if the toolchain cares about the GNU 
stack while some people see if the toolchain supports -Wa,--noexecstack while 
others would just wrap it in like '#if defined(__ELF__) && 
defined(__linux__)'
-mike

Attachment: pgps2C62uJ3ia.pgp
Description: PGP signature

Ripped from Fedora.
Include stack markings in the asm code so the final binary 
isn't assumed to require executable markings.
--- gzip-1.3.7/lib/match.c
+++ gzip-1.3.7/lib/match.c
@@ -54,6 +54,9 @@
        .globl  _match_init
        .globl  _longest_match
 
+       .section .note.GNU-stack, "", @progbits
+       .previous
+       
        .text
 
 _match_init:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]