[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol

2020-06-03 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=10144

H.J. Lu  changed:

   What|Removed |Added

 Blocks||26080


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=26080
[Bug 26080] Incorrect "Common symbol override test"
-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol

2011-11-29 Thread cvs-commit at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=10144

--- Comment #16 from cvs-commit at gcc dot gnu.org cvs-commit at gcc dot 
gnu.org 2011-11-29 12:42:14 UTC ---
CVSROOT:/cvs/src
Module name:src
Changes by:ma...@sourceware.org2011-11-29 12:42:10

Modified files:
ld/testsuite   : ChangeLog 
ld/testsuite/lib: ld-lib.exp 
Added files:
ld/testsuite/ld-elf: comm-data.exp comm-data1.s comm-data1.sd 
 comm-data2.rd comm-data2.s comm-data2.sd 
 comm-data2.xd 
ld/testsuite/ld-mips-elf: comm-data.exp 

Log message:
PR ld/10144
* lib/ld-lib.exp (run_ld_link_tests): Handle sources from other
directories.
(run_ld_link_exec_tests): Likewise.
(run_cc_link_tests): Likewise.
* ld-elf/comm-data1.sd: New test.
* ld-elf/comm-data1.s: Source for the new test.
* ld-elf/comm-data2.sd: New test.
* ld-elf/comm-data2.rd: Likewise.
* ld-elf/comm-data2.xd: Likewise.
* ld-elf/comm-data2.s: Source for the new tests.
* ld-elf/comm-data.exp: New file.
* ld-mips-elf/comm-data.exp: Likewise.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ChangeLog.diff?cvsroot=srcr1=1.1477r2=1.1478
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-elf/comm-data.exp.diff?cvsroot=srcr1=NONEr2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-elf/comm-data1.s.diff?cvsroot=srcr1=NONEr2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-elf/comm-data1.sd.diff?cvsroot=srcr1=NONEr2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-elf/comm-data2.rd.diff?cvsroot=srcr1=NONEr2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-elf/comm-data2.s.diff?cvsroot=srcr1=NONEr2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-elf/comm-data2.sd.diff?cvsroot=srcr1=NONEr2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-elf/comm-data2.xd.diff?cvsroot=srcr1=NONEr2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-mips-elf/comm-data.exp.diff?cvsroot=srcr1=NONEr2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/testsuite/lib/ld-lib.exp.diff?cvsroot=srcr1=1.87r2=1.88

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol

2010-11-04 Thread ma...@linux-mips.org
http://sourceware.org/bugzilla/show_bug.cgi?id=10144

Maciej W. Rozycki ma...@linux-mips.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #15 from Maciej W. Rozycki ma...@linux-mips.org 2010-11-04 
18:09:18 UTC ---
 The fix for this issue will be included in the upcoming 2.21 release.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

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


[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol

2010-09-14 Thread aurelien at aurel32 dot net

--- Additional Comments From aurelien at aurel32 dot net  2010-09-14 19:17 
---
I am reopening the bug as it appeared that the issue is not fixed in GCC 4.5 as 
I wrongly said here. It's just that our gcc was configured to default to -mplt 
which, in some cases, workaround the issue.

To summarize the issue:
- The issue is reproducible with any gcc version (tested 4.1, 4.3, 4.4, 4.5), 
provided that you use a binutils from after 2008-08-09. binutils from before 
2008-08-08 works find with the same versions of gcc.
- The issue can always be workarounded by not using -g
- The issue can sometimes be workarounded by using -mplt
- The issue is not fixed in HEAD as of 2010-09-14.

-- 
   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |


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

--- 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@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol

2010-09-14 Thread aurelien at aurel32 dot net

--- Additional Comments From aurelien at aurel32 dot net  2010-09-14 19:24 
---
Created an attachment (id=4981)
 -- (http://sourceware.org/bugzilla/attachment.cgi?id=4981action=view)
Testcase with C code and makefile

This new testcase doesn't obsolete the previous ones, but it's probably more
handy as it contains the C code and a Makefile

-- 


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

--- 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@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol

2010-09-14 Thread macro at linux-mips dot org

--- Additional Comments From macro at linux-mips dot org  2010-09-14 21:16 
---
Aurelien,

 Coincidentally, I've been working on this problem for the last couple
of days.  I believe I have a fix ready that I plan to submit once it's
gone through testing; probably even tonight.

 BTW, it's enough to pass -z nocopyreloc to LD to make this problem
happen, regardless of GCC or GAS options used.

  Maciej

-- 
   What|Removed |Added

 AssignedTo|unassigned at sources dot   |macro at linux-mips dot org
   |redhat dot com  |
 Status|REOPENED|ASSIGNED


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

--- 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@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol

2010-09-14 Thread aurelien at aurel32 dot net

--- Additional Comments From aurelien at aurel32 dot net  2010-09-14 23:01 
---
Thanks for working on that. I have also spend some time trying to understand 
the problem. I have also written a patch by analysing the difference with other 
architecture, so I am not really sure it is correct:

--- a/elfxx-mips.c
+++ b/elfxx-mips.c
@@ -8341,6 +8339,11 @@ _bfd_mips_elf_adjust_dynamic_symbol (str
   if (h-def_regular)
 return TRUE;

+  /* If there are no references to this symbol that do not use the
+ GOT, we don't need to generate a copy reloc.  */
+  if (!h-non_got_ref)
+return TRUE;
+
   /* There's also nothing more to do if we'll convert all relocations
  against this symbol into dynamic relocations.  */
   if (!hmips-has_static_relocs)

At least it fixes the issue.

-- 


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

--- 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@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol

2010-09-14 Thread macro at linux-mips dot org

--- Additional Comments From macro at linux-mips dot org  2010-09-14 23:38 
---
Aurelien,

 I have posted my proposal now, including LD testsuite cases:

http://sourceware.org/ml/binutils/2010-09/msg00216.html

  Maciej

-- 


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

--- 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@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol

2010-09-14 Thread aurelien at aurel32 dot net

--- Additional Comments From aurelien at aurel32 dot net  2010-09-14 23:53 
---
Thanks a lot for your work. I'll test it tomorrow on a few of the cases we have 
and keep you updated.

-- 


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

--- 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@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol

2010-09-14 Thread aurelien at aurel32 dot net

--- Additional Comments From aurelien at aurel32 dot net  2010-09-15 05:37 
---
I have built binutils including the patch linked in the previous comment. I
confirm it fixes all the problem we currently have wrt this issue. Thanks.

-- 


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

--- 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@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol

2010-08-23 Thread aurelien at aurel32 dot net

--- Additional Comments From aurelien at aurel32 dot net  2010-08-23 18:43 
---
This is indeed a gcc issue, marking the bug on ld as invalid.

-- 
   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID


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

--- 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@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol

2010-02-26 Thread rmansfield at qnx dot com


-- 
   What|Removed |Added

 CC||rmansfield at qnx dot com


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

--- 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@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol

2010-02-26 Thread rmansfield at qnx dot com

--- Additional Comments From rmansfield at qnx dot com  2010-02-26 21:52 
---
I believe this issue should be resolved by:

http://gcc.gnu.org/ml/gcc-patches/2009-09/msg02070.html

-- 


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

--- 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@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol

2010-01-24 Thread tg at mirbsd dot de


-- 
   What|Removed |Added

 CC||tg at mirbsd dot de


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

--- 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@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol

2010-01-23 Thread tg at mirbsd dot de


-- 
   What|Removed |Added

 Status|WAITING |NEW


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

--- 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@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol

2010-01-23 Thread tg at mirbsd dot de

--- Additional Comments From tg at mirbsd dot de  2010-01-23 18:03 ---
Created an attachment (id=4550)
 -- (http://sourceware.org/bugzilla/attachment.cgi?id=4550action=view)
Testcase #3 (with .c .s .o/.so)

(In reply to comment #4)
 Works for me with FSF versions of GCC and binutils, and the version
 of GLIBC I have to hand.  Please post a self-contained testcase that
 just needs a binutils build to run.  Please also post the .s files.

Okay:

r...@debian-mipsel:~ # gcc -O2 -g -S ya.c
r...@debian-mipsel:~ # gcc -O2 -g -c 
ya.s   
r...@debian-mipsel:~ # gcc -O2 -g -S -fPIC yb.c
r...@debian-mipsel:~ # gcc -O2 -g -fPIC -shared -o libb.so 
yb.s 
r...@debian-mipsel:~ # gcc -O2 -g -o y ya.o -L. -lb; echo =\ $?
/usr/bin/ld: non-dynamic relocations refer to dynamic symbol xxprogname
/usr/bin/ld: failed to set dynamic section sizes: Bad value
collect2: ld returned 1 exit status
= 1


Took me a while though. The “-g” is important.

r...@debian-mipsel:~ # gcc -v
Using built-in specs.
Target: mipsel-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.2-9' --with-

bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-
languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-
multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --
without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/
include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --
enable-libstdcxx-debug --disable-libssp --enable-targets=all --enable-
checking=release --build=mipsel-linux-gnu --host=mipsel-linux-gnu --
target=mipsel-linux-gnu
Thread model: posix
gcc version 4.4.3 20100108 (prerelease) (Debian 4.4.2-9) 
r...@debian-mipsel:~ # ld -v
GNU ld (GNU Binutils for Debian) 2.20

binutils2.20-5
gcc-4.4 4.4.2-9

-- 


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

--- 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@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol

2010-01-16 Thread rsandifo at nildram dot co dot uk

--- Additional Comments From rsandifo at nildram dot co dot uk  2010-01-16 
17:26 ---
Works for me with FSF versions of GCC and binutils, and the version
of GLIBC I have to hand.  Please post a self-contained testcase that
just needs a binutils build to run.  Please also post the .s files.


-- 
   What|Removed |Added

 Status|NEW |WAITING


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

--- 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@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol

2010-01-01 Thread tg at mirbsd dot de

--- Additional Comments From tg at mirbsd dot de  2010-01-01 14:37 ---
Created an attachment (id=4488)
 -- (http://sourceware.org/bugzilla/attachment.cgi?id=4488action=view)
New minimal testcase

New more minimal testcase. I used an external function to make sure
gcc doesn’t optimise the store to __progname away. I didn’t use any
header files for simplicity, but do assume your libc has __progname.

u...@debian-mipsel:~ $ gcc -O2 -g -Wall tc.c
/usr/bin/ld: non-dynamic relocations refer to dynamic symbol
__progname@@GLIBC_2.0
/usr/bin/ld: failed to set dynamic section sizes: Bad value
collect2: ld returned 1 exit status
1|u...@debian-mipsel:~ $ gcc -O2 -g -Wall tc.c -DUSE_EXTERN
u...@debian-mipsel:~ $ 

This is Debian sid (a-g d-u’d from aurel32’s qemu image):
• binutils 2.20-4
• gcc 4:4.4.2-2

From working on the autossh package, this bug did not occur
with the versions in Debian lenny.

Hope this helps.

-- 


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

--- 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@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol

2009-11-24 Thread rsandifo at nildram dot co dot uk

--- Additional Comments From rsandifo at nildram dot co dot uk  2009-11-24 
19:34 ---
The problem is that the .debug_info section in thr-objc_gc.o references
thread_cancel.  How did you compile that file?

-- 
   What|Removed |Added

 CC||rsandifo at nildram dot co
   ||dot uk


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

--- 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@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol

2009-11-10 Thread rixed at free dot fr


-- 
   What|Removed |Added

 CC||rixed at free dot fr


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

--- 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@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol

2009-05-17 Thread doko at debian dot org


-- 
   What|Removed |Added

 CC||doko at debian dot org


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

--- 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@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils