[Bug binutils/32006] ld pulls symbols from wrong library

2024-07-28 Thread felics-sourceware at kettenbruch dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=32006 --- Comment #10 from dreieck --- > gcc -o t test.c -pthread '-(' -lpthread '-)' -Wl,-Map,mapfile I think it should be '-Wl,-(' and '-Wl,-)', since '-(' is an option that the linker understands, but not the C compiler. '-(' (or the equivalent

[Bug binutils/32006] ld pulls symbols from wrong library

2024-07-24 Thread stefan at franke dot ms
https://sourceware.org/bugzilla/show_bug.cgi?id=32006 Stefan Franke changed: What|Removed |Added CC||stefan at franke dot ms --- Comment #

[Bug binutils/32006] ld pulls symbols from wrong library

2024-07-23 Thread jahns at dkrz dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=32006 --- Comment #8 from Thomas Jahns --- Sorry, my fault, misplaced the group flags, should be: $ gcc -nostdlib -static -L/opt/diet/lib-x86_64 /opt/diet/lib-x86_64/start.o -o t test.c -D_REENTRANT -Wl,--start-group -lpthread -Wl,-Map,mapfile -i

[Bug binutils/32006] ld pulls symbols from wrong library

2024-07-23 Thread jahns at dkrz dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=32006 --- Comment #7 from Thomas Jahns --- What I meant was that I think static resolution of symbols from the same object file is different from lookups in other files. Also the documentation of option --start-group option suggests that symbols sh

[Bug binutils/32006] ld pulls symbols from wrong library

2024-07-23 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32006 --- Comment #6 from H.J. Lu --- (In reply to Felix von Leitner from comment #3) > Please explain that to me. You just told me to put libpthread.a AFTER libc.a > so that it overrules it. What I meant was to use -lpthread ... libc.a ... -lpth

[Bug binutils/32006] ld pulls symbols from wrong library

2024-07-23 Thread felix-glibc at fefe dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=32006 --- Comment #5 from Felix von Leitner --- (In reply to Thomas Jahns from comment #4) > My understanding is that __stdio_init_file should be in an object file > separate from the one using it in libc.a because static linkage means no > late bin

[Bug binutils/32006] ld pulls symbols from wrong library

2024-07-23 Thread jahns at dkrz dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=32006 Thomas Jahns changed: What|Removed |Added CC||jahns at dkrz dot de --- Comment #4 fr

[Bug binutils/32006] ld pulls symbols from wrong library

2024-07-23 Thread c...@reto-schneider.ch
https://sourceware.org/bugzilla/show_bug.cgi?id=32006 Reto Schneider changed: What|Removed |Added CC||c...@reto-schneider.ch -- You are r

[Bug binutils/32006] ld pulls symbols from wrong library

2024-07-23 Thread felix-glibc at fefe dot de
https://sourceware.org/bugzilla/show_bug.cgi?id=32006 Felix von Leitner changed: What|Removed |Added Resolution|NOTABUG |--- Status|RESOLVED

[Bug binutils/32006] ld pulls symbols from wrong library

2024-07-22 Thread amodra at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32006 --- Comment #2 from Alan Modra --- Standard unix linkers extract an object from an archive if the object satisifies an undefined symbol reference in objects seen before the archive is searched. Ordering on the command line matters. -- You a

[Bug binutils/32006] ld pulls symbols from wrong library

2024-07-22 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=32006 H.J. Lu changed: What|Removed |Added Resolution|--- |NOTABUG Status|UNCONFIRMED