[Bug ld/10912] New: [Regression] --as-needed/--no-as-needed no longer works.

View: New views
4 Messages — Rating Filter:   Alert me  

[Bug ld/10912] New: [Regression] --as-needed/--no-as-needed no longer works.

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

When building glibc, I got

[hjl@gnu-6 glibc-32bit]$ gcc -m32 -nostdlib -nostartfiles -o
/export/build/gnu/glibc-32bit/build-i686-linux/nptl/tst-_res1
-Wl,-dynamic-linker=/lib/ld-linux.so.2   -Wl,-z,combreloc -Wl,-z,relro
-Wl,--hash-style=both /export/build/gnu/glibc-32bit/build-i686-linux/csu/crt1.o
/export/build/gnu/glibc-32bit/build-i686-linux/csu/crti.o `gcc -m32
--print-file-name=crtbegin.o`
/export/build/gnu/glibc-32bit/build-i686-linux/nptl/tst-_res1.o
/export/build/gnu/glibc-32bit/build-i686-linux/nptl/tst-_res1mod2.so
/export/build/gnu/glibc-32bit/build-i686-linux/nptl/libpthread_nonshared.a
/export/build/gnu/glibc-32bit/build-i686-linux/nptl/libpthread.so
-Wl,-rpath-link=/export/build/gnu/glibc-32bit/build-i686-linux:/export/build/gnu/glibc-32bit/build-i686-linux/math:/export/build/gnu/glibc-32bit/build-i686-linux/elf:/export/build/gnu/glibc-32bit/build-i686-linux/dlfcn:/export/build/gnu/glibc-32bit/build-i686-linux/nss:/export/build/gnu/glibc-32bit/build-i686-linux/nis:/export/build/gnu/glibc-32bit/build-i686-linux/rt:/export/build/gnu/glibc-32bit/build-i686-linux/resolv:/export/build/gnu/glibc-32bit/build-i686-linux/crypt:/export/build/gnu/glibc-32bit/build-i686-linux/nptl
/export/build/gnu/glibc-32bit/build-i686-linux/libc.so.6
/export/build/gnu/glibc-32bit/build-i686-linux/libc_nonshared.a -lgcc
-Wl,--as-needed -lgcc_s  -Wl,--no-as-needed `gcc -m32
--print-file-name=crtend.o`
/export/build/gnu/glibc-32bit/build-i686-linux/csu/crtn.o
/usr/local/bin/ld:
/export/build/gnu/glibc-32bit/build-i686-linux/nptl/tst-_res1.o: undefined
reference to symbol '_res'
/usr/local/bin/ld: note: '_res' is defined in DSO
/export/build/gnu/glibc-32bit/build-i686-linux/nptl/tst-_res1mod1.so so try
adding it to the linker command line
/export/build/gnu/glibc-32bit/build-i686-linux/nptl/tst-_res1mod1.so: could not
read symbols: Invalid operation
collect2: ld returned 1 exit status
[hjl@gnu-6 glibc-32bit]$

--
           Summary: [Regression] --as-needed/--no-as-needed no longer works.
           Product: binutils
           Version: 2.21 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: hjl dot tools at gmail dot com
                CC: bug-binutils at gnu dot org,nickc at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=10912

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug ld/10912] [Regression] --as-needed/--no-as-needed no longer works.

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From hjl dot tools at gmail dot com  2009-11-06 15:42 -------
It is caused by

http://sourceware.org/ml/binutils/2009-10/msg00550.html

--
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical


http://sourceware.org/bugzilla/show_bug.cgi?id=10912

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug ld/10912] [Regression] --as-needed/--no-as-needed no longer works.

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2009-11-06 16:51 -------
Subject: Bug 10912

CVSROOT: /cvs/src
Module name: src
Changes by: hjl@... 2009-11-06 16:50:59

Modified files:
        ld             : ChangeLog ldmain.c

Log message:
        2009-11-06  H.J. Lu  <hongjiu.lu@...>
       
        PR ld/10912
        * ldmain.c (add_DT_NEEDED_for_dynamic): Default to TRUE.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/ld/ChangeLog.diff?cvsroot=src&r1=1.2075&r2=1.2076
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/ld/ldmain.c.diff?cvsroot=src&r1=1.140&r2=1.141



--


http://sourceware.org/bugzilla/show_bug.cgi?id=10912

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils

[Bug ld/10912] [Regression] linker is broken

by Bugzilla from sourceware-bugzilla@sourceware.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From hjl dot tools at gmail dot com  2009-11-06 16:52 -------
Fixed.

--
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
            Summary|[Regression] --as-needed/-- |[Regression] linker is
                   |no-as-needed no longer      |broken
                   |works.                      |


http://sourceware.org/bugzilla/show_bug.cgi?id=10912

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


_______________________________________________
bug-binutils mailing list
bug-binutils@...
http://lists.gnu.org/mailman/listinfo/bug-binutils