[Bug c/20503] New: openssl compiled with -mcpu=i686 triggers `__i686.get_pc_thunk.bx' referenced in section `.text' of /usr/lib/libc_nonshared.a(elf-init.oS): defined in discarded section `.gnu.linkonce.t.__i686.get_pc_thunk.bx' of /usr/lib/libc_nonshared.a(elf-init.oS)

laurivan at eircom dot net gcc-bugzilla@gcc.gnu.org
Wed Mar 16 19:27:00 GMT 2005


System:
SuSE 9.2
OpenSSL openssl-0.9.7d-25.1.i586.rpm (obtained via apt-get for SuSE).

Command line:
gcc  -g -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
-Wpointer-arith  -D_GNU_SOURCE=1 -Dlinux=1 -I../../src/include
-I../../lib/include -DDEBUG  -O2 -Werror -c -o
../../obj/trace_tools/parsetrace/parsetrace.o parsetrace.c
gcc  -g -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
-Wpointer-arith  -D_GNU_SOURCE=1 -Dlinux=1 -I../../src/include
-I../../lib/include -DDEBUG  -O2 -Werror -o ../../bin/parsetrace 
../../obj/trace_tools/parsetrace/parsetrace.o -L../../lib -Wl,-E 
-L/home/laur/work/source -lR -lm -lz -ldl -lncurses -lcrypto
-Wl,--whole-archive,-lmylib,--no-whole-archive -lm -lz

where -lmylib is a libmylib.a contining calls from libcrypto.a

ld -r -o ../obj/src/lib.o --whole-archive ../bin/libmylib.a --no-whole-archive \
    /usr/lib/libcrypto.a


Error:
`__i686.get_pc_thunk.bx' referenced in section `.text' of
/usr/lib/libc_nonshared.a(elf-init.oS): defined in discarded section
`.gnu.linkonce.t.__i686.get_pc_thunk.bx' of /usr/lib/libc_nonshared.a(elf-init.oS)

Also, the binary is rendered unusable.

a nm difference of libmylib.a between a libcrypto.a compiled with -mcpu=i686 and
a version compiled with -mcpu=i586 (or no -mcpu for that matter) shows the
presence of:
XXXXXX t __i686.get_pc_thunk.bx
XXXXXX t __i686.get_pc_thunk.cx
in the -mcpu=i686 variant.


Notes:
I have played with the openSSL compilation flags and the only case where the
error is present is where -mcpu=i686 flag is present (I've tried with
-mcpu=pentium4 and I get the same error).

-- 
           Summary: openssl compiled with -mcpu=i686 triggers
                    `__i686.get_pc_thunk.bx' referenced in section `.text'
                    of /usr/lib/libc_nonshared.a(elf-init.oS): defined in
                    discarded section
                    `.gnu.linkonce.t.__i686.get_pc_thunk.bx' of
                    /usr/lib/libc_nonshared.a(elf-init.oS)
           Product: gcc
           Version: 3.3.4
            Status: UNCONFIRMED
          Severity: critical
          Priority: P1
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: laurivan at eircom dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: Reading specs from /usr/lib/gcc-lib/i586-suse-
                    linux/3.3.4/specs
  GCC host triplet: SuSE 9.2, Linux gluon 2.6.8-24.11-smp #1 SMP Fri Jan 14
                    13:01:26
GCC target triplet: SuSE 9.2, Linux gluon 2.6.8-24.11-smp #1 SMP Fri Jan 14
                    13:01:26


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20503



More information about the Gcc-bugs mailing list