This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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 libc/19170] New: __gmon_start__ defined in hppa in crtn.S


https://sourceware.org/bugzilla/show_bug.cgi?id=19170

            Bug ID: 19170
           Summary: __gmon_start__ defined in hppa in crtn.S
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: danglin at gcc dot gnu.org
                CC: deller at gmx dot de, drepper.fsp at gmail dot com
  Target Milestone: ---
              Host: hppa-unknown-linux-gnu
            Target: hppa-unknown-linux-gnu
             Build: hppa-unknown-linux-gnu

__gmon_start__ is defined in crtn.S on hppa.  This exposes an internal
symbol and leads to problems with --as-needed including unnecessary libraries.
It needs to be weak undefined as on other targets.

Here is an example where things go wrong:

FAIL: check-defs.sh
===================

Checking that .libs/libharfbuzz.so has the same symbol list as harfbuzz.def
1a2
> __gmon_start__
FAIL check-defs.sh (exit status: 1)

FAIL: check-symbols.sh
======================

Checking that we are not exposing internal symbols
Processing .libs/libharfbuzz.so
__gmon_start__
Ouch, internal symbols exposed
FAIL check-symbols.sh (exit status: 1)

============================================================================
Testsuite summary for HarfBuzz 1.0.1
============================================================================
# TOTAL: 7
# PASS:  5
# SKIP:  0
# XFAIL: 0
# FAIL:  2
# XPASS: 0
# ERROR: 0
============================================================================
See src/test-suite.log
Please report to http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz
============================================================================
Makefile:1858: recipe for target 'test-suite.log' failed
make[7]: *** [test-suite.log] Error 1

This is the problematic define:

/* Note that we cannot have a weak undefined __gmon_start__, because
   that would require this to be PIC, and the linker is currently not
   able to generate a proper procedure descriptor for _init.  Sad but
   true.  Anyway, HPPA is one of those horrible architectures where
   making the comparison and indirect call is quite expensive (see the
   comment in sysdeps/generic/initfini.c). */
        .text
        .align 4
        .weak   __gmon_start__
        .type    __gmon_start__,@function
__gmon_start__:
       .proc
       .callinfo
       .entry
        bv,n %r0(%r2)
       .exit
       .procend

/* Here is the tail end of _init.  We put __gmon_start before this so
   that the assembler creates the .PARISC.unwind section for us, ie.
   with the right attributes.  */

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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