This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/11902] New: spec file improperly inserts rpath even when none needed, causing ld.so to assert when loading libc.so


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: spec file improperly inserts rpath even when none
                    needed, causing ld.so to assert when loading libc.so
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P1
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dank at kegel dot com
                CC: gcc-bugs at gcc dot gnu dot org,kkojima at rr dot iij4u
                    dot or dot jp
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: sh4-*-linux-gnu

As is, if you compile libc.so with gcc-3.3.1 on sh4, it will
be marked with DT_RPATH even though it doesn't need it,
which causes ld.so to crash silently when loading libc.so.
This is catastrophic, since all dynamically loaded programs crash.
The crash is caused by the line
  assert (info[DT_RPATH] == NULL);
which occurs too early for an error message to be printed.

This is caused by the line

!rpath:-rpath /lib

in the spec file.  A patch written by Kaz to fix this is at
http://www.kegel.com/crosstool/current/gcc-3.3-patches/sh-spec.patch
I have tried it, and it seems to solve the problem for me.
Please include this patch in gcc-3.3.2.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]