Unable to init binreloc with ld >= 2.31 ---------------------------------------
Key: CORE-5955 URL: http://tracker.firebirdsql.org/browse/CORE-5955 Project: Firebird Core Issue Type: Bug Environment: Libux binaried built with ld >=2.31 Reporter: Roman Simakov See https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob_plain;f=ld/NEWS;hb=refs/tags/binutils-2_31 for 2.31 *Add a configure option --enable-separate-code to decide whether -z separate-code should be enabled in ELF linker by default. Default to yes for Linux/x86 targets. Note that -z separate-code can increase disk and memory size. Now -z separate-code linker option is default and in /proc/self/maps we can find 6 sections for libfbclient.so 7ffff7b8d000-7ffff7c0f000 r--p 00000000 08:15 52957347 /home/roman/prj/RedDatabase/red-database/gen/Debug/firebird/lib/libfbclient.so.4.0.0 7ffff7c0f000-7ffff7da8000 r-xp 00082000 08:15 52957347 /home/roman/prj/RedDatabase/red-database/gen/Debug/firebird/lib/libfbclient.so.4.0.0 7ffff7da8000-7ffff7f83000 r--p 0021b000 08:15 52957347 /home/roman/prj/RedDatabase/red-database/gen/Debug/firebird/lib/libfbclient.so.4.0.0 7ffff7f83000-7ffff7f84000 ---p 003f6000 08:15 52957347 /home/roman/prj/RedDatabase/red-database/gen/Debug/firebird/lib/libfbclient.so.4.0.0 7ffff7f84000-7ffff7fbc000 r--p 003f6000 08:15 52957347 /home/roman/prj/RedDatabase/red-database/gen/Debug/firebird/lib/libfbclient.so.4.0.0 7ffff7fbc000-7ffff7fbe000 rw-p 0042e000 08:15 52957347 /home/roman/prj/RedDatabase/red-database/gen/Debug/firebird/lib/libfbclient.so.4.0.0 Previosly we could find 4. Now "r-xp" pages contains ONLY instructions. Any data moved to separate pages "a--p". 7f8ef3f04000-7f8ef42f9000 r-xp 00000000 08:15 52957337 /home/roman/prj/RedDatabase/red-database/gen/Debug/firebird/lib/libfbclient.so.4.0.0 7f8ef42f9000-7f8ef42fa000 ---p 003f5000 08:15 52957337 /home/roman/prj/RedDatabase/red-database/gen/Debug/firebird/lib/libfbclient.so.4.0.0 7f8ef42fa000-7f8ef4332000 r--p 003f5000 08:15 52957337 /home/roman/prj/RedDatabase/red-database/gen/Debug/firebird/lib/libfbclient.so.4.0.0 7f8ef4332000-7f8ef4334000 rw-p 0042d000 08:15 52957337 /home/roman/prj/RedDatabase/red-database/gen/Debug/firebird/lib/libfbclient.so.4.0.0 binreloc library skip any lines of /proc/self/maps except "a-xp" and it's a bug. It tries to find an address of empty constant string "" and supposes it will be allocated at the same page as instructions. Starting from ld 2.31 it's not so by default. We need to conider r--p sections as well. A simpthom is "Missing master config file firebird.conf" if you try to run server without installation. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel