<?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>3946</bug_id>
          
          <creation_ts>2007-01-30 23:26:00 +0000</creation_ts>
          <short_desc>Weak definitions aren&apos;t so weak</short_desc>
          <delta_ts>2007-01-31 01:06:15 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>glibc</product>
          <component>libc</component>
          <version>2.3.6</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <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="Samuel Thibault">samuel.thibault</reporter>
          <assigned_to name="Ulrich Drepper">drepper.fsp</assigned_to>
          <cc>glibc-bugs</cc>
          <cf_gcchost></cf_gcchost>
          <cf_gcctarget></cf_gcctarget>
          <cf_gccbuild></cf_gccbuild>
          

      

      

      

          <long_desc isprivate="0">
            <commentid>14754</commentid>
            <who name="Samuel Thibault">samuel.thibault</who>
            <bug_when>2007-01-30 23:26:46 +0000</bug_when>
            <thetext>Attached is a testcase for weak references: two libraries define the safe symbol f, one as a weak definition, the other as a strong definition, and a program calls it. When run with ld-linux 2.3.6 and 2.5, the link order matters, while with ld-linux 2.2.5, the strong definition always wins.

I would have expected to always get the 2.2.5&apos;s &quot;strong always wins&quot; behavior (and that&apos;s what I can read when googling), is there a reason for 2.3.6 and above to behave differently? (I can&apos;t see what weak definitions can be used for in such case).</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>14755</commentid>
              <attachid>1527</attachid>
            <who name="Samuel Thibault">samuel.thibault</who>
            <bug_when>2007-01-30 23:27:14 +0000</bug_when>
            <thetext>Created attachment 1527
weak definitions testcase</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <commentid>14756</commentid>
            <who name="Ulrich Drepper">drepper.fsp</who>
            <bug_when>2007-01-31 01:06:15 +0000</bug_when>
            <thetext>Weak definition only and exclusively have a meaning for static archives.  Old
glibc versions mistakenly implemented it for dynamic linking, too.  This is now
not the default anymore.   Broken code an use LD_DYNAMIC_WEAK.</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
              isurl="0"
          >
            <attachid>1527</attachid>
            <date>2007-01-30 23:27:00 +0000</date>
            <delta_ts>2007-01-30 23:27:14 +0000</delta_ts>
            <desc>weak definitions testcase</desc>
            <filename>test.tgz</filename>
            <type>application/octet-stream</type>
            <size>455</size>
            <attacher>samuel.thibault</attacher>
            
              <data encoding="base64">H4sIAL7Sv0UAA+2XW0vDMBiGd7v8io85oQXXNe1iYU5x4oXCBBFvBKFkXeeCXTuaVBHxv5t0Y07x
eNEq8j0XPaRvvh7ok6ZqvuhKlWfpjRM1KsLV7PZ6Zk0D5m6uSyjzG9RlLAgYpaadegH1GuBWdUGb
FFLxHKAh+fzhs5yaiTEvElXHNdXIlkijpJjEMJBqIjJndkDuMjGBqWVDGHKlcjEuVByGlsUTwaXV
kqoYt2zb3iP6ySkRgUgVmEbLdLThkTQXuW6bmqh5sa7Tlg4/kd++VeQdlPb/Pua31dn/Hf93N/xn
xn/fZ+h/HfzAf/Oa7Px8EDDdcAj4qxj/F3lW4df/a/9dfWztvx+U/jOK/teB8XbORfrirTZ/jzTz
WBV5Ci5a+78x/p/x23gqkriqc3zlvx+wtf9ebzn/d130vw54kvRBxVLRcumR5ug4HJ0eXQwvrsLz
4eXJvgNOtwx8fMgjpEz0YfkpgUSMVz+VMjM75QxTZqR5E0XQHkAng/YhdEYOdJJlUG+Y0LKQt1lo
1fdVzXcLmeC6HiE6v62jfdh2ord5OeN5PMGBDUEQBEEQBEEQBEEQBEEQBEGQ/8gzv3GNEAAoAAA=
</data>

          </attachment>
      

    </bug>

</bugzilla>