bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/16452] ELF executable with weak reference linked with ld causes


From: roseandrew at me dot com
Subject: [Bug ld/16452] ELF executable with weak reference linked with ld causes assertion in ld.so
Date: Thu, 16 Jan 2014 09:24:51 +0000

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



--- Comment #2 from roseandrew at me dot com ---

Good day, I would like to clarify :

I'm trying to compile openssh , using own compiled toolchan. at compile tim
e I

come across such an error

openbsd-compat / / libopenbsd-compat.a (bsd-misc.o): (. pdr +0 x20): undefi
ned

reference to `setlogin @ @ GLIBC_2.0 '

/ home / andrew / Desktop / mips-toolchan / bin /.. /.. / mips-toolchan / /

root/lib/libc.so.6: undefined reference to `setlogin @ @ GLIBC_2.0

I checked

Content libraries connected during linking:

libc_pic.a: setlogin.os: U __ divdi3_internal

libc_pic.a: setlogin.os: 00000000 n __ evoke_link_warning_setlogin

libc_pic.a: setlogin.os: U __ GI_memmove

libc_pic.a: setlogin.os: U __ GI_memset

libc_pic.a: setlogin.os: U _gp_disp

libc_pic.a: setlogin.os: U __ libc_errno

libc_pic.a: setlogin.os: U __ moddi3_internal

libc_pic.a: setlogin.os: 00000000 T setlogin

libc_pic.a: setlogin.os: U __ udivdi3_internal

libc_pic.a: setlogin.os: U __ umoddi3_internal

This may be due to an error upomyanotoy (regression in ld)?15 ян
в. 2014 г.





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

> 

>            Bug ID: 16452

>           Summary: ELF executable with weak reference linked with ld

>                    causes assertion in ld.so

>           Product: binutils

>           Version: 2.25 (HEAD)

>            Status: NEW

>          Severity: normal

>          Priority: P2

>         Component: ld

>          Assignee: unassigned at sourceware dot org

>          Reporter: brnguyen at nvidia dot com

> 

> Created attachment 7357

>  --> http://sourceware.org/bugzilla/attachment.cgi?id=7357&action=edit

> Reproduction test case

> 

> The attached reproduction test case builds two DSOs, one linked against

> pthreads, and one not linked against pthreads, which implement the same

> interface.  It also builds a test application which is linked against the
 DSO

> that uses pthreads.  To reproduce the bug, the DSO that does not use pthr
eads

> is copied over the DSO that uses pthreads, and the test application is ru
n.

> 

> Using an ld built from commit 08d0cad39e31083cb8a885703604f7b20d359849, t
his

> triggers the following assertion on ld.so built from commit

> 2f10c4d6901e7a4c4ad294cc5bb8ece6547f4f62 as well as ld.so from glibc

> 2.15-0ubuntu10.5-ppa1 on my Ubuntu 12.04 LTS system:

> 

> Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_version
s:

> Assertion `needed != ((void *)0)' failed!

> 

> This may be related to bugs #15149 and #12549. Also relevant is Debian bug

> #728529.

> 

> This appears to be a regression in ld (though there may be a bug in ld.so
 as

> well). I bisected binutils using this reproduction test case to try to na
rrow

> down the commit(s) responsible for this regression. Interestingly, ld fai
ls to

> link the test executable in a commit range between ToT master and

> binutils_2.22, with the following error messages:

> 

> /home/brnguyen/build/binutils//ld/ld: /tmp/cc3K1rHK.o: undefined referenc
e to

> symbol 'pthread_create@@GLIBC_2.2.5'

> /home/brnguyen/build/binutils//ld/ld: note: 'pthread_create@@GLIBC_2.2.5'
 is

> defined in DSO //lib/x86_64-linux-gnu/libpthread.so.0 so try adding it to
 the

> linker command line

> 

> It appears this link error was introduced by commit

> b64fb44af4f416fbbbda3de03fcfff61d80c841c ("Also track weak references") a
nd

> later removed by commit 879707c642925947e156b7ae2169b89f844532cd ("Exclud
e weak

> refs when considering whether an --as-needed library is needed"), at which

> point ld produces an executable which triggers the assertion.

> 

> -- 

> You are receiving this mail because:

> You are on the CC list for the bug.

> 

> _______________________________________________

> bug-binutils mailing list

> address@hidden

> https://lists.gnu.org/mailman/listinfo/bug-binutils



-- 

You are receiving this mail because:

You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]