I am receiving following error with latest net-irc/silc-plugin, and I'd like your (QA's) advice on how to fix executable stack. An URL will suffice, if there's any. Thanks for your time. make: Leaving directory `/var/tmp/portage/portage/silc-plugin-1.0.1-r5/work/silc-client-1.0.1/irssi/docs/help' man: prepallstrip: strip: i686-pc-linux-gnu-strip --strip-unneeded /usr/lib/irssi/modules/libsilc_core.so /usr/lib/irssi/modules/libfe_silc.so /usr/lib/perl5/5.8.7/i686-linux/auto/Irssi/Silc/Silc.so QA Notice: the following files contain runtime text relocations Text relocations force the dynamic linker to perform extra work at startup, waste system resources, and may pose a security risk. On some architectures, the code may not even function properly, if at all. Please include this file in your report: /var/tmp/portage/portage/silc-plugin-1.0.1-r5/temp/scanelf-textrel.log TEXTREL usr/lib/irssi/modules/libsilc_core.so QA Notice: the following files contain executable stacks Files with executable stacks will not work properly (or at all!) on some architectures/operating systems. A bug should be filed at http://bugs.gentoo.org/ to make sure the file is fixed. Please include this file in your report: /var/tmp/portage/portage/silc-plugin-1.0.1-r5/temp/scanelf-exec.log RWX --- --- usr/lib/irssi/modules/libsilc_core.so !!! ERROR: net-im/silc-plugin-1.0.1-r5 failed. Call stack: ebuild.sh, line 1933: Called dyn_install !!! Aborting due to QA concerns: textrels, execstacks !!! If you need support, post the topmost build error, and the call stack if relevant.
Here you go. http://hardened.gentoo.org/gnu-stack.xml
Great reading, thanks. However, I can't find any .S files in sources to add mentioned snippets for GNU_STACK.
well i'd like to help but you didnt attach this log like the message told you to: /var/tmp/portage/portage/silc-plugin-1.0.1-r5/temp/scanelf-exec.log
Created attachment 84206 [details] scanelf-execstack.log Actually, this package seems to suffer from both textrels and executable stacks. I'm attaching both scanelf-*.log files.
OK, the second file was too large for bugzilla. Here is a link: http://dev.gentoo.org/~ticho/misc/scanelf-textrel.log
i think that the plugin is just built incorrectly rather than the source code having problems ... in other words, it includes objects that were not properly built with -fPIC in general, if you have something that has a ton of TEXTRELs (looking pretty much like 1 for every single function), then it's a good indicator that it was built incorrectly a very good indicator of this is if external functions are called in C code yet yield textrels ... like: libsilc_core.so: getpgid@@GLIBC_2.0 [0xD4C39] in silc_client_connect_to_server_final [0xD4BE0] reading the source there is clearly no inline asm which calls this ... the reference comes from pure C
silc-plugin-1.1.2 doesn't have this issue anymore when compiled with --with-pic