[Bug ld/10340] New: ld doesn't honor sysroot prefix for ldscripts

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

[Bug ld/10340] New: ld doesn't honor sysroot prefix for ldscripts

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

Reply to Author | View Threaded | Show Only this Message

When ld is configured with a sysroot prefix and test is executed:

echo "Testing with absolute linker script (systems libz)..."
echo "GROUP ( /lib/libz.so )" > "${PWD}/libfoo-script.so"
armv4tl-softfloat-linux-gnueabi-gcc test.c -o test libfoo-script.so

the linking process terminates with

Testing with absolute linker script (systems libz)...
/lib/libz.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status

because the Host's library is linked in. For cross-compilation the desired
behaviour is different. Here, the lib specified in the linker script should be
searched in the sysroot first! Patch will be attached.

--
           Summary: ld doesn't honor sysroot prefix for ldscripts
           Product: binutils
           Version: 2.19
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: OdinsHorse at googlemail dot com
                CC: bug-binutils at gnu dot org
GCC target triplet: armv4tl-softfloat-linux-gnueabi


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

------- 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/10340] ld doesn't honor sysroot prefix for ldscripts

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

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From OdinsHorse at googlemail dot com  2009-06-28 06:55 -------
Created an attachment (id=4025)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4025&action=view)
ld should search search in sysroot first

When ld was configured with a sysroot, it should always search for libraries
with absolute filename in this sysroot first.

--


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

------- 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/10340] ld doesn't honor sysroot prefix for ldscripts

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

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From OdinsHorse at googlemail dot com  2009-06-28 06:56 -------
(From update of attachment 4025)
When ld was configured with a sysroot, it should always search for libraries
with absolute filename in this sysroot first. This patch was tested on
x86_64-pc-linux-gnu without sysroot and armv4tl-softfloat-linux-gnueabi with
sysroot and works ffine on both.


--


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

------- 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/10340] ld doesn't honor sysroot prefix for ldscripts

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

Reply to Author | View Threaded | Show Only this Message



--
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vapier at gentoo dot org


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

------- 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/10340] ld doesn't honor sysroot prefix for ldscripts

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

Reply to Author | View Threaded | Show Only this Message


------- Additional Comments From vapier at gentoo dot org  2009-06-28 16:43 -------
background discussion can be found here:
http://sourceware.org/ml/binutils/2009-05/msg00480.html

--


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

------- 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