<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://sourceware.org/bugzilla/bugzilla.dtd">

<bugzilla version="4.0.10"
          urlbase="http://sourceware.org/bugzilla/"
          
          maintainer="overseers@sourceware.org"
>

    <bug>
          <bug_id>12499</bug_id>
          
          <creation_ts>2011-02-18 03:49:00 +0000</creation_ts>
          <short_desc>Changes to .init_array support breaks eglibc-2.11.2 on hppa-linux</short_desc>
          <delta_ts>2011-03-17 02:52:38 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>binutils</product>
          <component>ld</component>
          <version>2.22</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>12343</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="John David Anglin">danglin</reporter>
          <assigned_to>unassigned</assigned_to>
          
          <cf_gcchost></cf_gcchost>
          <cf_gcctarget></cf_gcctarget>
          <cf_gccbuild></cf_gccbuild>
          

      

      

      

          <long_desc isprivate="0">
            <commentid>47110</commentid>
            <who name="John David Anglin">danglin</who>
            <bug_when>2011-02-18 03:49:27 +0000</bug_when>
            <thetext>...
CPP=&apos;gcc-4.4 -E -x c-header&apos;    /home2/dave/debian/glibc/eglibc-2.11.2/build-tre
e/hppa-libc/elf/ld.so.1 --library-path /home2/dave/debian/glibc/eglibc-2.11.2/bu
ild-tree/hppa-libc:/home2/dave/debian/glibc/eglibc-2.11.2/build-tree/hppa-libc/m
ath:/home2/dave/debian/glibc/eglibc-2.11.2/build-tree/hppa-libc/elf:/home2/dave/
debian/glibc/eglibc-2.11.2/build-tree/hppa-libc/dlfcn:/home2/dave/debian/glibc/e
glibc-2.11.2/build-tree/hppa-libc/nss:/home2/dave/debian/glibc/eglibc-2.11.2/bui
ld-tree/hppa-libc/nis:/home2/dave/debian/glibc/eglibc-2.11.2/build-tree/hppa-lib
c/rt:/home2/dave/debian/glibc/eglibc-2.11.2/build-tree/hppa-libc/resolv:/home2/d
ave/debian/glibc/eglibc-2.11.2/build-tree/hppa-libc/crypt:/home2/dave/debian/gli
bc/eglibc-2.11.2/build-tree/hppa-libc/nptl /home2/dave/debian/glibc/eglibc-2.11.
2/build-tree/hppa-libc/sunrpc/rpcgen -Y ../scripts -c rpcsvc/bootparam_prot.x -o
 /home2/dave/debian/glibc/eglibc-2.11.2/build-tree/hppa-libc/sunrpc/xbootparam_p
rot.T
make[3]: *** [/home2/dave/debian/glibc/eglibc-2.11.2/build-tree/hppa-libc/sunrpc
/xbootparam_prot.stmp] Segmentation fault (core dumped)

Problem occurs in call_init trying to run constructors for newly built libc.so.6.

/home2/dave/debian/glibc/eglibc-2.11.2/build-tree/hppa-libc/libc.so.6:
+file 
format elf32-hppa-linux

Contents of section .init_array:
159008 ffffffff 0015bee2 00000000           ............    

The ffffffff and 00000000 appear to come from merging .ctors into .init_array.
Calling 0xffffffff causes the segv.  ffffffff and 00000000 mark the limits
of .ctors as generated by crtstuff.c.

Building binutils with --disable-initfini-array avoids the error.

Not much documentation on this...</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>47136</commentid>
            <who name="H.J. Lu">hjl.tools</who>
            <bug_when>2011-02-21 18:13:42 +0000</bug_when>
            <thetext>Dup.

*** This bug has been marked as a duplicate of bug 12343 ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>47413</commentid>
            <who name="John David Anglin">danglin</who>
            <bug_when>2011-03-11 02:09:24 +0000</bug_when>
            <thetext>Irrespective of the closing of bug 12343, I still believe this is a binutils bug.  .ctors is incorrectly merged.  binutils should understand the markers
that GCC has used for years.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>47533</commentid>
            <who name="H.J. Lu">hjl.tools</who>
            <bug_when>2011-03-17 02:52:38 +0000</bug_when>
            <thetext>(In reply to comment #2)
&gt; Irrespective of the closing of bug 12343, I still believe this is a binutils
&gt; bug.  .ctors is incorrectly merged.  binutils should understand the markers
&gt; that GCC has used for years.

There is no problem with the markers that GCC has used for years.
The problem is the custom markers used by glibc. There is no plan
to support the custom markers used by glibc. If you want to use the
new linker, you need to fix glibc.

*** This bug has been marked as a duplicate of bug 12343 ***</thetext>
          </long_desc>
      
      

    </bug>

</bugzilla>