SUGGEST: Patch for compiling unzip using hardened CFLAGS

Jaap Struyk japie at
Wed Oct 12 06:54:42 PDT 2005

Op wo 12-10-2005, om 11:27 schreef Aki Tuomi:

> You MUST use linux_noasm target, not linux, when compiling. If you
> use linux, it'll use ASM code which causes TEXTREL to emerge. 

I used the comands you provided, when building the output doesn't show

gcc -c -O3 -Wall -I. -DUSE_UNSHRINK -pie -fpie -DSFX unix_.c


gcc -c -O3 -Wall -I. -fPIC -DDLL -DUSE_ZLIB -DUSE_UNSHRINK -fpie -pie -o
api.pic.o api.c

But on the check:

root:~/unzip-5.52# LD_LIBRARY_PATH=$PWD make check
#####  This is a Unix-specific target.  (Just so you know.)
#####     Make sure unzip, funzip and unzipsfx are compiled and
#####     in this directory.
#####  testing extraction
./unzip: error while loading shared libraries:
/root/unzip-5.52/ cannot make segment writable for
relocation: Permission denied
make: *** [check] Error 127

> Try again, please. I just tested my patch and it works. Make sure it
> does not use ASM code when compiling. 

I'am using gcc version 3.4.4 (ssp) on a 2.6.13-ck8s-grsec but I can't
imagine that the kernel has to do something with build.
Could it be that unzip was build against something that has TEXTREL?
Groetjes Japie

More information about the hlfs-dev mailing list