[Bug build/14865] New: linker -z XXXX support isn't properly checked
hjl.tools at gmail dot com
sourceware-bugzilla@sourceware.org
Wed Nov 21 17:27:00 GMT 2012
http://sourceware.org/bugzilla/show_bug.cgi?id=14865
Bug #: 14865
Summary: linker -z XXXX support isn't properly checked
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: build
AssignedTo: unassigned@sourceware.org
ReportedBy: hjl.tools@gmail.com
CC: carlos@systemhalted.org
Classification: Unclassified
GNU linker ignores unknown -z XXX option with a warning:
[hjl@gnu-6 tmp]$ ld -z foobar -shared x.o
ld: warning: -z foobar ignored.
[hjl@gnu-6 tmp]$ echo $?
0
[hjl@gnu-6 tmp]$
We use
AC_CACHE_CHECK(for -z execstack,
libc_cv_z_execstack, [dnl
cat > conftest.c <<EOF
int _start (void) { return 42; }
EOF
if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-fPIC -shared -o conftest.so conftest.c
-Wl,-z,execstack -nostdlib
1>&AS_MESSAGE_LOG_FD])
then
libc_cv_z_execstack=yes
else
libc_cv_z_execstack=no
fi
rm -f conftest*])
AC_SUBST(libc_cv_z_execstack)
to check if linker supports -z execstack, which will always
succeed.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list