public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* target/5717: ppc-eabi-g++ emits wrong relocation type for typeid(std::bad_exception) when -meabi specified.
@ 2002-02-18  3:36 osv
  0 siblings, 0 replies; 2+ messages in thread
From: osv @ 2002-02-18  3:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         5717
>Category:       target
>Synopsis:       ppc-eabi-g++ emits wrong relocation type for typeid(std::bad_exception) when -meabi specified.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 18 03:36:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     osv@javad.ru
>Release:        3.0.4 20020218 (prerelease)
>Organization:
>Environment:
Linux falcon 2.2.14 #2 SMP Sat Apr 15 13:24:18 MSD 2000 i686 unknown
>Description:
When the attached code is compiled with -meabi -msdata=default command-line
options, the resulting assembler code refers to the "_ZTISt13bad_exception"
symbol as if it is placed in small constant data section. The wrong asm
statement is:

la %r3,_ZTISt13bad_exception@sda21(0)

However, the symbol itself is in the section
".gnu.linkonce.r._ZTISt13bad_exception" that is not a small data section.

Attempt to link the resulting code then fails with the following error:

".../ld: test.o: The target (typeinfo for std::bad_exception) of a
R_PPC_EMB_SDA21 relocation is in the wrong output section (.rodata)"
>How-To-Repeat:
Compile/link attached "test.cc" like this:

~/try/eabi/bin/ppc-eabi-g++ -v -O2 -meabi -msdata=default -save-temps -mregnames -nostartfiles test.cc 
Reading specs from /home/osv/try/eabi/lib/gcc-lib/ppc-eabi/3.0.4/specs
Configured with: /home/osv/cygnus/gcc/configure --prefix=/home/osv/try/eabi --target=ppc-eabi --disable-nls --with-gnu-as --with-gnu-ld -with-newlib
Thread model: single
gcc version 3.0.4 20020218 (prerelease)
 /home/osv/try/eabi/lib/gcc-lib/ppc-eabi/3.0.4/cpp0 -lang-c++ -D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=4 -DPPC -D__embedded__ -D__PPC__ -D__embedded__ -D__PPC -Asystem=embedded -Acpu=powerpc -Amachine=powerpc -D__CHAR_UNSIGNED__ -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -D_CALL_SYSV -D_BIG_ENDIAN -D__BIG_ENDIAN__ -Amachine=bigendian -D_ARCH_PPC test.cc test.ii
GNU CPP version 3.0.4 20020218 (prerelease) (cpplib) (PowerPC Embedded)
ignoring nonexistent directory "/home/osv/try/eabi/ppc-eabi/sys-include"
#include "..." search starts here:
#include <...> search starts here:
 /home/osv/try/eabi/include/g++-v3
 /home/osv/try/eabi/include/g++-v3/ppc-eabi
 /home/osv/try/eabi/include/g++-v3/backward
 /home/osv/try/eabi/include
 /home/osv/try/eabi/lib/gcc-lib/ppc-eabi/3.0.4/include
 /home/osv/try/eabi/ppc-eabi/include
End of search list.
 /home/osv/try/eabi/lib/gcc-lib/ppc-eabi/3.0.4/cc1plus -fpreprocessed test.ii -mcall-sysv -quiet -dumpbase test.cc -meabi -msdata=default -mregnames -O2 -version -o test.s
GNU CPP version 3.0.4 20020218 (prerelease) (cpplib) (PowerPC Embedded)
GNU C++ version 3.0.4 20020218 (prerelease) (ppc-eabi)
	compiled by GNU C version 2.95.2 20000313 (Debian GNU/Linux).
 /home/osv/try/eabi/lib/gcc-lib/ppc-eabi/3.0.4/../../../../ppc-eabi/bin/as -mppc -V -Qy -o test.o test.s
GNU assembler version 2.11.2 (ppc-eabi) using BFD version 2.11.2
 /home/osv/try/eabi/lib/gcc-lib/ppc-eabi/3.0.4/collect2 -V -Qy -dn -Bstatic -L/home/osv/try/eabi/lib/gcc-lib/ppc-eabi/3.0.4 -L/home/osv/try/eabi/lib/gcc-lib/ppc-eabi/3.0.4/../../../../ppc-eabi/lib test.o -lstdc++ -lm -lgcc -lgcc
/home/osv/try/eabi/lib/gcc-lib/ppc-eabi/3.0.4/../../../../ppc-eabi/bin/ld: test.o: The target (typeinfo for std::bad_exception) of a R_PPC_EMB_SDA21 relocation is in the wrong output section (.rodata)
/home/osv/try/eabi/lib/gcc-lib/ppc-eabi/3.0.4/../../../../ppc-eabi/bin/ld: final link failed: Bad value
GNU ld version 2.11.2 (with BFD 2.11.2)
  Supported emulations:
   elf32ppc
   elf32ppclinux
   elf32ppcsim
collect2: ld returned 1 exit status

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-c++src; name="test.cc.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.cc.gz"

H4sICCTjcDwAA3Rlc3QuY2MAHctRCoMwEATQ/z3FYKEkV7DSnx4k2GSFgOxKshaLeHeNfzPDm0eW
OK+JMdh/4SyTvomqpb5vPbQBUaXaE5Oq87QTUNjWIrgfCe7m3zEF3iIvllX8iw4i3owv1n06/PSC
odpYzLXssR90Ak3SQwh8AAAA


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: target/5717: ppc-eabi-g++ emits wrong relocation type for typeid(std::bad_exception) when -meabi specified.
@ 2002-09-20 14:31 dje
  0 siblings, 0 replies; 2+ messages in thread
From: dje @ 2002-09-20 14:31 UTC (permalink / raw)
  To: dje, gcc-bugs, gcc-prs, nobody, osv

Synopsis: ppc-eabi-g++ emits wrong relocation type for typeid(std::bad_exception) when -meabi specified.

Responsible-Changed-From-To: unassigned->dje
Responsible-Changed-By: dje
Responsible-Changed-When: Fri Sep 20 14:31:30 2002
Responsible-Changed-Why:
    PowrePC
State-Changed-From-To: open->closed
State-Changed-By: dje
State-Changed-When: Fri Sep 20 14:31:30 2002
State-Changed-Why:
    Section selection code has been reorganized in GCC 3.3.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5717


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-20 21:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-18  3:36 target/5717: ppc-eabi-g++ emits wrong relocation type for typeid(std::bad_exception) when -meabi specified osv
2002-09-20 14:31 dje

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).