This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/59842] New: `__x86.get_pc_thunk.bx' referenced in section `.text': defined in discarded sectionâ
- From: "tg at mirbsd dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 16 Jan 2014 14:47:35 +0000
- Subject: [Bug target/59842] New: `__x86.get_pc_thunk.bx' referenced in section `.text': defined in discarded sectionâ
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59842
Bug ID: 59842
Summary: `__x86.get_pc_thunk.bx' referenced in section `.text':
defined in discarded sectionâ
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: tg at mirbsd dot org
Created attachment 31855
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31855&action=edit
test runner
Hi *,
I originally filed this as Debian #735564 but a user informed me they are also
seeing this on other GNU/Linux distributions, and with GCC 4.7.1 on Slackware.
Since a while, Iâm getting errors like these:
`__x86.get_pc_thunk.bx' referenced in section `.text' of x3.o: defined in
discarded section `.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]' of x3.o
I used to be able to avoid them (although, back then, the symbol
was named â__i686.get_pc_thunk.bxâ) by adding -march=i486, but
this no longer helps.
Screen log (the files x.sh, x.i and x.sym are attached):
tglase@tglase:~ $ mksh x.sh
`__x86.get_pc_thunk.bx' referenced in section `.text' of x3.o: defined in
discarded section `.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]' of x3.o
`__x86.get_pc_thunk.bx' referenced in section `.text' of x3.o: defined in
discarded section `.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]' of x3.o
`__x86.get_pc_thunk.bx' referenced in section `.text' of x3.o: defined in
discarded section `.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]' of x3.o
`__x86.get_pc_thunk.bx' referenced in section `.text' of x3.o: defined in
discarded section `.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]' of x3.o
`__x86.get_pc_thunk.bx' referenced in section `.text' of x3.o: defined in
discarded section `.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]' of x3.o
`__x86.get_pc_thunk.bx' referenced in section `.text' of x3.o: defined in
discarded section `.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]' of x3.o
`__x86.get_pc_thunk.bx' referenced in section `.text' of x3.o: defined in
discarded section `.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]' of x3.o
`__x86.get_pc_thunk.bx' referenced in section `.text' of x3.o: defined in
discarded section `.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]' of x3.o
`__x86.get_pc_thunk.bx' referenced in section `.text' of x3.o: defined in
discarded section `.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]' of x3.o
`__x86.get_pc_thunk.bx' referenced in section `.text' of x3.o: defined in
discarded section `.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]' of x3.o
`__x86.get_pc_thunk.bx' referenced in section `.text' of x3.o: defined in
discarded section `.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]' of x3.o
collect2: error: ld returned 1 exit status
IMHO, GCC may not mark symbols as discardable that it uses by itself. Adding
this to the symbol file is no solution either, as this becomes highly platform-
and compiler-dependent.